View Single Post
Old 01-29-2018, 07:25 AM   #1
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,737
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
[Plugin] Epub2LegacyMetaData - legacy epub2 metadata editor

Last updated: August 8, 2023
Current Version: "0.2.3"

This plugin recreates the table-based epub2 metadata editor that was used in older Sigil versions. There are some minor differences, though:
  • You can no longer change the order of the metadata entries, however, all metadata entries will be automatically grouped by type.
  • You can use semicolons in values only to add multiple <dc:creator>/<dc:contributor> and <dc:subject> entries.

    For example, if you create a new author role entry and enter Peter Venkman;Raymond Stantz;Egon Spengler as the value, the plugin will actually write the following three entries to the metadata section:

    Code:
     <dc:contributor opf:role="aut">Peter Venkman</dc:contributor>
     <dc:contributor opf:role="aut">Raymond Stantz</dc:contributor>
     <dc:contributor opf:role="aut">Egon Spengler</dc:contributor>
  • The plugin will display all <meta> tags, for example, Calibre metadata entries.

There are also some new features:
  • The book description is displayed in its own text box.
  • If you enter the name of an author in the Author text box (or click an existing author name) and press the Tab key, the plugin will add an author sort order suggestion to the File-as text box, if it's empty.
  • If you know the ASIN number of a Kindle book, you can manually add a MOBI-ASIN identifier via Add Basic. (This custom metadata entry is used by Calibre and some plugins.) You can also add calibre:title_sort, calibre:series and calibre:series_index metadata entries via Add Basic.
  • Advanced users can customize languages and MARC roles by editing the Epub2LegacyMetaData.json preferences file. For example, the following entries will limit the languages to English, French, Italian, German and Spanish and the MARC roles to author, book producer, translator and editor:

    Code:
    {
      "roles": "aut, bkp, trl, edt",
      "languages": "en, fr, it, de, es"
    }

Credits: The plugin uses code originally written by Florian Strzelecki for the Python-Epub 0.5.2 package. It also uses the original Sigil .ui files and metadata descriptions. The plugin icon for Sigil 0.9.9.1 and higher was created by BeckyEbook. DiapDealer created the Darkmode support code and provided a custom library for PySide6/PyQt5 support.

System requirements:

This plugin requires Sigil 0.9.8 or higher and only works with epub2 books.

Installation:

1. Select Manage Plugins from the Plugins menu and select Use Bundled Python, if it isn't already selected.

2. Click Add Plugin and select Epub2LegacyMetaData_v0.2.3.zip. This will install the Epub2LegacyMetaData plugin, which you can select via Plugins > Edit > Epub2LegacyMetaData.

Known issues:

Very long metadata entries are sometimes not correctly resized or shown as blank cells. To fix this issue simply resize the Epub2LegacyMetaData dialog box.
You might get a "The metadata might have been modified..." message, when you click the Cancel button, even if you didn't change anything.
This message is usually displayed, if the ebook didn't contain a language metadata entry or the existing language metadata entry is wrong.
If this happens, move the Epub2LegacyMetaData dialog box to the side, click Details to open the Plugin Runner dialog box and check the original metadata section in the Plugin Runner dialog box.
(Advanced users could also change the plugin.xml <autoclose>true</autoclose> entry to <autoclose>false</autoclose>.)

License: GNU General Public License v3 (GPL-3)
Attached Thumbnails
Click image for larger version

Name:	Metadata Editor.png
Views:	1311
Size:	25.2 KB
ID:	161924  
Attached Files
File Type: zip Epub2LegacyMetaData_v0.2.3.zip (425.6 KB, 592 views)

Last edited by Doitsu; 08-05-2023 at 02:29 AM. Reason: Updated for Qt 6.5.2 and Python 3.11.3
Doitsu is offline   Reply With Quote