Initial (and hopefully only) commit
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a442e64
--- /dev/null
+++ b/README.md
@@ -0,0 +1,23 @@
+# simple epub
+
+worlds simplest epub viewer, written with the "worse is better"
+philosophy. run `epub.sh` and choose your epub file. Then choose which
+part you wish to view, it will open in firefox.
+
+## FAQ
+
+### what about themes?
+
+```
+$ ed script.html
+```
+
+### this doesn't work with my epub file
+
+sorry
+
+### how does this work?
+
+epubs are just zip files with html files & pictures/css in them. They
+also have some metadata, which this script totally ignores. it works
+Good Enough™ in most cases.
diff --git a/epub.sh b/epub.sh
new file mode 100755
index 0000000..6776c94
--- /dev/null
+++ b/epub.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+shopt -s lastpipe
+
+epub="$(zenity --file-selection)"
+files="$(mktemp -d)"
+unzip "$epub" -d "$files"
+
+# get list of xhtml files to display
+xhtmls="$(ls "$files"/OEBPS/*.xhtml | xargs -l basename)"
+
+choosepart() {
+	echo "$xhtmls" | zenity --list --title "epub parts | $epub" \
+							--text "Choose a part" \
+							--column "Parts" \
+							--width 400 --height 400 \
+		| read part
+
+	if [ "$part" = "" ]; then
+		exit 1
+	fi
+
+	echo part $part
+
+	path="$files/OEBPS/$part"
+	cat "$path" "$(dirname $0)/script.html" > "$path.html"
+
+	firefox "$path.html"
+}
+
+while choosepart; do
+	true
+done
+
+rm -rf "$files"
diff --git a/script.html b/script.html
new file mode 100644
index 0000000..620951c
--- /dev/null
+++ b/script.html
@@ -0,0 +1,15 @@
+<style>
+
+ body {
+	 font-size: 16pt;
+	 max-width: 40em;
+	 margin: auto;
+	 font-family: Palatino, Georgia!important;
+	 line-height: 1.4em;
+ }
+ 
+ p, li, td {
+	 font-size: 16pt!important;
+ }
+ 
+</style>