bell notificationshomepageloginedit profileclubsdmBox

10% popularity   0 Reactions

Brackets.io

As a suggestion, I have been enjoying using Brackets to create epubs on my Mac.

Procedure

Unarchive your epub into a folder (change the extension to .zip, and extract).
Open Brackets, and go to File -> Open Folder. Select your extracted epub folder.
Edit any of your HTML and CSS files!
Activate Live Preview to view the ebook in Chrome! The preview will change as you type. (Not totally accurate rendering, compared to how it'll look on an eReader, but suitable.)

Why do this? Because Brackets has some pretty neat features. For example, if you're going through your HTML and you decide you want to change the style on something, just highlight the tag or the class attribute and activate Quick Edit (Cmd+E on OSX) and you can immediately edit the CSS styles, even if it's in a different file! Super convenient.

Caveat

One note: if you open the .opf or .ncx files, you will notice that there is no syntax highlighting. To fix this, as covered here, go to Debug -> Open Preferences File and add these as XML types within the JSON structure. For example, here is my preferences file:

{
"useTabChar": false,
"tabSize": 4,
"spaceUnits": 4,
"closeBrackets": false,
"showLineNumbers": true,
"styleActiveLine": true,
"wordWrap": true,
"linting.enabled": true,
"linting.collapsed": false,
"quickview.enabled": true,
"debug.showErrorsInStatusBar": false,
"language.fileExtensions":{
"opf": "xml",
"ncx": "xml"
}
}

Version Control

Being a programmer at heart, version control is appealing to me, even when dealing with ebooks! I use Git for that. The thing with applying version control to an epub file is that an epub is a binary zip archive, so Git would not be able to differentiate between changes to the files if you edit the epub with something like Sigil.

When you're working with the epub exploded, using Brackets, you can use Git to apply version control to what you're doing.

Why do I make this point? Well, mostly to point out that there's a silver lining to the fact that you have to work with the epub exploded if you want to use Brackets.

Generating EPUBs

Edited with new method!

When I want to generate an epub file out of my folder structure, I use a simple Applescript file (remember I'm on OSX) that I found to do this. The essence of the process is creating a zip archive out of the folder and then changing the extension to "epub", but there are some potential issues.

There's an article called Unzip and Zip EPUB files safely with these AppleScripts, which links to a MobileRead thread, in which a fellow named Dan Rodney gives the scripts. Here is a direct link.

I stuck the creation script in my Finder toolbar for easy access, and I changed the icon (detailed here) to an epub logo (with transparent background) that I found on Google Images. So I just highlight the folder in Finder, click the button, and I have an epub!

Validation

Bonus section! Nothing to do with a WYSIWYG editor per se, but validation is important if you're going to be hacking around and editing your epub file by hand!

In terms of validation, EpubCheck is one of the industry standards, and I would suggest using one of the GUI incarnations. The Pagina version works great for me; stick it in the OSX dock and just drag epubs onto it to get a report.

Fin.


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (0)

Login to follow story

More posts by @Shanna

0 Comments

Sorted by latest first Latest Oldest Best

 

Back to top