]> gitweb.michael.orlitzky.com - dead/lwn-epub.git/blobdiff - src/LWN/Article.hs
Add a first draft using HXT, HandsomeSoup, and the Haskell epub library.
[dead/lwn-epub.git] / src / LWN / Article.hs
diff --git a/src/LWN/Article.hs b/src/LWN/Article.hs
new file mode 100644 (file)
index 0000000..2da1735
--- /dev/null
@@ -0,0 +1,14 @@
+module LWN.Article
+where
+
+import XHTML
+
+data Article = Article { headline  :: String,
+                         byline    :: String,
+                         body_html :: String }
+
+instance XHTML Article where
+  to_xhtml (Article hl bl b) =
+    "<h1>" ++ hl ++ "</h1>\n\n" ++
+    "<h2>" ++ bl ++ "</h2>\n\n" ++
+    b