From f2bb21f4e60fd1eacd696c2458b4bef6828ed2c8 Mon Sep 17 00:00:00 2001 From: Adam Vogt Date: Wed, 28 Oct 2009 04:30:42 +0100 Subject: Add a basic header to the html manpage output Ignore-this: 2641e0fb3179616075fa7549b57740f3 darcs-hash:20091028033042-1499c-82c78ebe5d67b222a2f62f7da01f2734893553f6 --- util/GenerateManpage.hs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'util') 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 = "

"++releaseName++"

"++ + "

Section: xmonad manual (1)
"++ + "Updated: "++releaseDate++"

"++ + "
" + , writerStandalone = True + , writerTableOfContents = True } $ parsed putStrLn "Documentation created: man/xmonad.1.html" -- cgit v1.2.3