06-13-2019, 05:10 PM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Jun 2019
Device: Various
|
Request: Match Calibre Filename template recipe
Hi,
I need to ensure that 'Save to disk' and 'Send To Device' use the same filename that Calibre assigns to books in the library. The format seems to be: book_title (up to X chars max) - 1st_author (up to Y chars max) and characters '?' and ':' (possibly others?) are replaced by an underscore From what I can tell this could be via a Template, but is sadly way over my head. I'd be very grateful if anyone could provide a recipe for this. If X and Y are not known leave them as x an y. I'll have a play around to figure them out. Many thanks, Cal |
06-13-2019, 08:56 PM | #2 | |
null operator (he/him)
Posts: 21,114
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
An example of when they might change is when 32Kb file and folder names become commonplace in Windows. BR |
|
06-13-2019, 09:33 PM | #3 |
hopeless n00b
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
I'm pretty sure @chaley gave me a template for extracting Calibre filenames. I think it uses {formats}? Let me try searching for that post.
|
06-13-2019, 09:39 PM | #4 | |
hopeless n00b
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Found it. It relies on a file with the selected format existing, though (e.g. MOBI in the example below).
Quote:
|
|
06-14-2019, 05:43 AM | #5 |
Junior Member
Posts: 6
Karma: 10
Join Date: Jun 2019
Device: Various
|
Thanks @ilovejedd!
Hmmm, though if it's the case that "they're also platform, file system, and language dependent. And those rules are subject to change, as they have done in the past" as @BetterRed says, I may need to rethink this. |
06-14-2019, 08:24 AM | #6 |
null operator (he/him)
Posts: 21,114
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@cbook7 - why don't you tell us what you're trying to achieve.
BR |
06-16-2019, 07:53 AM | #7 | |
Junior Member
Posts: 6
Karma: 10
Join Date: Jun 2019
Device: Various
|
Quote:
I use CC to add books to the device using either 'Wireless Device' or 'Content Server' methods. I use CC's option to always override filenames, so the books have the same name regardless of which import method used. This is fine when I know I want a book ahead of time. However, I use pCloud for cloud storage which is not supported by CC. CC doesn't support the Webdav protocol either. I can still remotely (when away from home/my laptop) download a book from Calibre to my android device, by finding the file in my cloud based Calibre library using my pCloud app to export it to the device storage. However, this bypases CC so it no longer gets renamed. Instead it retains its Calibre library filename. My idea was to make Calibre use it's own filename for the book when sending to a device (hence my original question). Then in CC using the setting that requests Calibre also use the 'Wireless Device' import filename for 'Content Server' imports. Thus all 3 methods of import have a consistent filename - that assigned by Calibre in it's library structure. However, if in the future (or on a different OS) Calibre changes its internal file-naming of books it would break. Options (As I see them) ================
If you've any comments or suggestions I'd gladly hear them |
|
06-16-2019, 09:47 PM | #8 |
null operator (he/him)
Posts: 21,114
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
The only tentative suggestion I can make would be to use a cloud storage service that CC does support rather than pcloud. Tentative a) because you maybe locked in to pcloud, b) I don't use CC nor anything similar so I'm not entirely sure that would solve your problem anyway.
Maybe ilovejedd will have some ideas BR |
06-16-2019, 10:17 PM | #9 |
hopeless n00b
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
I think easiest way (apart from using CC supported cloud service) is to use the same filename template for CC and pCloud copies.
Personally, I actually have 2 sets of my books on Dropbox: One is a complete/direct mirror of my Calibre library (my offsite backup) The other uses {genre}/{author}/{author} - {series} {series_index} - {title} (for easy browsing on Marvin for iOS). |
06-17-2019, 09:30 AM | #10 | |
Junior Member
Posts: 6
Karma: 10
Join Date: Jun 2019
Device: Various
|
Quote:
While I'm not locked into pCloud I'm not looking to change because it fits very with my wider data/cloud needs and my wallet ;-). I actually switched to pCloud after 5 years with a paid Dropbox account and am quite satisfied with it so far (inconveniences like this aside!). Thanks for the feedback Last edited by cbook7; 06-17-2019 at 09:32 AM. |
|
06-05-2020, 06:11 AM | #11 | |
Junior Member
Posts: 3
Karma: 12
Join Date: Feb 2017
Device: Pocketbook Touch Lux 3
|
Quote:
For those, who like to go down this road. The appropriate format was: Code:
{author_sort:sublist(0,1,&)}_{title} Code:
save_template_title_series_sorting = u'strictly_alphabetic' |
|
Tags |
recipe, template |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
WSJ (paid) recipe - request for filename/title change | stualden | Recipes | 4 | 09-13-2019 10:53 AM |
Change filename template in Calibre's library | 8140david | Library Management | 3 | 09-25-2016 12:39 PM |
Feature Request: preserving original filename | Giuseppe Chillem | Calibre | 23 | 01-16-2013 03:45 AM |
Feature request: change filename | Fitz | Library Management | 11 | 07-19-2011 05:21 PM |
filename template feature | artbatista | Calibre | 0 | 08-23-2009 02:05 PM |