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 03-30-2016, 06:34 AM   #1
Ersatzreifen
Bibliothekar
Ersatzreifen began at the beginning.
 
Ersatzreifen's Avatar
 
Posts: 38
Karma: 10
Join Date: Jun 2011
Location: San Jose City, Philippines
Device: Galaxy Tab S w/Bookari Premium
Regular Expression help: complicated remaming of titles

I'm trying to rename a few hundred magazines using regular expressions in the EDIT METADATA|SEARCH & REPLACE, but I'm not getting anywhere. I read the reference, but the more I read it the more confused I get.

Here's a sample of three titles I now have:

Quote:
202 (Winter 2009) Tools & Shops
025 (Dec 1980)
178
The numbers are actually issue (series) numbers. I want to use the search and replace to change them all to look like this:

Quote:
Fine Woodworking 202: Fine Woodworking Magazine № 202 (Winter 2009) Tools & Shops
Fine Woodworking 025: Fine Woodworking Magazine № 025 (Dec 1980)
Fine Woodworking 178: Fine Woodworking Magazine № 178
(The "Fine Woodworking NNN:" part sets the series number, which I can later use the "Clean Metadata" plugin to move it to the series column.)

So, I'm stumped. The part that I can't figure out is how to take the number and repeat it in prepended text as shown, followed by a colon. What's the most painless way to make this happen? I really have no clue.

____________
Here's my view of the tool I'm using, FYI:

Click image for larger version

Name:	SandR.jpg
Views:	502
Size:	120.3 KB
ID:	147487

Moderator Notice
The image you posted violates MR rules -- too big. Please read the posting guidelines in here ==>> MobileRead FAQ

I fixed it this time by uploading it to the MR forum (the paper clip icon in Advanced), but I won't be doing that next time...

BR

Last edited by BetterRed; 03-30-2016 at 04:11 PM. Reason: Get rid of big image
Ersatzreifen is offline   Reply With Quote
Old 03-30-2016, 10:37 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,957
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
1) you have no (capture) pattern so it ='s all
2) you have a destination the same as source without modification by #1. The source of the duplicate values. The default (no destination specified) is SAME field

IMHO your work order is flawed

0) Have a complete plan that avoids traps in the end. Like resulting Duplicate Titles after cleanup. Each case is Unique (see red item below)

1*) Map fragments to destination fields (1 pass per destination field, minimum). S&R does not have a true 'Move'. You add / insert, then clean up
Normalize data. #, No., Issue: could be dropped (must as an Index for series) or made consistent

2) Cleanup. Remove data that now has a proper home

Fine Woodworking 202: Fine Woodworking Magazine № 202 (Winter 2009) Tools & Shops
Fine Woodworking 025: Fine Woodworking Magazine № 025 (Dec 1980)
Fine Woodworking 178: Fine Woodworking Magazine № 178

Lime is Series and Index I have always seemed to have to do this as 2 passes: Series (name), then series_index

This will also become the Primary Title, since it always exists (Duplicate tie breaker)

Magazine(-period) is just a TAG eg Magazine-Quarterly, It need not be in the Title or Series

If you have a custom Sub-Title field, you could map the subject there
You could just leave (season) Subject in the title

BTW Issue number is a great Series_Index if you always have it.
Analog SF&F is a monthly (I use digits for month) EXCEPT the issue a Double Month issue every year that breaks the simple digit plan


So, Now
Show (and Tell ) us your mapping plan. With source examples. Remember Pattern matching is a precise task. Every variation counts as a needed solution

Normalize your existing {title} eg the #, No. .... problem. This will reduce the needed solutions for the 'Move -Copy' phase
theducks is online now   Reply With Quote
Reply

Tags
duplicating number, prepending text, regular expressions, renaming


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help me with regular expression :help: Tatjana Library Management 2 05-30-2014 05:41 PM
Regular Expression Help Azhad Calibre 86 09-27-2011 02:37 PM
Regular Expression Help iKarampa Calibre 13 12-15-2010 07:17 AM
Regular expression help krendk Calibre 4 12-04-2010 04:32 PM
Help with the regular expression Dysonco Calibre 9 03-22-2010 10:45 PM


All times are GMT -4. The time now is 07:09 AM.


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