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 02-01-2012, 12:47 AM   #1
robcohen
Enthusiast
robcohen began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Jun 2008
Device: Kindle and Kindle Touch
Question populate one ID from another?

Hi,
I have books that have ISBN but no amazon: (ASIN) identifiers. For only those books I would like to populate the amazon: ID to be the same value as the ISBN. Other combinations should not be changed.

What's the easiest way to accomplish this? Can it be accomplished with a search/replace and with a regular expression with this post as a starting point? I'm thinking not because there doesn't seem to be a way to search for more than one identifier type - my logic is:
Code:
if isbn: has non-blank value and amazon: is blank
  then amazon: = isbn:
Or is it the sort of thing I'd have to do with functions in template program mode? Not quite sure if single function mode could accomplish this or can it?

Incidentally, I've added custom columns ISBN & ASIN so I can easily see which books have these values poplulated: ISBN: {identifiers:select(isbn)} and ASIN: {identifiers:select(amazon)}
Would the contents of my custom columns make it any easier to populate the missing values? I guess maybe I'm asking if there's a way to specify the contents of the second column as exactly the value of the first iff ASIN is blank and have that reflect in the metadata ids section as amazon:...value from ISBN...?

thanks for any assistance!
Rob

Last edited by robcohen; 02-01-2012 at 03:27 PM. Reason: added custom column info
robcohen is offline   Reply With Quote
Old 02-01-2012, 09:32 PM   #2
robcohen
Enthusiast
robcohen began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Jun 2008
Device: Kindle and Kindle Touch
Figured it out - that was fun

Hi,
I've figured out how to do what I want. Had created a custom field the other day called ASIN that's based off the amazon: field in Ids {identifiers:select(amazon)}

Then I used search
Code:
#asin:false and isbn:true
on the main window to select just the books that have an isbn but no ASIN. For my purposes any number will work as the ASIN in order to sync Kindle's furthest read page so I can read the same book on multiple devices without losing my place. Some of my books have an ASIN populated by another process see this thread.

Then I selected all the books in this list and used Edit Metadata in bulk with Search and replace and a regular expression. Either of these seem to give me the desired result.

After posting the original note I looked closer at a number of individual threads here for ideas and realized there was a way to properly qualify the rows I wanted to change before using the search/replace in metadata.

I love Calibre more than ever!

Rob
Attached Thumbnails
Click image for larger version

Name:	search metadata 1.jpg
Views:	193
Size:	173.6 KB
ID:	82048   Click image for larger version

Name:	search metadata 2.jpg
Views:	216
Size:	177.3 KB
ID:	82049  
robcohen is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to automatically populate a tag with the decade from the pubdate via python smoothrolla Library Management 5 11-19-2011 06:41 AM
Quality (stars) doesn't populate jeffla376 Library Management 5 10-03-2011 10:06 PM
How do I populate a custom field on import? himitsuhieki Library Management 7 08-19-2011 03:37 PM


All times are GMT -4. The time now is 10:13 PM.


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