Skip to content

Instantly share code, notes, and snippets.

View jaywon's full-sized avatar

Jason Sewell jaywon

View GitHub Profile
@singpolyma
singpolyma / epub2html.rb
Created December 6, 2010 21:37
Convert ePub files to XHTML
#!/usr/bin/ruby
# Usage ./epub2html.rb thing.epub thing.html
#
# ePub files are just XHTML with a ton of (often useless) stuff layered on top
# This script extracts the XHTML content and sticks it together
# It tries to preserve common metadata
# It tries to preserve images
# It converts Google Books' crap .gtxt_heading to <h1>