|
|
#1 |
|
Member
![]() Posts: 13
Karma: 10
Join Date: Jun 2020
Device: iPad, Marvin
|
CLI: can I swap author and title in metadata?
I can do this the hard way, by embedding invocations of ebook-meta in a higher level scripting language like Tcl or whatever. But it would be nice if I could do it with the syntax for ebook-meta command.
I have a whole whack of epubs, obviously formatted by amateurs, in which the author name is in the title metadata field and vice versa. Maybe 60 or more. Really messes up my author-based library index in Marvin . I don't feel like fooling around with a GUI (Calibre) for hours to deal with this problem... by loading all the books and manually editing the fields (gosh, carpal tunnel here we come).I checked the manpage and have to admit I don't see anything obviously encouraging... But given how incredibly common (and vexing!) this type of problem is, wouldn't it be nice if the command honoured a syntax like ebook-meta -a -m title -t -m author (set field Author (-a flag) to Metadata (-m) "Title" field value) or even ebook-meta -switch -a -t I'm probably dreaming here and so am about to go off and write Yet Another Tedious Script to parse the output of ebook-meta, find the relevant fields, and then reissue the command to swap the values. Or maybe parse the filenames and then brute-force the metadata... But it really is quite un-fun, boring coding either way (yaaaawn), and it seems to me (from googling) that this problem is very common indeed, so wouldn't it be nice to be able to juggle the metadata directly using one invocation of ebook-meta, instead of having to extract and then re-set?
|
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Load them all into calibre, select all books with ctrl+a, click edit metadata, select swap title and author, click OK. done.
|
|
|
|
| Advert | |
|
|
|
|
#3 | |
|
Member
![]() Posts: 13
Karma: 10
Join Date: Jun 2020
Device: iPad, Marvin
|
thanks for the info
Quote:
Still, I really prefer CLI :-). I used Calibre the app just about one time years ago, then discovered the CLI tools and never fired it up again. No offence to the devs, I'm sure it's a cool app and works great, I'm just CLI-oriented. And I do all my e-reading with Marvin on an iPad. I absolutely love ebook-convert which lets me bulk-convert any number of mobis or pdfs with one command :-). For those who haven't discovered how easy this is: find . -name '*.mobi' -exec /Applications/calibre.app/Contents/console.app/Contents/MacOS/ebook-convert {} .epub \; And I wish the metadata swap-2-fields function were available similarly through ebook-meta. In the meantime, just another script. ... even bulk edit in the app won't tempt me to go through all that dragging and clicking :-)
|
|
|
|
|
|
|
#4 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,269
Karma: 61916422
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
AFAIK those Bulk edit has been there since at least 1.x
|
|
|
|
|
|
#5 | |
|
Enthusiast
![]() Posts: 45
Karma: 10
Join Date: Apr 2016
Location: Near Seattle
Device: Amazon Fire 10
|
I had a similar question here:
https://www.mobileread.com/forums/sh...=330037&page=2 My "solution" Quote:
|
|
|
|
|
| Advert | |
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Idea: Swap Title/Author hotkey. | kunkel321 | Library Management | 20 | 06-05-2020 04:34 PM |
| cannot figure out, please help: bulk metadata swap numeric mo/yr in title w/ regex | anoukaimee | Library Management | 5 | 11-07-2019 03:36 AM |
| Swap Title and Author | rorschach | Calibre | 1 | 12-21-2013 09:23 AM |
| Keyboard shortcut - Swap Author and Title | pepperleaf | Library Management | 6 | 10-21-2012 09:06 AM |
| Problem with Swap Author & Title. | scotmad | Calibre | 4 | 02-10-2011 03:24 PM |