mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 08:30:21 -07:00
Update util/GenerateManpage for pandoc 1.6
This commit is contained in:
parent
fa8fe9aca4
commit
ae59a5184f
@ -34,7 +34,7 @@ import Distribution.PackageDescription
|
|||||||
import Text.PrettyPrint.HughesPJ
|
import Text.PrettyPrint.HughesPJ
|
||||||
import Distribution.Text
|
import Distribution.Text
|
||||||
|
|
||||||
import Text.Pandoc
|
import Text.Pandoc -- works with 1.6
|
||||||
|
|
||||||
releaseDate = "25 October 09"
|
releaseDate = "25 October 09"
|
||||||
|
|
||||||
@ -76,21 +76,22 @@ main = do
|
|||||||
. lines
|
. lines
|
||||||
<$> readFile "./man/xmonad.1.markdown"
|
<$> readFile "./man/xmonad.1.markdown"
|
||||||
|
|
||||||
Right template <- getDefaultTemplate "man"
|
Right template <- getDefaultTemplate Nothing "man"
|
||||||
writeFile "./man/xmonad.1"
|
writeFile "./man/xmonad.1"
|
||||||
. (manHeader ++)
|
. (manHeader ++)
|
||||||
. writeMan writeOpts{ writerStandalone = True, writerTemplate = template }
|
. writeMan writeOpts{ writerStandalone = True, writerTemplate = template }
|
||||||
$ parsed
|
$ parsed
|
||||||
putStrLn "Documentation created: man/xmonad.1"
|
putStrLn "Documentation created: man/xmonad.1"
|
||||||
|
|
||||||
Right template <- getDefaultTemplate "html"
|
Right template <- getDefaultTemplate Nothing "html"
|
||||||
writeFile "./man/xmonad.1.html"
|
writeFile "./man/xmonad.1.html"
|
||||||
. writeHtmlString writeOpts
|
. writeHtmlString writeOpts
|
||||||
{ writerIncludeBefore =
|
{ writerVariables =
|
||||||
"<h1>"++releaseName++"</h1>"++
|
[("include-before"
|
||||||
|
,"<h1>"++releaseName++"</h1>"++
|
||||||
"<p>Section: xmonad manual (1)<br/>"++
|
"<p>Section: xmonad manual (1)<br/>"++
|
||||||
"Updated: "++releaseDate++"</p>"++
|
"Updated: "++releaseDate++"</p>"++
|
||||||
"<hr/>"
|
"<hr/>")]
|
||||||
, writerStandalone = True
|
, writerStandalone = True
|
||||||
, writerTemplate = template
|
, writerTemplate = template
|
||||||
, writerTableOfContents = True }
|
, writerTableOfContents = True }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user