View Single Post
Old 06-27-2015, 04:42 AM   #71
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Thomas_AR View Post
Wish:
Since I manage now e everything with CC I do not need anymore complicated "send to de device" templates. But I want to have a minimum structure on my device. Is it possible to add a template as follows :
Folder Series (if no series author) /....
I have figured out a way to do this that is both simple and general. I am going to add "if ... then ... else ..." processing.

It will look something like
Code:
:if: {some_template} {} {} {} :then: {some_replacement_template} {} {} :else: {some_replacement_template} {} {} :::
The :else: is optional. All of the templates are arbitrary: single or multiple values. The test is "true" if that template evaluates to some non-blank value. A special symbol will be available, :tv: (test value) that can be used in a :then: or an :else: to replace the test with itself.

All if the if/then/elses will be processed first, then the template will be processed as normal. This means that the :then: and :else: parts can add slashes to change the directory structure.
chaley is offline   Reply With Quote