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 11-27-2013, 11:24 AM   #1
the_callant
Connoisseur
the_callant has learned how to buy an e-book online
 
Posts: 68
Karma: 94
Join Date: Dec 2008
Location: Scottish Borders
Device: Kindle Oasis/Kindle Scribe/Kindle PW Signature
Dates in Calibre

Is there a simple way to automatically add or change a date within calibre. I have created a custom column which gives the date that a book is added to my Calibre Library. I have been manually entering this date when I have added books, so I now have a column where sometimes there is a date, but sometimes it is blank. Is there a way of setting up a script which would check if the field was empty, then copy across the existing date field content if it is empty and automatically set the date added to the todays date when I add the book?
The first question really is can it be done?
If it can is there a prewritten script or where would i look to try and create one?
the_callant is offline   Reply With Quote
Old 11-27-2013, 11:27 AM   #2
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Why are you trying to do this? There is already a standard field that is setup whenever a book is added.
itimpi is offline   Reply With Quote
Advert
Old 11-27-2013, 11:40 AM   #3
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: 30,454
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
The Date column is the Date the record in Calibre was created.
For most people, this is the date a book was added.

I say most because some of us use Calibre track other (dead tree) books or build a wishlist (Using an 'Empty Book')

Last edited by theducks; 12-01-2013 at 10:49 AM. Reason: typo
theducks is offline   Reply With Quote
Old 12-01-2013, 06:13 AM   #4
the_callant
Connoisseur
the_callant has learned how to buy an e-book online
 
Posts: 68
Karma: 94
Join Date: Dec 2008
Location: Scottish Borders
Device: Kindle Oasis/Kindle Scribe/Kindle PW Signature
Quote:
Originally Posted by itimpi View Post
Why are you trying to do this? There is already a standard field that is setup whenever a book is added.
There is a date field, but it does not always show the date a file is added. I assume from observations that it only enters a value if no value is present. If there is a value already in the metadata then it uses this.
the_callant is offline   Reply With Quote
Old 12-01-2013, 07:56 AM   #5
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,043
Karma: 7548549
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by the_callant View Post
Is there a simple way to automatically add or change a date within calibre. I have created a custom column which gives the date that a book is added to my Calibre Library. I have been manually entering this date when I have added books, so I now have a column where sometimes there is a date, but sometimes it is blank. Is there a way of setting up a script which would check if the field was empty, then copy across the existing date field content if it is empty and automatically set the date added to the todays date when I add the book?
The first question really is can it be done?
If it can is there a prewritten script or where would i look to try and create one?
There is no automatic "scripting" available in calibre to modify columns. And as far as I can see, there are no easy solutions.

You could possibly do this with by replacing the file import plugins with your own. You would provide a post_import hook that would modify the date field whenever a format was imported.

You could write a user interface plugin that sets that field to "now" if the field is empty. However, this doesn't seem any better than selecting all books with the field empty then using bulk metadata edit to set the field to now.

Of course, you could change calibre itself to do what you want. You would then need to merge your changes into calibre whenever you upgrade.
chaley is offline   Reply With Quote
Advert
Old 12-01-2013, 10:33 AM   #6
the_callant
Connoisseur
the_callant has learned how to buy an e-book online
 
Posts: 68
Karma: 94
Join Date: Dec 2008
Location: Scottish Borders
Device: Kindle Oasis/Kindle Scribe/Kindle PW Signature
Quote:
Originally Posted by chaley View Post
There is no automatic "scripting" available in calibre to modify columns. And as far as I can see, there are no easy solutions.

You could possibly do this with by replacing the file import plugins with your own. You would provide a post_import hook that would modify the date field whenever a format was imported.

You could write a user interface plugin that sets that field to "now" if the field is empty. However, this doesn't seem any better than selecting all books with the field empty then using bulk metadata edit to set the field to now.

Of course, you could change calibre itself to do what you want. You would then need to merge your changes into calibre whenever you upgrade.
Thank you very much for this response. I thought I might be missing the obvious and there was a simple solution. However, your reply confirms that there is no easy way to do this.
the_callant is offline   Reply With Quote
Old 12-01-2013, 04:50 PM   #7
speakingtohe
Wizard
speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.
 
Posts: 4,812
Karma: 26912940
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
The Date added field always puts in a date when I add a book and it has always been todays date AFAIK. Pretty sure of this as I will add a bunch of books at once and I use the date field to sort by when I want to edit metadata. I didn't think date added was a standard metadata field. The last time I added a lot of books they all had opf files as I was merging libraries and still the date added was the date I added them not what was in the book or the opf file. Published is a different matter.

Either way you should be able to sort on your custom date column or type #custom column name:false in the search bar and use bulk edit to put in the date.

Helen
speakingtohe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre : comment afficher les dates en français ? Ayack Software 0 07-21-2012 02:59 PM
bad dates and incorrect periodical archiving from Calibre alison87 Amazon Kindle 1 11-21-2011 04:36 PM
Published - Dates bigbird1227 Plugins 4 08-21-2011 07:54 AM
Calibre format des dates pour les ePub Michel.L Software 2 08-22-2010 04:44 AM
Calibre format des dates pour les ePub Michel.L E-Books 0 08-14-2010 10:53 AM


All times are GMT -4. The time now is 02:17 AM.


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