tools: shake file requires pandoc, filters use current snapshot

This commit is contained in:
Simon Michael 2016-04-05 15:23:20 -07:00
parent 9439d1a611
commit 099870e96a
8 changed files with 15 additions and 13 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/env stack
{- stack runghc
{- stack runghc --verbosity info
--package base-prelude
--package directory
--package extra
@ -7,6 +7,7 @@
--package safe
--package shake
--package time
--package pandoc
-}
{-
Usage: see below.
@ -49,6 +50,7 @@ usage = [i|Usage:
Commands:
compile
manpages
webmanual
|]
manpages :: [String]
@ -72,10 +74,10 @@ buildDir :: FilePath
buildDir = ".build"
pandocExe :: String
pandocExe = "pandoc"
pandocExe = "stack exec -- pandoc" -- use the pandoc required above
pandocFiltersResolver :: String
pandocFiltersResolver = "--resolver lts-5.11"
pandocFiltersResolver = ""
main :: IO ()
main = do
@ -133,7 +135,7 @@ main = do
md = manpageDir p </> p <.> "md"
tmpl = "doc/manpage.html"
need $ md : tmpl : pandocFilters
cmd "pandoc" md "--to markdown"
cmd pandocExe md "--to markdown"
-- XXX assume this is compiled
"--filter tools/pandocRemoveManonlyBlocks"
"-o" out
@ -157,11 +159,11 @@ main = do
-- md = manpageDir p </> p <.> "md"
-- tmpl = "doc/manpage.html"
-- need [md, tmpl]
-- cmd "pandoc" md "--to html --filter tools/pandocRemoveManpageBlocks.hs --template" tmpl "-o" out
-- cmd pandocExe md "--to html --filter tools/pandocRemoveManpageBlocks.hs --template" tmpl "-o" out
-- "site/manual2.html" %> \out -> do
-- need ["site/manual2.md"]
-- cmd "pandoc site/manual2.md -o" out
-- cmd pandocExe "site/manual2.md -o" out
-- "_build//*.o" %> \out -> do
-- let c = dropDirectory1 $ out -<.> "c"

View File

@ -1,5 +1,5 @@
#!/usr/bin/env stack
{- stack runghc --verbosity info --resolver lts-5.11 --package pandoc-types-1.16.1 -}
{- stack runghc --verbosity info --package pandoc-types-1.16.1 -}
import Text.Pandoc.JSON
import Text.Pandoc.Walk

View File

@ -1,5 +1,5 @@
#!/usr/bin/env stack
{- stack runghc --verbosity info --resolver lts-5.11 --package pandoc-types-1.16.1 -}
{- stack runghc --verbosity info --package pandoc-types-1.16.1 -}
import Text.Pandoc.JSON

View File

@ -1,5 +1,5 @@
#!/usr/bin/env stack
{- stack runghc --verbosity info --resolver lts-5.11 --package pandoc-types-1.16.1 -}
{- stack runghc --verbosity info --package pandoc-types-1.16.1 -}
import Text.Pandoc.JSON

View File

@ -1,5 +1,5 @@
#!/usr/bin/env stack
{- stack runghc --verbosity info --resolver lts-5.11 --package pandoc-types-1.16.1 -}
{- stack runghc --verbosity info --package pandoc-types-1.16.1 -}
import Text.Pandoc.JSON

View File

@ -1,5 +1,5 @@
#!/usr/bin/env stack
{- stack runghc --verbosity info --resolver lts-5.11 --package pandoc-types-1.16.1 -}
{- stack runghc --verbosity info --package pandoc-types-1.16.1 -}
import Text.Pandoc.Builder
import Text.Pandoc.JSON

View File

@ -1,5 +1,5 @@
#!/usr/bin/env stack
{- stack runghc --verbosity info --resolver lts-5.11 --package pandoc-types-1.16.1 -}
{- stack runghc --verbosity info --package pandoc-types-1.16.1 -}
import Text.Pandoc.JSON

View File

@ -1,5 +1,5 @@
#!/usr/bin/env stack
{- stack runghc --verbosity info --resolver lts-5.11 --package pandoc-types-1.16.1 -}
{- stack runghc --verbosity info --package pandoc-types-1.16.1 -}
import Text.Pandoc.Builder
import Text.Pandoc.JSON