![]() |
#1 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#4 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 . 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`). |
![]() |
![]() |
![]() |
#5 | |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Dec 2013
Device: Cybook Odyssey
|
Thanks all of you for your replies!
Quote:
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, |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,487
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hi,
Quote:
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 |
|
![]() |
![]() |
![]() |
Tags |
folders, sigil, unzip, zip |
|
![]() |
||||
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 |