tools: use latest pandoc, avoiding SoftBreak error

Require a recent snapshot with the latest pandoc-types for the pandoc
filters (may be different from the snapshot used to build hledger).
This commit is contained in:
Simon Michael 2016-04-05 11:56:42 -07:00
parent 01c0f40d00
commit df3cb6d334
8 changed files with 16 additions and 12 deletions

View File

@ -71,6 +71,12 @@ manpageDir p
buildDir :: FilePath
buildDir = ".build"
pandocExe :: String
pandocExe = "pandoc"
pandocFiltersResolver :: String
pandocFiltersResolver = "--resolver lts-5.11"
main :: IO ()
main = do
@ -113,8 +119,7 @@ main = do
md = out <.> "md"
tmpl = "doc/manpage.nroff"
need $ md : tmpl : pandocFilters
cmd "pandoc" md "--to man -s --template" tmpl
-- XXX assume these are compiled
cmd pandocExe md "--to man -s --template" tmpl
"--filter tools/pandocRemoveHtmlBlocks"
"--filter tools/pandocRemoveHtmlInlines"
"--filter tools/pandocRemoveLinks"
@ -135,7 +140,7 @@ main = do
pandocFilters |%> \out -> do
need [out <.> "hs"]
cmd "stack ghc" out
cmd ("stack "++pandocFiltersResolver++" ghc") out
phony "clean" $ do
putNormal "Cleaning generated files"

View File

@ -1,6 +1,5 @@
#!/usr/bin/env stack
-- stack runghc --package pandoc-types
-- ^ installs pandoc-types in the current stack db when needed
{- stack runghc --verbosity info --resolver lts-5.11 --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 --package pandoc-types
{- stack runghc --verbosity info --resolver lts-5.11 --package pandoc-types-1.16.1 -}
import Text.Pandoc.JSON

View File

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

View File

@ -1,5 +1,5 @@
#!/usr/bin/env stack
-- stack runghc --package pandoc-types
{- stack runghc --verbosity info --resolver lts-5.11 --package pandoc-types-1.16.1 -}
import Text.Pandoc.JSON
@ -7,6 +7,6 @@ main :: IO ()
main = toJSONFilter removeLinks
removeLinks :: Inline -> [Inline]
removeLinks (Link l _) = l
removeLinks (Link _ is _) = is
removeLinks x = [x]

View File

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

View File

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