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 01-09-2022, 10:37 AM   #1
Buhaj47
Zealot
Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.
 
Buhaj47's Avatar
 
Posts: 149
Karma: 278068
Join Date: Dec 2014
Location: Poland
Device: Kindle PW3, Kobo Libra 2
Adding hyphen to file name

I have the following string set up when sending ebooks to my Kobo:

Code:
{author_sort[0]}/{author_sort}/{series}/{series_index:0>4.1f} {title}
How can I add a hyphen between the series and title that will only be included if there's a series?

Last edited by Buhaj47; 01-09-2022 at 10:44 AM.
Buhaj47 is offline   Reply With Quote
Old 01-09-2022, 12:08 PM   #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: 31,054
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
It is in the user manual under Template (language)
Code:
Using this syntax, we can solve the above no-series problem with the template:

{series}{series_index:| - | - }{title}
theducks is offline   Reply With Quote
Old 01-09-2022, 01:01 PM   #3
Buhaj47
Zealot
Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.Buhaj47 ought to be getting tired of karma fortunes by now.
 
Buhaj47's Avatar
 
Posts: 149
Karma: 278068
Join Date: Dec 2014
Location: Poland
Device: Kindle PW3, Kobo Libra 2
I've seen that but couldn't apply it to the code above.

Wysłane przez Tapatalka
Buhaj47 is offline   Reply With Quote
Old 01-09-2022, 02:47 PM   #4
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: 31,054
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Buhaj47 View Post
I've seen that but couldn't apply it to the code above.

Wysłane przez Tapatalka
Why not? you just edit the template items you have . the | are conditional deliminator.
Nul field value, the symbol is not included.
theducks is offline   Reply With Quote
Old 01-09-2022, 07:41 PM   #5
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Buhaj47 View Post
I've seen that but couldn't apply it to the code above.
Do you mean you could see how to combine the formatting of the index with the addition of the dashes? If so, the following is what you want:
Code:
{series}{series_index:0>4.1f| - | - }{title}
I had to test it myself as I didn't know where the format string should go.
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with regex for adding in a hyphen africalass Library Management 2 08-06-2020 09:11 AM
[iOS] Adding Books to Hyphen reader tdanzie Calibre Companion 4 01-18-2017 10:32 AM
Adding file... KyBunnies Library Management 1 05-25-2015 02:49 PM
adding a file Notjohn Sigil 4 12-19-2014 09:21 AM
Can't save after adding file phossler Editor 2 12-25-2013 12:24 PM


All times are GMT -4. The time now is 01:29 AM.


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