![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 52
Karma: 8426
Join Date: Feb 2013
Location: Belgium
Device: none
|
Need a little help with saving to disk
I'm using this template :
{author_sort}/{title}/{author_sort} - [{series} {series_index:0>3s}] {title} But that doesn't look nice when the book has no series. example : Thiesler, Sabine - [ ] Bewusstlos How can I tune this so that if series = null, it won't show series information ? Even better would be that if there is no series it would write the publishing date example : Thiesler, Sabine - (2012) Bewusstlos Last edited by svda; 02-24-2014 at 05:53 AM. |
![]() |
![]() |
![]() |
#2 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,895
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
Code:
{series:| [|] } {series_index:0>3s} |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 52
Karma: 8426
Join Date: Feb 2013
Location: Belgium
Device: none
|
Thankyou DoctorOhh !!!!!
I tuned it some more to : {author_sort}/{title}/{author_sort} - {series:| [| {series_index:0>3}] } {pubdate} {title} Now I get : Kellerman, Jonathan - [Alex Delaware 001] (2012) Blackout.epub and Fitzek, Sebastian - (2008) Der Seelenbrecher.epub Which is quite a nice result! I noticed however that when no pubdate is available, I get (101) Fitzek, Sebastian - (101) Das Kind.epub So very happy already. If I could get it to show the pubdate only when there is no series, that would be awesome. |
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,950
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
FWIW 1/1/101 is the 'unassigned' date for datetypes
|
![]() |
![]() |
![]() |
#5 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Use general program mode:
PHP Code:
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
I use this one.
Code:
{author_sort}/{author_sort}{series:| - |} {series_index:0>2s} - {title} {tags:| (|, } {languages:||, } {:'format_date(raw_field('pubdate'),'yyyy')'||)} Author_sort - Series - Series No - Titel (Tag, ... ,languages, ... , Pubdate) You only need to fix your "[" "]" and number of digits. Last edited by Divingduck; 02-25-2014 at 06:37 AM. |
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 52
Karma: 8426
Join Date: Feb 2013
Location: Belgium
Device: none
|
Thanks so much everyone. Gonna try this tomorrow and I will let you know! :-)
|
![]() |
![]() |
![]() |
#8 | |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
You are right, I had overlook that detail.
|
![]() |
![]() |
![]() |
#10 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 52
Karma: 8426
Join Date: Feb 2013
Location: Belgium
Device: none
|
Here's my feedback :
@Divingduck, your template only shows the right ")" and is not condtional I'm experimenting a bit with my brackets, but I'm still not there. @eschwarz, your solution is missing the {title} at the end of the string I want to write. Otherwise, perfect! Haven't found out yet where to put the last {title} I'm trying to learn from the examples I get, so thanks to both of you. |
![]() |
![]() |
![]() |
#11 | |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
PHP Code:
(I also fixed an error where the date didn't have a space appended to separate it from the title.) If you are trying to learn how this all works, a good resource is the calibre manual entry on templates, which also lists the different functions available. See here: http://manual.calibre-ebook.com/template_lang.html and ask questions if you need help understanding how it all works! ![]() Last edited by eschwartz; 02-26-2014 at 02:26 PM. |
|
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
@svda, this is possible, but only if you had no tags for your books. This is a situation I do not have for both tags and pubdate.
The example I gave use "(" by starting with a tag and ")" by ending with pubdate You can modify it e.g. this way to have only the year in Code:
{author_sort}/{author_sort}{series:| - |} {series_index:0>2s} - {title} {tags:| |, } {languages:||, } {:'format_date(raw_field('pubdate'),'yyyy')'|(|)} |
![]() |
![]() |
![]() |
#13 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 52
Karma: 8426
Join Date: Feb 2013
Location: Belgium
Device: none
|
I must say I am really very impressed with both of your knowledge and help. Many thanks!
@eschwartz : tried and approved! ![]() @Divingduck : going to try yours out also ... |
![]() |
![]() |
![]() |
#14 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 52
Karma: 8426
Join Date: Feb 2013
Location: Belgium
Device: none
|
How do you guys trap missing dates (pubdate) ?
|
![]() |
![]() |
![]() |
#15 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
I am using different data sources like author or publisher's webpage, wiki, library services like dnb.de (for German books), isbn.com plugin and the book itself (especially before updating these data in a book). Sometimes it is difficultly to get accurate metadata, e.g. for historical books like here at MR, Gutenberg … if a contributor does not name the exact source of a digitalized text for an ebook
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Saving to Disk From Calibre | mitch13 | Library Management | 7 | 11-14-2013 11:54 PM |
Saving to Disk | LRC1962 | Library Management | 1 | 06-20-2012 07:58 PM |
Saving to Disk | paulfiera | Calibre | 3 | 07-20-2011 10:21 AM |
Losing files when saving saving to disk | theaccountant | Library Management | 4 | 03-10-2011 02:38 PM |
Saving to disk | htaylor | Calibre | 2 | 01-04-2009 08:29 PM |