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 07-19-2016, 09:12 AM   #1
commandante
Member Retired
commandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of light
 
Posts: 18
Karma: 12050
Join Date: Nov 2013
Device: none
"calibredb catalog" and customized column with template

Hi,

I have configured a custom column to display just the year of the pubdate of the ebook. My configuration is like this:

Click image for larger version

Name:	commandante custom configuration.JPG
Views:	129
Size:	96.5 KB
ID:	150326

As I was getting a lot of "BAD DATE" results inside the column, I changed how the dates were displayed with this (https://www.mobileread.com/forums/sho...postcount=16):
Code:
# Control how dates are displayed
gui_pubdate_display_format = 'yyyy-MM-dd'
gui_timestamp_display_format = 'yyyy-MM-dd hh:mm:ss'
gui_last_modified_display_format = 'yyyy-MM-dd hh:mm:ss'
From what I understand these modifications only affect the gui version of calibre. When I use "calibredb catalog", I get "BAD DATE" results. Is there a way to apply these gui settings with "calibredb catalog"? So that I can export a catalog with a column that only contains the year of the pubdate?

Thanks,

Last edited by WT Sharpe; 07-19-2016 at 07:45 PM.
commandante is offline   Reply With Quote
Old 07-19-2016, 11:01 AM   #2
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
You need to extract the date with function raw_field(field).

program:
format_date(raw_field('pubdate'),'yyyy')
Divingduck is offline   Reply With Quote
Advert
Old 07-19-2016, 03:41 PM   #3
commandante
Member Retired
commandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of lightcommandante is a glorious beacon of light
 
Posts: 18
Karma: 12050
Join Date: Nov 2013
Device: none
Thanks!
commandante is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom column: "pubdate" and "ifempty" StillReading Library Management 3 04-07-2015 01:04 AM
command line "calibredb catalog" problems Divingduck Calibre 12 12-26-2014 05:01 PM
Using "Build column from other column" custom-column type HFC3 Library Management 3 07-07-2013 03:11 AM
Custom column: "Updated date", when adding new "versions" of the same file? enriquep Library Management 16 11-03-2011 10:46 AM
Show us your "Customized" Opening & Closing AJ Starr Astak EZReader 59 10-23-2009 12:31 AM


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


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