Ulysses ePub fix – Script Update

This morning I received an email from the Ulysses developers about the ePub bugs I reported. One thing that surpised me was a request to update my script that fixes the playOrder incrementing.

So I did!

Now the script can be run with a zip and unzip options.

and

The unzip option will unpack the ePub file and then send the toc.ncx file to the rest of the script for incrementing. This will be printed to the terminal for inspection. If it looks good, go ahead and fix the OPS/toc.ncx and save it to a new file. I didn’t automate this step because the file needs to be looked at.

To save a step, the file can be saved when unzipping.

The new file can then be moved into place with the following command.

Then the file can be zipped up with the script.

If everything worked, this message will be printed.

Now the .epub file is all packed up and ready to be verified.

The script now lives on GitHub:

[gist]3169e131d5cd8c6f40db[/gist]

Note: Just to save ruby from puking error messages, there’s a generic “Oops” error now. If that shows up it usually means there’s either not enough or too many command line options.

2015-02-25
permalink

<a href="/category/blog/">blog</a>

<a href="/tag/ebooks/">ebooks</a> <a href="/tag/epub/">epub</a> <a href="/tag/software/">software</a> <a href="/tag/ulysses/">ulysses</a>