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 08-21-2014, 04:07 PM   #1
Rainybeet
Junior Member
Rainybeet began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2014
Device: Kindle paperwhite
Bulk Edit Remove Leading Characters

First the question, then some details.

In the Search and Replace function for multiple book editing is there a way to signify generic numbers, characters, or place value? The standard characters * and # do not seem to work, but I never learned Python and cannot seem to find a quick answer anywhere.

Now my specific problem:

Trying to organize my library I often run into titles that have a bunch of junk at the beginning or the end, especially series information, which usually has numbers.

A simple example would be:

01 The Hitchhikers Guide to the Galaxy
02 The Restaurant at the End of the Universe
03 Life, the Universe and Everything
04 So Long, and Thanks For All the Fish

In bulk edit, how can I remove the numbers and the space of all four books at the same time?

Ideally I would be able to remove the first three characters, no matter what they are, so that I could edit multiple series at the same time, or series with slightly different formatting.

I did discover that using a regular expression I can put in (0.) in the search field, but this does not work if I am trying to edit many books that have slightly different formatting, and if the numbers go into the 10s, 20s, or higher then I have to do another edit for each different leading number. Also, if the books are formatted as follows:

Hitchhikers 1 The Hitchhikers Guide to the Galaxy
Hitchhikers 2 The Restaurant at the End of the Universe
Hitchhikers 3 Life, the Universe and Everything
Hitchhikers 4 So Long, and Thanks For All the Fish

then I cannot type in (Hitchhikers ....) or else the first book would return "The Guide to the Galaxy."

This is why I really would like to just the number of leading characters that I specify.

Thank you for any help.
Rainybeet is offline   Reply With Quote
Old 08-21-2014, 05:48 PM   #2
Rainybeet
Junior Member
Rainybeet began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2014
Device: Kindle paperwhite
I found an answer to the most basic of my questions, how to remove characters from the front of a title, or any other field.

The code is just ^..... with the number of periods being the number of characters you want to remove.

It is not a perfect answer, I would still love to know how to add generic characters into a search string so I could edit with a bit more precision, but at least it is a start.
Rainybeet is offline   Reply With Quote
Advert
Old 08-21-2014, 06:19 PM   #3
BookJunkieLI
Evangelist
BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.
 
BookJunkieLI's Avatar
 
Posts: 435
Karma: 572984
Join Date: Jan 2010
Location: Long Island
Device: Kobo Libra 2, Kindle 4, Nook Gl4, Nook STR, REB 1100, Ebookwise 1500,
This will remove all numbers at the beginning of a line of text
Code:
^[0-9]+
In the examples you gave you'll still have an empty space at the beginning of the title. Just add a space at the end of the above code and it will remove it.

To breakdown how it works:

The ^ character says to start at the beginning of the line.

The [0-9] says to look for a number

The + says to keep going until it hits something other than a number.
BookJunkieLI is offline   Reply With Quote
Old 08-21-2014, 07:16 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Question, where did these Hitchhiker's Guide to the Galaxy eBooks come from? I've never seen retail copies that have numbers in front of the titles either in the filename or in the metadata.
JSWolf is offline   Reply With Quote
Old 08-21-2014, 08:07 PM   #5
Rainybeet
Junior Member
Rainybeet began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2014
Device: Kindle paperwhite
The Hitchhiker's books were just something I made up as a recognizable example. All of my Hitchhikers copies are in paper form and are at least 20 years old.
Rainybeet is offline   Reply With Quote
Advert
Old 08-21-2014, 08:18 PM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Rainybeet View Post
The Hitchhiker's books were just something I made up as a recognizable example. All of my Hitchhikers copies are in paper form and are at least 20 years old.
One thing you could do if it's just the first word that needs to go, just use regex to remove up to and including the first space. I'm not up on the brand of regex used by Calibre so I'm sure someone else can pipe in with the code for this.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Title bulk edit match - to remove series info from title Rob557 Library Management 30 12-09-2014 06:06 AM
Undo bulk metadata edit (remove data in a field)? rebl Library Management 7 08-25-2014 07:18 PM
Can I remove the first x characters from titles in bulk? statusneo Library Management 2 06-11-2014 11:20 AM
Suggestion: Remove all tags button in the bulk edit screen Daemon Calibre 3 08-23-2010 06:58 AM
RFE: Remove remove tags in bulk edit magphil Calibre 0 08-11-2009 10:37 AM


All times are GMT -4. The time now is 03:23 PM.


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