04-12-2021, 05:47 PM | #1 |
Connoisseur
Posts: 84
Karma: 38050
Join Date: Sep 2016
Device: Kindle
|
Automatically keeping earliest date in a merge
Hi,
It's been a while since I did any tinkering on Calibre. I'm trying to merge multiple older libraries with a lot of overlapping books. From what I've found, it seems like the order should be: 1. Start with the oldest library as the base library. 2. Setup the 'Add books' task as desired: make duplicate entries or not, ignoring copies, or copying the newest file, etc 3. Switch to the newer library. Copy books from the newer library to the base library using 'Copy to Library'. 4. Since the first two libraries I'm merging are nearly identical, the biggest piece of information I want to keep is whichever #timestamp is the earliest. So I made a custom column, #orig_entry_date, default value empty. The most straightforward method I've found would be to do a bulk edit copy of #date or #timestamp to #orig_entry_date. While there is a #last_modified field, neither #date or #timestamp are available options in bulk edit. Is that correct behavior? What would I have to do instead? Eventually, I would want to be able to compare the two #timestamp fields from each book and use the earliest one. I could use some pointers on getting started (a Tweak or something else, etc?). Thank you! Thank you!! |
04-12-2021, 09:15 PM | #2 |
creator of calibre
Posts: 44,319
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
pubdate is available this corresponds to the published column. timestamp is not this is the Date column. Merging in any case preserves date IIRC, though experiment to check.
|
Advert | |
|
04-15-2021, 03:33 AM | #3 |
Connoisseur
Posts: 84
Karma: 38050
Join Date: Sep 2016
Device: Kindle
|
Thanks for response! To clarify, I'm looking for the earliest date that the book was added to the various Calibre library databases. I thought pubdate is the date the book is published by a publisher or book author, etc. Am I mistaken about that?
|
04-15-2021, 03:49 AM | #4 |
creator of calibre
Posts: 44,319
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
yes pubdate is published. As I said date shouldbe preserved automatically when merging.
|
04-16-2021, 05:29 AM | #5 |
Connoisseur
Posts: 84
Karma: 38050
Join Date: Sep 2016
Device: Kindle
|
Sorry, but there's still some confusion. In this case, I do not care about the date a book was published by an official source (author, publishing company, etc). I only care about choosing/finding the earliest date a book record was created in my Calibre databases in merging books. Currently, the only way I know is to manually select the merge order in order to retain the earliest date.
If #date column IS the correct field to use for book creation date in the database, my problem then is that it doesn't show up in my list of available Bulk Edit Search fields. The only default date fields that appear on the list are #pubdate and #last_modified. Is #date supposed to be listed there? Thanks |
Advert | |
|
04-16-2021, 07:41 AM | #6 | |
null operator (he/him)
Posts: 20,923
Karma: 27620686
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
The column you want is Date/timestamp But IIRC it isn't available in Bulk Edit Search & Replace, and I don't remember why. But nor do I see how it would help you with your Merge issue. BR |
|
04-16-2021, 09:53 AM | #7 |
Well trained by Cats
Posts: 30,355
Karma: 58032210
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
{date} does not show in Bulk mode because that would apply to all selected.
Timestamp will remain on a merge (at destination), so the direction of a merge is important. If you use Find Duplicates: Sort the results on 'Date' column, them select the top one FIRST (the first selected is the destination)as part of the Merge. (assumes sort arrow low.High) You DO have to do this Book by Book. But it does not take that much time per book. (And it will remind you to never let things get that out of whack in the future ) |
04-16-2021, 01:32 PM | #8 | |
Wizard
Posts: 1,134
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Quote:
@ meghane_e : If you want to control the sorting with the Find Duplicates plugin, do the following:
|
|
04-16-2021, 03:14 PM | #9 |
Well trained by Cats
Posts: 30,355
Karma: 58032210
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
@Capink
I run it in the only show 1 Group at a time, so sorts will work in that mode |
04-16-2021, 04:29 PM | #10 |
Wizard
Posts: 1,134
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
You are right. I checked and the sort you chose will still be intact because the calibre applies a multisort and the plugin pumps the marked field to the top of sort while keeping the previous sort columns next in the stack.
|
04-17-2021, 05:32 PM | #11 |
Connoisseur
Posts: 84
Karma: 38050
Join Date: Sep 2016
Device: Kindle
|
Guess it's not as straight-forward an operation as I was hoping. Basically, I've ended up with several "backup" copies of my Libraries on multiple drives and have had a couple of hardware failures over the years, etc. The result is there are several thousand overlapping entries but there are also a number of no-longer available books (due to publisher closures) that slipped through the cracks.
@BetterRed: Sorry, I should have used italics for column instead of #. @theducks: I'll checkout the Find Duplicate plugin functionality you suggested. @caplink: After that, you can manually merge the books group by group ... Any thing going wrong is totally your responsibility. Also note that this merges all duplicate groups, so you have to weed out the groups (By marking them as exempt) you do not want merged before using the export feature. This might have some potential. But I'll poke around first before I come back to bug you with it. Appreciate it! I know enough Python and some Template language to try cooking my own, but it will take me some time to figure out what's involved and where the code needs to go. So it will be another couple of weeks before I feel prepared enough to ask for more specific help. Inspiration is, of course, welcome. *sigh* Either that or I'll have finished it manually! LOL Thanks again, everyone! Last edited by meghane_e; 04-17-2021 at 05:33 PM. Reason: punctuation |
04-17-2021, 06:32 PM | #12 |
Connoisseur
Posts: 84
Karma: 38050
Join Date: Sep 2016
Device: Kindle
|
One quick question(not solution):
I've created a custom column, #date_added, using 'Column built from other columns' set to {timestamp}. If the timestamp changes, will the #date_added column also change? Is it overkill to make a second custom column that I basically save a copy of the #date_added fields (Bulk Search/Replace copy)? Thanks! I guess my plan now is: a. Start with Library A (earliest one). b. In Library A in Control Adding books, setup Adding Actions, 'Create new record for each duplicate format'. Research 'Rules to filter added files' to see about date comparing. c. Copy Library B to Library A. d. At least this way, after merging two Libraries, even if the timestamps are changed, I have the originals. Last edited by meghane_e; 04-17-2021 at 06:33 PM. Reason: punctuation |
04-17-2021, 06:59 PM | #13 | |||
null operator (he/him)
Posts: 20,923
Karma: 27620686
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Quote:
Quote:
I add new books into an Intake library, then use the inter-library feature in the Find Duplicates plugin, if there is a potential duplicate I use the CalibreSpy to look at the existing book in the Target library and resolve it manually. BR |
|||
Tags |
copy date |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automatically Setting Date field to file creation date when importing. | Marc_G2 | Library Management | 6 | 07-25-2020 10:35 PM |
Keeping date order? | palazzo | Library Management | 6 | 11-03-2017 01:02 PM |
Keeping date order on new Kindle | palazzo | Devices | 12 | 04-27-2016 11:08 AM |
Automatically Advance Date? | CountZero | Library Management | 1 | 05-27-2013 08:47 PM |
New Problem-Merge libraries and preserve date | Sydney's Mom | Library Management | 0 | 05-02-2013 08:37 PM |