diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2009-10-28 04:30:42 +0100 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2009-10-28 04:30:42 +0100 |
commit | f2bb21f4e60fd1eacd696c2458b4bef6828ed2c8 (patch) | |
tree | be7adf751e1bbadbfa43b05c9020b5c3e9172d6a | |
parent | 05e2bac3baa8cc1a629ec4add1849d1fff5d5690 (diff) | |
download | metatile-f2bb21f4e60fd1eacd696c2458b4bef6828ed2c8.tar metatile-f2bb21f4e60fd1eacd696c2458b4bef6828ed2c8.zip |
Add a basic header to the html manpage output
Ignore-this: 2641e0fb3179616075fa7549b57740f3
darcs-hash:20091028033042-1499c-82c78ebe5d67b222a2f62f7da01f2734893553f6
-rw-r--r-- | util/GenerateManpage.hs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/util/GenerateManpage.hs b/util/GenerateManpage.hs index 77a45ab..3c289d8 100644 --- a/util/GenerateManpage.hs +++ b/util/GenerateManpage.hs @@ -33,7 +33,7 @@ import Distribution.Text import Text.Pandoc -releaseDate = "\"8 September 09\"" +releaseDate = "25 October 09" trim :: String -> String trim = reverse . dropWhile isSpace . reverse . dropWhile isSpace @@ -64,7 +64,7 @@ main = do keybindings <- (intercalate "\n\n" . map markdownDefn . allBindings) `liftM` readFile "./XMonad/Config.hs" - let manHeader = unwords [".TH xmonad 1",releaseDate,releaseName,"\"xmonad manual\""] + let manHeader = unwords [".TH xmonad 1","\""++releaseDate++"\"",releaseName,"\"xmonad manual\""] writeOpts = defaultWriterOptions -- { writerLiterateHaskell = True } parsed <- readMarkdown defaultParserState { stateLiterateHaskell = True } @@ -80,6 +80,12 @@ main = do putStrLn "Documentation created: man/xmonad.1" writeFile "./man/xmonad.1.html" - . writeHtmlString writeOpts { writerStandalone = True } + . writeHtmlString writeOpts + { writerHeader = "<h1>"++releaseName++"</h1>"++ + "<p>Section: xmonad manual (1)<br>"++ + "Updated: "++releaseDate++"</p>"++ + "<hr>" + , writerStandalone = True + , writerTableOfContents = True } $ parsed putStrLn "Documentation created: man/xmonad.1.html" |