Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-13-2015, 11:41 AM   #1
schrijver
Junior Member
schrijver began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2013
Device: Cybook Odyssey
Working with unzipped EPUB folders

Dear Sigil community,

Very happy to hear about the recent developments with Sigil! One of the inconveniences I have encountered is the lack of EPUB3 support and I am very happy to see this underway. I now have only one item left on my wish list, and that is to work on unzipped EPUB’s directly.

There is already an issue on the (now read-only) Google Code tracker:

https://code.google.com/p/sigil/issues/detail?id=1641

I wondered whether it would be a good idea to add this future to the Sigil roadmap?

The commenters on Google Code already explain the advantages of such an approach.

Firstly, this approach is necessary to work with versioning systems like Git and SVN. These systems allow to track and exchange the changes to files over time. They work much better with series of text files (like an unzipped EPUB) than with single binary files (like a zipped EPUB).

Secondly, having the EPUB accessibly through the filesystem allows to easily perform specific hacks for which Sigil does not yet have a user interface. For exmple, adding the com.apple.ibooks.display-options.xml file for iBooks.

Finally, access through the filesystem allows to use any other tool directly on your publication. For instance, using your favourite photo-editor to directly edit the images in your EPUB.

Other tools in the EPUB ecosystem, like Readium and epubcheck have already started to support working with unzipped folders.

What do you think?
Is such an option feasible and desirable?

Looking forward to your replies,
Eric
schrijver is offline   Reply With Quote
Old 10-13-2015, 12:40 PM   #2
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: 8,487
Karma: 5703586
Join Date: Nov 2009
Device: many
Hi Eric,

Sigil's now internal python 3 plugin system makes all of these points moot as it allows programmed access to all files in the epub.


In fact, creating a "commit" output plugin, would enable files to be added for a revision control system quite easily as well. And using an "update" plugin, you could easily load in any changes made outside of Sigil via some other means.

So all and all, everything you want to do can be done by writing your own python 3 plugins and need not impact current Sigil at all.

Hope this helps,

KevinH
KevinH is offline   Reply With Quote
Advert
Old 10-13-2015, 12:50 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: 28,361
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I doubt if the ability to work on unzipped content is ever going to be an integral part of Sigil, quite frankly. It's an epub editor--and epubs are zipped. There are plenty of other editors that will easily allow anyone to manipulate unzipped html/css/xml source files.

It probably wouldn't be all that difficult, however, for someone to create a Sigil input plugin that could be used to "pull" a git/svn repository containing a versioned OEBPS structure. It could even be used in conjunction with a complimentary output plugin that pushed changed files back to a repository.

It would probably never be perfect, however, since Sigil/Gumbo might rearrange attribute orders in otherwise "unchanged" files, but it's probably doable.

EDIT: I see KevinH came up with a similar suggestion while I was typing.

Last edited by DiapDealer; 10-13-2015 at 01:38 PM.
DiapDealer is offline   Reply With Quote
Old 10-13-2015, 12:51 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Sounds like a good candidate for an Import plugin.


But you could also use a pre-commit hook to wipe the working tree and extract the EPUB:

Code:
git ls-tree --name-only -z HEAD | grep -zvE "*.epub$" | xargs -0 rm -r
unzip -qqo *.epub
git add .
Then a git commit will fetch and commit any changes from the EPUB.


Sigil includes a feature to save files outside Sigil, open them in an external editor, and read back changes.



You could also make use of calibre's Unpack/Explode Book (available through the CLI as `calibre-debug -x /path/to/ebook`).
eschwartz is offline   Reply With Quote
Old 10-14-2015, 01:21 PM   #5
schrijver
Junior Member
schrijver began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2013
Device: Cybook Odyssey
Thanks all of you for your replies!

Quote:
I doubt if the ability to work on unzipped content is ever going to be an integral part of Sigil, quite frankly. It's an epub editor--and epubs are zipped. There are plenty of other editors that will easily allow anyone to manipulate unzipped html/css/xml source files.
Sigil is much better add editing ePub source files than a generic editor! But I also want the ePub files to be unzipped while I work on them as it much better fits my workflow. Other EPUB tools like epubcheck and Readium already work with unzipped files, so it is not a completely novel approach.

If I understand well, the common point in your replies is that the best solution is to come up with a plugin/procedure to keep the zipped ePub, edited by Readium, in synch with an unzipped version that can be tracked in source control?

I’ll definitely look into the plugin API. is this forum post the best starting point https://www.mobileread.com/forums/sho...d.php?t=251452?

Cheers,
schrijver is offline   Reply With Quote
Advert
Old 10-14-2015, 02:02 PM   #6
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: 8,487
Karma: 5703586
Join Date: Nov 2009
Device: many
Hi,

Quote:
Originally Posted by schrijver View Post
Thanks all of you for your replies!
I’ll definitely look into the plugin API. is this forum post the best starting point https://www.mobileread.com/forums/sho...d.php?t=251452?
Cheers,
Yes, plus look at the Sigil_Plugin_Framework_rev5.epub documentation (in a thread there) and then take a look at other plugins people have already created (see the Sigil Plugin Index thread) especially the testme plugin which simply exercises as many interface calls as possible.

An output plugin could be used to do a "commit" into a rcs system and and import plugin could be used to take changes from a rcs and load them into Sigil.

If you want to work on one file, you can have an edit plugin make that file available to whatever you want and then return the result.

Check out the ePub3-itizer as an example of an Output plugin, and KindleImport plugin as an example of a Input plugin. There are a number of validation, and edit plugins that run very specific changes.

As long as you can use a python script to invoke whatever you want to do, it should be doable.

KevinH
KevinH is offline   Reply With Quote
Reply

Tags
folders, sigil, unzip, zip


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Arrange into folders not working properly DrChiper Editor 5 03-01-2014 01:10 PM
Delivery Costs/MB – is that Zipped or Unzipped? Streadmob Kindle Formats 2 02-03-2012 06:12 PM
Working with PRS+ and Folders luckycharms Library Management 4 08-02-2011 03:13 PM
Best (approximately 7 inch) sub-250$ reader for color comics (unzipped CBR/CBZ)? Neole Alternative Devices 15 05-15-2011 05:02 PM
Unzipped files reading as zipped jerrywojo Calibre 1 07-03-2010 02:04 PM


All times are GMT -4. The time now is 01:14 PM.


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