![]() |
#16 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,115
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
last_modified will update if you run Library maintenance .
There is so much that triggers that status. Using the OS dir recursive on the Library and feeding that to a script is the best I can think of dir <librarypath> /s/w |
![]() |
![]() |
![]() |
#17 |
Member
![]() Posts: 11
Karma: 10
Join Date: Aug 2018
Device: samsung tablet 8", kitkai
|
This is exactly what I did in the script above, but with calibre book insertion date instead of last_modified that I lost as you know.
Still not acceptable, but better than nothing. As I said, I will try to find where is stored this "last_modified" information, to try to correct it from an older backup. Using a "MAX()" will be a plus if it is true that book insertion date in calibre could change too in some situations (not sure of that, but I did read something about it, I forgot where). But if you know where it is, I will take it :-) Surely not in the metadata.opf, I just made a test. So it should be in the epub file itself Just found something: In main DB (metadata.db, a SQLite 3.0 database, which is at the root of your library). The table "Books" seems to contain this "last_modified" field. Too late today, but I will confirm with a few books after making some metatadata changes. If confirmed, it will be easy to extract this date from the DB. bod. Last edited by bodiccea; 08-26-2018 at 05:42 PM. |
![]() |
![]() |
![]() |
#18 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,796
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@boudicca - the 'timestamp/Date' is set to the system timestamp when the book is first added to the database, after which it isn't changed by calibre internally. However it is user modifiable. Some users re-purpose it to be the date they finished reading the book. Some re-purpose it to be the date they purchased the book, which may be before or after they added the 'book' record to the database.
It is almost certain that you didn't 'lose' calibre's last_modified date in your books, you did something (singular) that rippled (propagated) a metadata change through multiple (all) books. It will happen again. BR |
![]() |
![]() |
![]() |
#19 | |
Member
![]() Posts: 11
Karma: 10
Join Date: Aug 2018
Device: samsung tablet 8", kitkai
|
@BetterRed,
I know it did not disappear by magic. It you re-read the thread, I wrote before (message #10): Quote:
|
|
![]() |
![]() |
![]() |
#20 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,796
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I just wanted to be sure you understood that some changes can result in the last_modified date being updated for every book in a library.
For example if you have a column with a fixed set of values, (red, blue, green) and you decide to add some values to the allowable values (black, white), then every book in the library will have its last_modified value set to system time when you committed the change to the column definition. It was that 'feature' and a couple of other's that led me to create my '#last_change' column, which incidentally has a companion column '#what_changed'. BR Last edited by BetterRed; 08-28-2018 at 04:34 AM. |
![]() |
![]() |
![]() |
#21 |
Member
![]() Posts: 11
Karma: 10
Join Date: Aug 2018
Device: samsung tablet 8", kitkai
|
Solution chosen
@BetterRed,
I decided the lazy way, there are dependencies in database (which prevents to change directly the last_modified field, and I don't want to spend time to look at them in the code. I simply removed all my libbrary, restored a 2 months old DB (with the books) of that time. A few books (less than 10) are missing, but it will be easy to find which ones, as I removed them from ZZ-TODO on https://ebooks.raoult.com when I moved them to my own DB. I will compare the missing files in ZZ-TOTO to those present 2 months ago, so I will take seconds to add them again. I changed also the template to export to disk to: {languages}/{:'format_date(raw_field('last_modified'),'yyyyMMd dhhmm')'}-{author_sort} - {series:|(| } {series_index:0>2s|#|) - }{title} There was no other way to get a full date/time for last_modified, as interface "Export to Disk", the field "File Format to save" is just a limited one, with only %Y, %b, %m, %d available (year, month name, month number, and day number). I don't understand why they don't use the same format as format_date() function, as the function exists. First I will create DB for the 2 sets in ZZ-TODO to remove the duplicates with my own library, I believe there are thousands. Not urgent, I will improve my own backup script first, Subject closed then.. br. Last edited by bodiccea; 09-01-2018 at 04:11 AM. Reason: added link |
![]() |
![]() |
![]() |
Tags |
calibre, export date format |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Add a book" template like "Save to disk"? | vr8ce | Library Management | 10 | 06-09-2017 08:16 AM |
Title format in "save book to disk"? | Phssthpok | Library Management | 5 | 11-26-2014 05:18 AM |
Request: separate "Preferred output format" from "Save to Disk" format | Katsunami | Calibre | 2 | 08-24-2014 11:23 AM |
"Save single format to disk" trouble | vbdasc | Calibre | 2 | 12-01-2010 02:30 AM |
Propagate a new "Save to Disk" Folder Structure using Calibre? | Trickery | Calibre | 3 | 09-11-2010 09:27 PM |