Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 04-02-2024, 01:18 AM   #1
rsbrux
Enthusiast
rsbrux began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Nov 2010
Device: PRS-300 replaced by Onyx Boox Poke 3
Send to device path by tag or by custom column

Calibre has an option "Send specific format to" which defines a destination folder on the device depending on the file format. In addition to books, I keep music scores on my device, which I like to keep in a different folder from "Books". They are all PDFs, but they are not my only PDFs. Is there a way to tell Calibre to put them in a different folder based on a tag or on the content of a custom column?
rsbrux is offline   Reply With Quote
Old 04-02-2024, 01:44 AM   #2
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,666
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Yes. See the template documentation: https://manual.calibre-ebook.com/template_lang.html


Single-function template is pretty limited here though. Personally, what I do is have a custom GPM template in a composite (column built from other column) column, #kobopath, to generate the value I want.. Then I insert it into the save template:

Code:
{#kobopath}/{title} - {author_sort:sublist(0,1,&)}

For tags and tag-like columns, the list functions such as list_re() and list_split() are your friend here. As an example, this template will take the first available 'Fanfiction.Whatever' tag and turn it into 'Fanfiction\Whatever':

Code:
program:

list_split(list_re($tags, ',', '^Fanfiction.(.*)$', 'Fanfiction/\1'), ',', 'ff');
If you're checking for formats, use approximate_formats() as it's far faster.

Last edited by ownedbycats; 04-02-2024 at 07:45 AM.
ownedbycats is online now   Reply With Quote
Advert
Old 04-02-2024, 08:08 AM   #3
rsbrux
Enthusiast
rsbrux began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Nov 2010
Device: PRS-300 replaced by Onyx Boox Poke 3
Thanks for the tips.
After further reflection, I would be better served going the other way, since the files in question are mostly not yet tagged appropriately but already in the appropriate directory on the e-book. Is there any way in Calibre to read out the actual path where a file is stored on a connected device? Calibre has obviously figured it out internally or it wouldn’t know which files were on the device, but I didn’t see anything useful in the documentation.
rsbrux is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom column to show a truncated file path TreeFrogBandit Library Management 2 02-28-2020 07:11 PM
Using Tags or tag-like column in Save To Disk/Send to Device BookJunkieLI Library Management 34 05-03-2015 05:45 AM
Send tag to device only if tag has more than 1 book? eosrose Calibre 0 01-29-2013 07:46 PM
how to move value(s) of tag column to a custom made column zoorakhan Library Management 0 12-08-2012 03:53 AM
Custom column showing path length? xterminal Library Management 1 09-11-2012 09:12 AM


All times are GMT -4. The time now is 08:26 PM.


MobileRead.com is a privately owned, operated and funded community.