View Single Post
Old 09-11-2012, 08:30 PM   #14
unboggling
Wizard
unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.unboggling ought to be getting tired of karma fortunes by now.
 
Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
Quote:
Originally Posted by chaley View Post
Excellent! I put a lot of work into template general program mode and it is nice to see people using it.
@chaley, thank you again for those examples! And thank you for the template language in general. I incorporated those examples in "How I" - Configurations - Templates. I'll gradually add other examples, and gradually add verbal pointers to them from within relevant workflow sections.

@anyone, do you happen to have, already constructed, a template for the entire path used by calibre for its library? Or a way to grab entire path from calibre internals and use that in a template? I can construct one for my specific path from root level all the way through to file extension, but that seems too specific for OS X and my library to include in "How I". An ideal character-counting template (for books in calibre library) would:
- include all path components
- be interoperable across various OSs and filesystems
- include a general designation meaning "drive letter and/or the volume name"
- include a general designation meaning "username"
- include a general designation meaning "library name"
- include just the first author (edit: extracted from {authors})
- include the file extension (edit: extracted from {formats})

Is there a shorthand interoperable among various file systems, such as ".." to mean "all path components from root to here", and another for "file extension"? Or an even more abbreviated shorthand to mean "the entire path from root of this file all the way through extension"?

Edit: And to complicate things further, is there a way to automatically capture the string length after calibre does whatever it does to truncate per filesystem?

Last edited by unboggling; 09-11-2012 at 09:17 PM. Reason: clarify
unboggling is offline   Reply With Quote