View Single Post
Old Yesterday, 02:53 AM   #3
Shark69
Zealot
Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.
 
Shark69's Avatar
 
Posts: 139
Karma: 493152
Join Date: Mar 2012
Location: Spain
Device: Kindle Oasis 2
You're absolutely right that calibre has "Swap title and author", both in the single-book editor and in bulk edit. But
that feature does something quite different from what this plugin is for, and it wouldn't solve the problem it targets:
  1. Calibre's swap is blind and manual. It just exchanges the Title and Author of whatever books you select — it doesn't tell you which books are actually wrong. In the real case this addresses, you have a library with thousands of books where only some are swapped, mixed in with correctly-cataloged ones. If you select a group and tick "Swap title and author", you'd corrupt all the correct ones too. The hard part is identifying the affected books — and that's exactly what the plugin does automatically.
  2. It reads the .epub's internal metadata, not just the record. The plugin opens each book's OPF (dc:title/dc:creator) and compares it against the calibre record to detect the genuinely-swapped ones. Calibre's swap only looks at the record.
  3. It recovers accents where the file preserves them. In these imports the swap usually also comes de-accented. The correct author (with accents) is normally kept in the OPF file-as/sort fields, and the accented title in the calibre:title_sort or NCX metadata, so the plugin restores those; a blind field swap would just keep the accent-less text. Where the file doesn't carry the accented form, that field is left as-is for you to touch up.
  4. It can fix the .epub interior too, not only the record — and it has a third mode that detects record/epub mismatches.
    Calibre's swap never touches the file.
  5. Everything is reviewable per book before applying: you see the proposed title/author, can edit it, pick only the title or only the author, and apply only the ones you tick — so correct books are never touched.

So it's not a replacement for the manual swap; it's an automated detect-and-fix tool for a specific kind of corruption (swapped + de-accented metadata baked into the files) that the built-in swap can't identify on its own. Thanks for raising it — it's a fair point worth clarifying in the thread.
Attached Files
File Type: zip SwappedMetadataFixer_plugin_v4.30.zip (47.3 KB, 3 views)

Last edited by Shark69; Yesterday at 05:43 AM.
Shark69 is offline   Reply With Quote