03-05-2013, 12:22 AM | #1 |
Groupie
Posts: 156
Karma: 10001
Join Date: Feb 2011
Device: sony
|
How to clean up junk indentifier types?
I've been ignoring all the junk identifier types that have appeared in the identifiers field long enough -- so now I want to get rid of a few hundred of them (mostly ISBNs but other cruft too).
I don't see any easy way to do it though. I was thinking the most likely would be to use the Bulk Edit Search & Replace function to back up the few I want to keep in spare columns, then just blank the whole identifiers field. But the only way I see to blank the whole field is one book at a time via Edit Metadata. Alternatively, removing the identifier types one at a time via Search and Replace is too tedious to contemplate. Is there another way I've overlooked? (Am I really the only person with this problem? The cruft comes from mainstream retail epubs, so I find that hard to believe.) |
03-05-2013, 01:20 AM | #2 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@capnm - yeah I do the same thing for the same reasons, and yeah they are a pain to remove. It has you cursing the teeny tiny identifiers textbox in the Edit Metadata dialog when you edit them one by one and try to find the right place in the very long line to chop them out of
I tend to use the tag browser, click on them one at a time to bring up the matching set of books for that identifier and then do the edit as you say. I know there is limited space on that dialog, but they are the sort of data that you want in a list to easily click on an X to delete etc, dunno how it would fit in though without making it a popup. |
Advert | |
|
03-05-2013, 06:32 AM | #3 |
Grand Sorcerer
Posts: 11,745
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I submitted code changes to permit arbitrary changes to the identifiers field in bulk search/replace. If the source field is not "identifiers" and the destination field is "identifiers" and the destination identifier is "*", then the result of the search/replace is used to replace the entire identifiers field. To empty the field, use "{template}" as the source field, ".*" as the search for string, "identifiers" as the destination field, and "*" as the destination identifier.
Note that you can construct any set of identifiers you wish in the search/replace operation, making it possible to remove all but some identifiers. Note also that the string used to generate the resulting identifiers field must be a (possibly null) comma-separated set of colon-separated pairs of strings. |
03-05-2013, 08:42 AM | #4 |
Groupie
Posts: 156
Karma: 10001
Join Date: Feb 2011
Device: sony
|
That's slick, thanks!
So to keep just isbn & goodreads, is this correct? Search field: {template} Template: {isbn:|isbn:|, }{identifiers:select(goodreads)|goodreads:|} Search for: empty Replace with: empty Destination field: identifiers Identifier type:* Mode: Replace field Split Result: Unchecked Do I care about this possibly creating an extraneous trailing comma? |
03-05-2013, 09:57 AM | #5 | ||
Grand Sorcerer
Posts: 11,745
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
|
||
Advert | |
|
05-31-2014, 12:28 PM | #6 |
Connoisseur
Posts: 99
Karma: 280
Join Date: Nov 2010
Device: iPhone6, iPadMiniRetina, KindlePW3, KoboGloHD
|
Many thanks for this. I did discover two minor changes to the formula above that are required for Calibre 1.39. I wanted to keep the ASIN so here's what worked for me:
Search field: {template} Template: {isbn:|isbn:|, }{identifiers:select(amazon)|amazon:|} Search for: {template} Replace with: empty Destination field: identifiers Identifier type:* Mode: Replace field Split Result: checked With values separated by:, (i.e., a comma followed by a space) |
06-02-2014, 05:14 PM | #7 |
Coffee Girl
Posts: 16
Karma: 10
Join Date: May 2014
Device: no money for such things
|
It is possible at this time, using latest Version of Calibre for Windows (1.39) get rid of Identifiers that do not have a identifier prefix?
example: isbn:9780310231202, 0310231205:0310231205 Is it possiible to get rid of all identifiers that do not have a prefix like "isbn:", "amazon:" etc? Please note the example above has a "junk prefix "0310231205:" If it is not possible to this on Calibre right now, is there any free sqlite database editor what would allow me to do this? Thank you very much in advance for any help. |
06-03-2014, 12:07 AM | #8 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Just edit it normally. There is no way for calibre to know what is a "junk identifier".
Copying it into a text editor or Word should help you see what you are dealing with a little better than scrolling through the tiny edit box. |
06-03-2014, 12:24 AM | #9 | |
Grand Sorcerer
Posts: 11,745
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
The "good list" technique would use the template approach above to select out the ones you wish to keep. |
|
06-03-2014, 08:23 AM | #10 | |
Coffee Girl
Posts: 16
Karma: 10
Join Date: May 2014
Device: no money for such things
|
Quote:
You have helped me a whole lot! a BIG! Thank you! |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessories Don't buy that junk! | pewterbot9 | enTourage Archive | 14 | 05-29-2011 09:06 AM |
Short Fiction Martinez, Brian: A Good Clean, A Harsh Clean. v1. PDF, 13th Dec 2010 | BrianMartinez | Other Books | 0 | 12-13-2010 09:27 PM |
Short Fiction Martinez, Brian: A Good Clean, A Harsh Clean. v1. 13th Dec 2010 | BrianMartinez | Kindle Books | 0 | 12-13-2010 09:25 PM |
Short Fiction Martinez, Brian: A Good Clean, A Harsh Clean. v1. 13th Dec 2010 | BrianMartinez | ePub Books | 0 | 12-13-2010 09:23 PM |
PRS 600 JUNK | farmersteve | Sony Reader | 76 | 01-17-2010 07:34 AM |