03-25-2009, 01:14 PM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Mar 2009
Device: Kindle
|
Editing Metadata in Bulk Question
Hi. I have a large collection of ebooks where "Blackmask Lives" is appended to the author. For example, the author of the book The Door Through Space is Marion Zimmer Bradley, but it shows up as Blackmask Lives & Marion Zimmer Bradley. I have about 800 ebooks like this. Is there a way to delete the Blackmask Lives part on the author field without having to do it for each book individually?
Alternatively, if this is not possible, could someone point me in the right direction as to where to look up how to write a program that can do this (I have limited programming experience). Thanks. |
03-25-2009, 01:21 PM | #2 |
creator of calibre
Posts: 44,353
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibre has a command line interface to the database (calibredb) you should be able to write a script using it to do what you want
|
Advert | |
|
07-19-2009, 11:34 AM | #3 |
Enthusiast
Posts: 33
Karma: 112
Join Date: Jul 2009
Device: Sony PRS-505
|
Where do we find the command line files?
OSX, calibre 6b14 looking at the command line docs, it lists epub-meta which sounds like it could do what I want (bulk editing of tags) but I can't find a file epub-meta on my drive. is there a primer for the command line interface? or a good query in search for the forum? (I'm getting too much chaff in my searches) In the docs, when I go to Start>Sections>editing ebook metadata, it's empty. |
07-19-2009, 12:07 PM | #4 |
creator of calibre
Posts: 44,353
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The calibre user manual has a list of all the command line commands
|
07-19-2009, 04:55 PM | #5 | |
Enthusiast
Posts: 33
Karma: 112
Join Date: Jul 2009
Device: Sony PRS-505
|
right, buyt my question was:
Quote:
I'm just looking for help in how to research this myself. If I just try the command, I get: -bash: epub-meta: command not found Last edited by wygit; 07-19-2009 at 04:59 PM. |
|
Advert | |
|
07-19-2009, 05:01 PM | #6 |
Enthusiast
Posts: 33
Karma: 112
Join Date: Jul 2009
Device: Sony PRS-505
|
or for a related question, for clearing the tags completely from a batch of books, is there a wildcard?
I tried removing *, but that didn't work |
07-19-2009, 05:43 PM | #7 |
creator of calibre
Posts: 44,353
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The command line utilities are in /usr/bin on OS X
|
07-19-2009, 06:43 PM | #8 |
hopeless n00b
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Have you done much tweaking of metadata? Is the file naming the same in all the books (e.g. Blackmask Lives, author name - title)?
If you still have the original files on your hard drive and you haven't done much in the way of fixing metadata, perhaps you could just re-import your collection and edit the regular expression used by Calibre for metadata detection to account for the extraneous data. For example change: Code:
(?P<author>.+) - (?P<title>.+) Code:
Blackmask Lives, (?P<author>.+) - (?P<title>.+) |
07-19-2009, 07:08 PM | #9 |
Enthusiast
Posts: 33
Karma: 112
Join Date: Jul 2009
Device: Sony PRS-505
|
a-HA... I'm NOT insane after all...
/usr/bin/epub-meta -> /Applications/calibre.app/Contents/Resources/loaders/epub-meta cd /Applications/calibre.app/Contents/Resources/loaders/ ls -l -rwxr-xr-x 1 wygit admin 1520 Jul 16 17:41 calibre -rwxr-xr-x 1 wygit admin 1525 Jul 16 17:41 calibre-complete -rwxr-xr-x 1 wygit admin 1523 Jul 16 17:41 calibre-customize -rwxr-xr-x 1 wygit admin 1516 Jul 16 17:41 calibre-debug -rwxr-xr-x 1 wygit admin 1527 Jul 16 17:41 calibre-parallel -rwxr-xr-x 1 wygit admin 1525 Jul 16 17:41 calibre-server -rwxr-xr-x 1 wygit admin 1521 Jul 16 17:41 calibre-smtp -rwxr-xr-x 1 wygit admin 1522 Jul 16 17:41 calibredb -rwx------ 1 wygit admin 429 Jul 19 08:18 calibredb.py -rwxr-xr-x 1 wygit admin 1532 Jul 16 17:41 ebook-convert -rwxr-xr-x 1 wygit admin 1534 Jul 16 17:41 ebook-device -rwxr-xr-x 1 wygit admin 1530 Jul 16 17:41 ebook-meta -rwxr-xr-x 1 wygit admin 1527 Jul 16 17:41 ebook-viewer -rwxr-xr-x 1 wygit admin 1532 Jul 16 17:41 fetch-ebook-metadata -rwxr-xr-x 1 wygit admin 1540 Jul 16 17:41 librarything -rwxr-xr-x 1 wygit admin 1531 Jul 16 17:41 lrf2lrs -rwxr-xr-x 1 wygit admin 1533 Jul 16 17:41 lrfviewer -rwxr-xr-x 1 wygit admin 1538 Jul 16 17:41 lrs2lrf -rwxr-xr-x 1 wygit admin 1535 Jul 16 17:41 markdown-calibre -rwxr-xr-x 1 wygit admin 1536 Jul 16 17:41 pdfmanipulate -rwxr-xr-x 1 wygit admin 1527 Jul 16 17:41 web2disk I seen to be missing a few files... Suggestions? |
07-19-2009, 07:11 PM | #10 |
creator of calibre
Posts: 44,353
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you're using calibre 0.6 the command is ebook-meta not epub-meta
|
07-19-2009, 11:40 PM | #11 |
Enthusiast
Posts: 33
Karma: 112
Join Date: Jul 2009
Device: Sony PRS-505
|
thanks...
I had finally figured that one out... It was confusing when I was trying commands from the docs and they were returning "not found". I figured I had to be doing something wrong. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Editing Metadata in Bulk | ballast | Calibre | 5 | 08-15-2010 03:14 PM |
unexpected behavior when bulk editing | curantil | Calibre | 1 | 06-07-2010 06:45 PM |
Performance in Bulk Metadata Changes | pfooti | Calibre | 3 | 01-02-2010 07:59 PM |
metadata in bulk | Lorraine Froggy | Calibre | 1 | 11-14-2009 09:42 PM |
Bulk Metadata Download | iain_benson | Calibre | 1 | 09-29-2009 11:42 AM |