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 02-03-2016, 07:09 PM   #1
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,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
[Plugin] FixOPFv1

A temporary input plugin to change the OPF package type from "1" to "2".
Will also workaround a Sigil bug that's triggered when an epub's opf file doesn't have an xml declaration.
(temporary because it will become unnecessary in the next version of Sigil)

It will change the package from "1.0" to "2.0" and will change any of the older "text/html" or "text/x-oeb1-document" media types on manifested items to "application/xhtml+xml".

It will add an xml declaration to opf files that don't have one.

Nothing else should be touched (including epub2s or epub3s).
Attached Files
File Type: zip FixOPFv1_v0.1.1.zip (4.6 KB, 504 views)

Last edited by DiapDealer; 02-21-2016 at 09:17 PM.
DiapDealer is offline   Reply With Quote
Old 02-21-2016, 08:36 PM   #2
CJClink
Junior Member
CJClink began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2015
Location: Mississauga, Ontario, Canada
Device: none
Hi, Carolyn here.

I hope you can get this plug in to solve this problem -- I totally LOVE Sigil.

Here's the content.opf code as provided by Draft2Digital with no xml declaration in the first line, I've replaced some of the content with place-holder names:
Spoiler:

<package xmlns:dc="http://purl.org/dc/elements/1.1/" xmlnspf="http://www.idpf.org/2007/opf" xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="BookId">
<metadata>
<dc:title>Title</dc:title>
<dcublisher>Publisher</dcublisher>
<dc:creator opf:role="aut">Author</dc:creator>
<dc:description>&lt;p&gt;Description removed&lt;/p&gt;</dc:description>
<dc:date>2016-03-01</dc:date>
<dc:language>EN</dc:language>
<meta content="1.1" name="draft2digitalVersion"/>
<meta content="Epub" name="draft2digitalType"/>
<meta content="cover" name="cover"/>
<dc:identifier id="BookId" opf:scheme="uuid">a0e4b441-b52e-4e8b-9f17-47e4d048997b</dc:identifier>
<dc:subject>spaceship</dc:subject>
<dc:subject>space battle</dc:subject>
<dc:subject>wormhole</dc:subject>
<dc:subject>dolphin</dc:subject>
<dc:subject>astrophysics</dc:subject>
<dc:subject>astronomy</dc:subject>
<dc:subject>dark matter</dc:subject>
</metadata>
<manifest>
<item href="c001.xhtml" id="c001" media-type="application/xhtml+xml"/>
<item href="toc.xhtml" id="toc" media-type="application/xhtml+xml"/>
<item href="c002.xhtml" id="c002" media-type="application/xhtml+xml"/>
<item href="c003.xhtml" id="c003" media-type="application/xhtml+xml"/>
<item href="c004.xhtml" id="c004" media-type="application/xhtml+xml"/>
<item href="c005.xhtml" id="c005" media-type="application/xhtml+xml"/>
<item href="c006.xhtml" id="c006" media-type="application/xhtml+xml"/>
<item href="c007.xhtml" id="c007" media-type="application/xhtml+xml"/>
<item href="c008.xhtml" id="c008" media-type="application/xhtml+xml"/>
<item href="c009.xhtml" id="c009" media-type="application/xhtml+xml"/>
<item href="c010.xhtml" id="c010" media-type="application/xhtml+xml"/>
<item href="c011.xhtml" id="c011" media-type="application/xhtml+xml"/>
<item href="c012.xhtml" id="c012" media-type="application/xhtml+xml"/>
<item href="c013.xhtml" id="c013" media-type="application/xhtml+xml"/>
<item href="c014.xhtml" id="c014" media-type="application/xhtml+xml"/>
<item href="c015.xhtml" id="c015" media-type="application/xhtml+xml"/>
<item href="c016.xhtml" id="c016" media-type="application/xhtml+xml"/>
<item href="c017.xhtml" id="c017" media-type="application/xhtml+xml"/>
<item href="c018.xhtml" id="c018" media-type="application/xhtml+xml"/>
<item href="c019.xhtml" id="c019" media-type="application/xhtml+xml"/>
<item href="c020.xhtml" id="c020" media-type="application/xhtml+xml"/>
<item href="c021.xhtml" id="c021" media-type="application/xhtml+xml"/>
<item href="c022.xhtml" id="c022" media-type="application/xhtml+xml"/>
<item href="c023.xhtml" id="c023" media-type="application/xhtml+xml"/>
<item href="c024.xhtml" id="c024" media-type="application/xhtml+xml"/>
<item href="c025.xhtml" id="c025" media-type="application/xhtml+xml"/>
<item href="c026.xhtml" id="c026" media-type="application/xhtml+xml"/>
<item href="c027.xhtml" id="c027" media-type="application/xhtml+xml"/>
<item href="c028.xhtml" id="c028" media-type="application/xhtml+xml"/>
<item href="c029.xhtml" id="c029" media-type="application/xhtml+xml"/>
<item href="c030.xhtml" id="c030" media-type="application/xhtml+xml"/>
<item href="c031.xhtml" id="c031" media-type="application/xhtml+xml"/>
<item href="c032.xhtml" id="c032" media-type="application/xhtml+xml"/>
<item href="c033.xhtml" id="c033" media-type="application/xhtml+xml"/>
<item href="c034.xhtml" id="c034" media-type="application/xhtml+xml"/>
<item href="c035.xhtml" id="c035" media-type="application/xhtml+xml"/>
<item href="c036.xhtml" id="c036" media-type="application/xhtml+xml"/>
<item href="c037.xhtml" id="c037" media-type="application/xhtml+xml"/>
<item href="c038.xhtml" id="c038" media-type="application/xhtml+xml"/>
<item href="c039.xhtml" id="c039" media-type="application/xhtml+xml"/>
<item href="c040.xhtml" id="c040" media-type="application/xhtml+xml"/>
<item href="c041.xhtml" id="c041" media-type="application/xhtml+xml"/>
<item href="c042.xhtml" id="c042" media-type="application/xhtml+xml"/>
<item href="c043.xhtml" id="c043" media-type="application/xhtml+xml"/>
<item href="c044.xhtml" id="c044" media-type="application/xhtml+xml"/>
<item href="c045.xhtml" id="c045" media-type="application/xhtml+xml"/>
<item href="base.css" id="base" media-type="text/css"/>
<item href="d2d_images/image000.jpg" id="image000" media-type="image/jpeg"/>
<item href="d2d_images/image001.jpg" id="image001" media-type="image/jpeg"/>
<item href="ncx.ncx" id="ncx" media-type="application/x-dtbncx+xml"/>
<item href="d2d_images/cover.jpg" id="cover" media-type="image/jpeg"/>
<item href="endmatter.css" id="endmatter" media-type="text/css"/>
<item href="cover-ed047dd1-965a-47cf-9c74-c8fa4e3436d9.xhtml" id="cover-ed047dd1-965a-47cf-9c74-c8fa4e3436d9" media-type="application/xhtml+xml"/>
</manifest>
<spine toc="ncx">
<itemref idref="cover-ed047dd1-965a-47cf-9c74-c8fa4e3436d9"/>
<itemref idref="c001"/>
<itemref idref="toc"/>
<itemref idref="c002"/>
<itemref idref="c003"/>
<itemref idref="c004"/>
<itemref idref="c005"/>
<itemref idref="c006"/>
<itemref idref="c007"/>
<itemref idref="c008"/>
<itemref idref="c009"/>
<itemref idref="c010"/>
<itemref idref="c011"/>
<itemref idref="c012"/>
<itemref idref="c013"/>
<itemref idref="c014"/>
<itemref idref="c015"/>
<itemref idref="c016"/>
<itemref idref="c017"/>
<itemref idref="c018"/>
<itemref idref="c019"/>
<itemref idref="c020"/>
<itemref idref="c021"/>
<itemref idref="c022"/>
<itemref idref="c023"/>
<itemref idref="c024"/>
<itemref idref="c025"/>
<itemref idref="c026"/>
<itemref idref="c027"/>
<itemref idref="c028"/>
<itemref idref="c029"/>
<itemref idref="c030"/>
<itemref idref="c031"/>
<itemref idref="c032"/>
<itemref idref="c033"/>
<itemref idref="c034"/>
<itemref idref="c035"/>
<itemref idref="c036"/>
<itemref idref="c037"/>
<itemref idref="c038"/>
<itemref idref="c039"/>
<itemref idref="c040"/>
<itemref idref="c041"/>
<itemref idref="c042"/>
<itemref idref="c043"/>
<itemref idref="c044"/>
<itemref idref="c045"/>
</spine>
<guide>
<reference href="cover-ed047dd1-965a-47cf-9c74-c8fa4e3436d9.xhtml" type="cover" title="Cover"/>
<reference href="c001.xhtml" type="title-page" title="Title Page"/>
<reference href="toc.xhtml" type="toc" title="Table of Contents"/>
<reference href="c002.xhtml" type="text" title="Praise for Title"/>
</guide>
</package>

Last edited by theducks; 02-22-2016 at 09:46 AM. Reason: wrap in spoiler
CJClink is offline   Reply With Quote
Old 02-21-2016, 09:22 PM   #3
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,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Hi Carolyn,

Try the 0.1.1 version of the plugin now available in the first post. I _think_ I've adapted it to also check for a missing xml declaration in the epub's opf file and then add one if it's missing (regardless of the epub's package version).

Let me know if it gives you any trouble. Hopefully, it will work satisfactorily until we get a new version of Sigil released that addresses these issues.

Last edited by DiapDealer; 02-21-2016 at 10:07 PM.
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] PunctuationSmarten Sigil plugin DiapDealer Plugins 138 07-11-2023 11:22 AM
[FileType Plugin] YVES Bible Plugin ClashTheBunny Plugins 27 01-16-2023 01:25 AM
Plugin not customizable: Plugin: HTML Output does not need customization flyingfoxlee Conversion 2 02-24-2012 02:24 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM
New Plugin Type Idea: Library Plugin cgranade Plugins 3 09-15-2010 12:11 PM


All times are GMT -4. The time now is 02:24 PM.


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