Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
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,583
Karma: 22735033
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:	900
Size:	25.2 KB
ID:	161924  
Attached Files
File Type: zip Epub2LegacyMetaData_v0.2.3.zip (425.6 KB, 117 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
Old 01-29-2018, 05:25 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Very nice! It has the added benefit of showing people how to get translations working for Qt plugins.

I've added it to the plugin index. Thanks for the contribution to Sigil!
DiapDealer is offline   Reply With Quote
Advert
Old 01-30-2018, 09:24 AM   #3
Maui
Connoisseur
Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.
 
Maui's Avatar
 
Posts: 57
Karma: 600000
Join Date: Jan 2018
Device: Galaxy Tab S2
Cool!



What about inserting a button "Series" adding

<meta content="..." name="calibre:series" />
<meta content="1" name="calibre:series_index" />

to the metadata? They are not official, but there is at least no replacement for them and some e-readers/softreaders are interpreting them.

M
Maui is offline   Reply With Quote
Old 01-30-2018, 10:10 AM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,633
Karma: 5433388
Join Date: Nov 2009
Device: many
If you do, please do not forget to add the calibre xml namespace info to the metadata tag itself.

Last edited by KevinH; 01-30-2018 at 10:26 AM.
KevinH is online now   Reply With Quote
Old 01-30-2018, 10:27 AM   #5
Maui
Connoisseur
Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.
 
Maui's Avatar
 
Posts: 57
Karma: 600000
Join Date: Jan 2018
Device: Galaxy Tab S2
Practically seen neither FlightCrew nor Epubcheck are complaining if the name space is missing. At least mantano reader is accepting them without namespace as well.

Theoretically you're right, no question.
Maui is offline   Reply With Quote
Advert
Old 01-30-2018, 11:08 AM   #6
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,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Maui View Post
What about inserting a button "Series" adding

<meta content="..." name="calibre:series" />
<meta content="1" name="calibre:series_index" />

to the metadata?
Added in version 0.1.1.

Last edited by Doitsu; 02-04-2018 at 04:11 AM.
Doitsu is offline   Reply With Quote
Old 01-31-2018, 09:16 AM   #7
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by Maui View Post
Cool!



What about inserting a button "Series" adding

<meta content="..." name="calibre:series" />
<meta content="1" name="calibre:series_index" />

to the metadata? They are not official, but there is at least no replacement for them and some e-readers/softreaders are interpreting them.

M
I simply saved this as a "clip". Go to your .opf, hit the button, and it's inserted. Then just edit the info as needed.

It would be nice though, if TPTB ever agree on a standard meta for series/# for that to be added to the meta editor in Sigil.
Turtle91 is offline   Reply With Quote
Old 01-31-2018, 09:27 AM   #8
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,633
Karma: 5433388
Join Date: Nov 2009
Device: many
Currently, Sigil meets the 3.01 spec. The IDPF has disolved and merged with W3C. They have no spec. They are planning a completely new packaged web content spec for epub4 which does not even use an opf, or zip, or ...

An epub community within w3c has decided epub 3.1 is dead on arrival. They are trying to salvage an epub 3.2 or epub 3.0.2 that does not support any series meta either.

Once the calibre namespace prefix is added to the metadata tag, using calibre: metadata is completely legal for xml and use in an opf. The issue is adoption by readers but since there is no other viable solution ....

So do not hold your breath. Simply add the calibre namespace to the metadata tag in the opf and use your clip as the epub format is in for a very rocky future.

ie. Inside the metadata tag, my guess is adding the following attribute will do the trick, unless calibre has a more specific url that describes its metadata.

Code:
xmlns:calibre="http://calibre-ebook.com"
What does Calibre itself put in the metadata tag?

KevinH

Quote:
Originally Posted by Turtle91 View Post
I simply saved this as a "clip". Go to your .opf, hit the button, and it's inserted. Then just edit the info as needed.

It would be nice though, if TPTB ever agree on a standard meta for series/# for that to be added to the meta editor in Sigil.

Last edited by KevinH; 01-31-2018 at 11:53 AM. Reason: updating to make things clearer
KevinH is online now   Reply With Quote
Old 02-01-2018, 02:45 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The XML namespace calibre uses is

xmlns:calibre="http://calibre.kovidgoyal.net/2009/metadata"


However, this is not actually needed for <meta> tags. That is because the calibre: prefix in the meta tag is *inside* an attribute value and as such is not an actual XML namespace.
kovidgoyal is offline   Reply With Quote
Old 02-01-2018, 07:33 AM   #10
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,633
Karma: 5433388
Join Date: Nov 2009
Device: many
I thought attributes could have namespaces as well. Don’t they need to be defined as well?
KevinH is online now   Reply With Quote
Old 02-01-2018, 10:01 AM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This is a namespace isnide the attribute value not the attribute name.

So

calibre:name="series"

is a namespaced attribute

name="calibre:series"

is not.
kovidgoyal is offline   Reply With Quote
Old 02-01-2018, 10:06 AM   #12
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,633
Karma: 5433388
Join Date: Nov 2009
Device: many
Well you do learn something every day! So if a user just wanted to only use calibre series metadata, they would not need to do anything other than use the epub2 meta tag with the appropriate name and content. No namespace additions needed at all.


The equivalent in epub3 would then be:

<meta property="calibre:series">Series Name here</meta>
<meta property="calibre:series_index">1</meta>

So you would then not need any refines or use dcterms isPartOf.

Is that correct?
KevinH is online now   Reply With Quote
Old 02-01-2018, 10:11 AM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That is correct. However, for epub 3 calibre uses the technique defined in the spec for series (belongs-to-collection). It also supports the meta tag approach so you can use either as far as calibre is concerned, but for wider interoperability better to use the standard approach despite it being far less elegant.
kovidgoyal is offline   Reply With Quote
Old 02-01-2018, 10:16 AM   #14
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,633
Karma: 5433388
Join Date: Nov 2009
Device: many
Okay so to be most correct when converting an epub2 to an epub3, ePub3-itizer should then recognize and convert calibre:series and calibre:series_index inside epub2 style meta entries to:

Code:
  <meta id="num" property="belongs-to-collection">Series Name Here</meta>
  <meta refines="#num" property="collection-type">series</meta>
  <meta refines="#num" property="group-position">1</meta>
I will add support for that.

ps: I have now created fixes for this which I will push tomorrow to support recognition of calibre:series and calibre:series_index in both the ePub3-itizer plugin and inside Sigil itself inside Sigil's Metadata Editor GUI when used on an epub2.

pps: Sigil master now has support for calibre:series and calibre:series_index in the epub2 Metadata Editor.

Last edited by KevinH; 02-02-2018 at 08:54 AM. Reason: fixes for both ePub3-itizer and Sigil Metadata Editor made
KevinH is online now   Reply With Quote
Old 02-01-2018, 01:17 PM   #15
jcsalomon
Zealot
jcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheesejcsalomon can extract oil from cheese
 
jcsalomon's Avatar
 
Posts: 100
Karma: 1204
Join Date: Jun 2012
Device: Bookari (née Mantano Reader) on Android; Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Currently, Sigil meets the 3.01 spec. The IDPF has disolved and merged with W3C. They have no spec. They are planning a completely new packaged web content spec for epub4 which does not even use an opf, or zip, or ...

An epub community within w3c has decided epub 3.1 is dead on arrival. They are trying to salvage an epub 3.2 or epub 3.0.2 that does not support any series meta either.
(emphasis added)

I’m not sure that’s right. My reading was, it was 3.1 which removed series metadata, and since 3.2 (AKA 3.0.2) is returning to 3.0.1-compatibility (warts and all) it’ll have the series metadata from 3.0.1 too.

(It’ll be “deprecated”, but since there won’t be another 3.x version, and since EPUB4 will have a completely different model anyway, I don’t see that deprecation will have any effect at all.)
jcsalomon is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] epub2 output Doitsu Plugins 11 12-01-2021 04:17 PM
Open Metadata Editor from plugin notbuu Development 5 10-05-2016 12:10 AM
Regarding using metadata objects in identify method of metadata download plugin api aprekates Development 1 07-06-2014 03:35 AM
refined metadata in epub2? mzmm ePub 2 11-14-2012 01:52 PM
[Metadata Download Plugin] Goodreads Metadata **Deprecated** kiwidude Plugins 30 04-23-2011 02:10 PM


All times are GMT -4. The time now is 10:27 AM.


MobileRead.com is a privately owned, operated and funded community.