So You Want To Make An Ebook?: Quick Access for HTML reference entities for ePub

ebook_cover_200Yes, folks, I’m working on a new version that addresses things that have come up since the last one, KF8, and the rest.

I’ve been doing a lot of eBook conversion this week, and one thing that gets really old is re-looking up HTML entity conversion tables.  So I hacked this up as a break (yes, I’m that much of a geek).

This uses the HTML conversion table (plaintext) that I pasted here;  this is not a comprehensive list, but it’s the ones I’ve typically used, sorted by type.  Then I use this bash script to show a display of the entities I want in Zenity, which is cross-platform.  The real guts of this is actually SED (which has been ported back and forth to other platforms as well).

Remember SED?  We used it back here, and then got some help from David D. Levine.

I looked at the SED one-liners and saw this one:

# print paragraph if it contains AAA (blank lines separate paragraphs)
 # HHsed v1.5 must insert a 'G;' after 'x;' in the next 3 scripts below
 sed -e '/./{H;$!d;}' -e 'x;/AAA/!d;'

And that’s really the core of the thing.  All the bash script does is print out the file, pipe it to SED, and then feed the results to Zenity.  This should be achievable on other platforms using scripting.  At the very least, it should give you an idea of where to start poking at your system to give you nice, sorted, usable output like this:

For those of you working on Macs and Windows boxen, here’s a challenge:  First script solutions that serve the same role as my bash script) native to those systems will get a free copy of any eBook from the Alliteration Ink store.  Post your solution in the comments!