02-27-2014, 03:34 PM | #16 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
02-28-2014, 02:54 AM | #17 |
Connoisseur
Posts: 52
Karma: 8426
Join Date: Feb 2013
Location: Belgium
Device: none
|
Yes, no date => blank
Last edited by svda; 02-28-2014 at 11:50 AM. |
Advert | |
|
02-28-2014, 02:08 PM | #18 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Right, so what's the problem? It's already doing that. If pubdate is undefined, it will be left out. Although I did discover that the space between the author and the title, if there is no series or pubdate, is missing, so I migrated it out of the ifempty test. Fixed version:
Code:
program:
strcat(
template("{author_sort}/{title}/{author_sort} - {series:|[|}"),' ',
ifempty(
finish_formatting(
field("series_index"),
'0>3',
'',
'] '
),
finish_formatting(
format_date(
field('pubdate'),
'yyyy'),
'',
'(',
') '
)
),
field('title')
)
|
03-01-2014, 03:27 AM | #19 |
Connoisseur
Posts: 52
Karma: 8426
Join Date: Feb 2013
Location: Belgium
Device: none
|
Didn't even notice that. Thank you eschwartz.
When the pubdate is unknown it results in pubdate (101) As mentioned by theducks: FWIW 1/1/101 is the 'unassigned' date for datetypes Last edited by svda; 03-01-2014 at 03:30 AM. |
03-01-2014, 10:10 PM | #20 | |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
I'll try to come up with something to fix this. |
|
Advert | |
|
03-01-2014, 10:40 PM | #21 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Try this:
PHP Code:
@theducks why is 1/1/101 the unassigned datetype? Do you have any idea why I have the empty string for an unassigned date? I am using linux if it makes a difference. Last edited by eschwartz; 03-01-2014 at 10:45 PM. |
03-01-2014, 10:45 PM | #22 |
Well trained by Cats
Posts: 29,660
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
03-01-2014, 10:49 PM | #23 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
03-02-2014, 12:23 AM | #24 |
Well trained by Cats
Posts: 29,660
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
03-02-2014, 12:29 AM | #25 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
03-02-2014, 12:55 AM | #26 | |
null operator
Posts: 20,420
Karma: 25894272
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Like theducks said, there's some under handed information hiding going on behind the scenery to cause the undefined date "01010101T00:00:00' to be presented as 'blank/null/empty/vacuas' - might be Qt. So where do you see this 'empty string' ? And what is an 'empty string' - pointer to a location with zero length, something that looks like "", null pointer...? BR Last edited by BetterRed; 03-02-2014 at 01:10 AM. |
|
03-02-2014, 12:55 AM | #27 |
Connoisseur
Posts: 52
Karma: 8426
Join Date: Feb 2013
Location: Belgium
Device: none
|
Sorry, I don't have access to my computer this weekend. I will try this monday asap.
|
03-02-2014, 01:13 AM | #28 | |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
See screenshot of my dedicated library for testing templates on blank records. I play around enough, mostly for other people, that I finally took the plunge. Am I crazy? EDIT: See second screenshot, for debugging I used Code:
ifempty(pdate,'[[pubdate-is-empty]] ') Last edited by eschwartz; 03-02-2014 at 01:25 AM. |
|
03-02-2014, 02:03 AM | #29 | |
null operator
Posts: 20,420
Karma: 25894272
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Go to other end of the food chain, and look at what's in the database. If you can't to do that, save a csv catalogue that has pubdate and load into Excel (or your favourite text editor) or similar - see attached. Then work back up the chain to see where the transform happens. Maybe none of this will explain why you and the OP are getting different results - but it may give a glimmer of a hint - no idea what though. Do you happen to know how to enter a published date earlier than 1st Jan 1000CE into calibre? Ψ² BR Last edited by BetterRed; 03-02-2014 at 02:08 AM. Reason: grammar |
|
03-02-2014, 02:30 AM | #30 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
If I look at the pubdate column, it shows 100-12-31T18:00:00 by all blank entries. NO need for SQLite Browser.
Apparently the magic is only happening on my computer? And you can edit whatever date you want in the individual edit metadata. Or at least, you get 0101 through to 7999. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
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 |