View Single Post
Old 12-20-2009, 09:54 AM   #9
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Starson17 View Post
I'm thinking of something like this metascript:

cycle through all possible id's, doing a show_metadata
pipe to sed to fix firstname and lastname
pipe to set_metadata.
Just an update and a thanks. I ended up doing this in Windows and used batch files with FOR /L loops to go through all the IDs. The first step wrote all the opf files, the second step used sed to process them and fix the author names, and the last loop did the set_metadata to put them back into the database.

I don't know if it's a bug, but for some reason, calibredb always seemed to stop execution of the batch file when it completed. This caused it to ignore any other lines in the same batch file. I had to do this job in two batch files, one to make the opf files, and one to sed process then set the metadata.

The process time was about 10 seconds per book, so this is taking a while, (still running 8 hours later). Anyway, thanks for the help.
Starson17 is offline   Reply With Quote