Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
Old 09-09-2023, 10:48 AM   #1
chris33
Enthusiast
chris33 began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Sep 2020
Device: ipad, kobo libra 2
Lightbulb saving books to disk template

Hi,

I’m wondering if in preferences/saving books to disk the default template can be different for different libraries ?


Also if I set the template to:
{series}-{series_index}-{title}-{author} for instance
and the series, series_index and author are empty for some entries, then my file name will look like:

- - title -

Is there a way to avoid hyphens without values before/after (conditional template)?
chris33 is offline   Reply With Quote
Old 09-09-2023, 11:46 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,958
Karma: 55705602
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
https://manual.calibre-ebook.com/faq...lder-structure

Those templates are for EXTERNAL devices and those that do not have a workable Save to Device driver.
theducks is offline   Reply With Quote
Advert
Old 09-09-2023, 12:15 PM   #3
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: 11,776
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by chris33 View Post
Also if I set the template to:
{series}-{series_index}-{title}-{author} for instance
and the series, series_index and author are empty for some entries, then my file name will look like:

- - title -

Is there a way to avoid hyphens without values before/after (conditional template)?
See the calibre template language documentation, in particular the Advanced Formatting section that describes how to include conditional text.
chaley is offline   Reply With Quote
Old 09-09-2023, 01:38 PM   #4
chris33
Enthusiast
chris33 began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Sep 2020
Device: ipad, kobo libra 2
@theducks
I'm using a docker container for calibre server on my NAS and export files on a network share, then files are moved to the devices

@chaley

Quote:
Originally Posted by chaley View Post
See the calibre template language documentation, in particular the Advanced Formatting section that describes how to include conditional text.
Yes thank you.
It should look like this:
Code:
{series}{series_index:| - | - }{title} - {authors}
I tried with the template editor too but not able to do what I expect.
I would like to insert () around series/series_index like

(series - series_index) - title - authors

I tried:
Code:
{series}{series_index:(| - |) - }{title} - {authors}
The opening parenthesis will fail, the closing works.
chris33 is offline   Reply With Quote
Old 09-09-2023, 02:26 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,958
Karma: 55705602
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Look at Save To Folder
This was made to more mimic a device that might not behave as needed over USB. This also uses the template language. All the Send to... store their configurations in the Config folder. Each 'device' will have a 'driver' file

Note: You need to 'eject' this device to get it disconnected (On Device column goes away)
theducks is offline   Reply With Quote
Advert
Old 09-09-2023, 04:34 PM   #6
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: 11,776
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by chris33 View Post
I tried:
Code:
{series}{series_index:(| - |) - }{title} - {authors}
The opening parenthesis will fail, the closing works.
put the opening parenthesis in the series segment, as it is to go before that value.
Code:
{series:|(| - }{series_index:||) - }{title} - {authors}
chaley is offline   Reply With Quote
Old 09-10-2023, 03:40 AM   #7
chris33
Enthusiast
chris33 began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Sep 2020
Device: ipad, kobo libra 2
Quote:
Originally Posted by chaley View Post
put the opening parenthesis in the series segment, as it is to go before that value.
Code:
{series:|(| - }{series_index:||) - }{title} - {authors}
Perfect!
chris33 is offline   Reply With Quote
Reply

Tags
calibre settings template


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rating-template and saving to Disk Tanjamuse Library Management 0 01-09-2020 04:04 AM
Saving books to disk thomcuccureddu Library Management 0 03-18-2019 02:50 PM
Question about saving books to disk Ispanderion Library Management 8 08-25-2018 08:20 AM
Help with a 'Saving Books to Disk' Template Vortex Calibre 5 12-04-2014 09:18 AM
Saving to Disk Template hurricane51 Conversion 2 07-07-2011 01:22 AM


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


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