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 12-17-2017, 06:47 AM   #1
reup
Connoisseur
reup began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Jul 2009
Device: hp ipaq hx2750
saving book to disk remove empty sting

hi all,

I usually save my books to disk before copying them to my devices (I do not manage the devices with calibre but manually)
this below is the config I use to rename the files

{author} - {series} - {series_index} - {title}

perfect when I have a series like
Jack Campbell - Lost Fleet, The - 1 - Dauntless.epub
Jack Campbell - Lost Fleet, The - 2 - Fearless.epub

but a bit of a problem when the file is a single file like
Thomas A. Mays - - - Sword Into Darkness, A.epub

any way to remove the - - - ?

reup
reup is offline   Reply With Quote
Old 12-17-2017, 11:26 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,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
From the tutorial (open the template editor and use the Tutorial link at the bottom)

Code:
For example, assume you want to use the template:

{series} - {series_index} - {title}

If the book has no series, the answer will be - - title. Many people would rather the result be simply title, without the hyphens. To do this, use the extended syntax {field:|prefix_text|suffix_text}. When you use this syntax, if field has the value SERIES then the result will be prefix_textSERIESsuffix_text. If field has no value, then the result will be the empty string (nothing); the prefix and suffix are ignored. The prefix and suffix can contain blanks. Do not use subtemplates (`{ … }`) or functions (see below) as the prefix or the suffix.

Using this syntax, we can solve the above series problem with the template:

{series}{series_index:| - | - }{title}

The hyphens will be included only if the book has a series index, which it will have only if it has a series.
theducks is offline   Reply With Quote
Advert
Old 12-22-2017, 04:10 AM   #3
reup
Connoisseur
reup began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Jul 2009
Device: hp ipaq hx2750
tested. this works perfectly

thank you very much

Reup
reup is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving to disk svda Library Management 6 04-10-2015 07:42 PM
Saving to disk guaranis Library Management 2 08-05-2014 05:44 AM
Need a little help with saving to disk svda Conversion 35 03-03-2014 03:08 PM
Losing files when saving saving to disk theaccountant Library Management 4 03-10-2011 02:38 PM


All times are GMT -4. The time now is 05:23 AM.


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