![]() |
#1 |
Enthusiast
![]() Posts: 43
Karma: 10
Join Date: Aug 2013
Device: iPad
|
How to clear all Identifiers (Ids) except ISBN
I want to just retain ISBNs for the books in my library. Is there a way to "bulk remove" every Identifier except existing ISBNs?
|
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 644
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
|
The only thing that I can think of is:
I would definitely suggest trying this on a sample database. Just to make sure that it doesn't harm anything else. Maybe create a new library and then copy various sample books into it, run the regex and see what happens. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
The reason this works is because, while there is no way to replace an identifier with a subset of itself, you can use * to replace all the identifiers IF AND ONLY IF the search field is not "identifiers". So by temporarily storing the isbn in another field, you can have the isbn overwrite the whole identifiers field. (I used the comments field, because I used a test book created by importing another book from the same library. ![]() See screenshots. Last edited by eschwartz; 06-15-2014 at 08:25 PM. |
![]() |
![]() |
![]() |
#4 | ||
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
Quote:
Last edited by eschwartz; 06-16-2014 at 11:13 AM. Reason: typo |
||
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,399
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
You can also use the technique described in this thread: https://www.mobileread.com/forums/sho...d.php?t=207433
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
![]() ![]() |
|
![]() |
![]() |
![]() |
#7 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
... And yes, apparently I actually answered a question in that thread, and still didn't notice.
![]() |
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,399
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#9 |
Enthusiast
![]() Posts: 43
Karma: 10
Join Date: Aug 2013
Device: iPad
|
eschwartz, I learned something from your post (#3), but your method wipes out 'comments', and I already use that field. In fact, there isn't one single field I can unconditionally wipe out. Maybe it's possible to first create a temporary field to store the isbn value (and then throw the temporary field away.) Does this sound like a reasonable approach?
|
![]() |
![]() |
![]() |
#10 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,688
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@paul55391 - IMO that would work, its easy enough to add and delete custom columns and there's a comments like custom column type.
Custom columns are always referenced with a '#' in front of the internal name - so if yours was 'temporary' you would use #temporary instead of comments in eschwartz's post #3. BR |
![]() |
![]() |
![]() |
#11 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
A better way would be to use chaley's method, which I would've recommended if I knew it existed.
![]() Code:
Search field: {template} (YES! This exists and it is awesome!) Template: {isbn:|isbn:|} Search for: (.*) Replace with: isbn:\1 Destination field: identifiers >> Mode: Replace field, Split Result="checked" Identifier type: * Last edited by eschwartz; 06-17-2014 at 12:06 AM. |
![]() |
![]() |
![]() |
#12 |
Enthusiast
![]() Posts: 43
Karma: 10
Join Date: Aug 2013
Device: iPad
|
Thanks, that works fine. (I did change the "Replace with" so it agrees with your screen snap:
Replace with: \n Without this change the string "isbn:" is duplicated. Thanks a lot. Now that I understand what one can do with regular expressions, I can see this might be very useful in the future as well. |
![]() |
![]() |
![]() |
Tags |
identifier |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fragment identifiers | frisket | ePub | 19 | 04-02-2014 02:44 PM |
How to swap title with identifiers:isbn | tizboy | Library Management | 1 | 06-06-2012 08:48 PM |
Modifying Identifiers | Fabe | Sigil | 6 | 01-11-2012 07:46 AM |
Stupid Question: ISBN-10 and ISBN-13 | Tegan | Library Management | 4 | 03-11-2011 01:20 AM |