diff --git a/Shake.hs b/Shake.hs index 10ce15488..800e200e9 100755 --- a/Shake.hs +++ b/Shake.hs @@ -77,8 +77,8 @@ groff = "groff" main = do pandocFilters <- - map ("doc" ). nub . sort . map (-<.> "") . filter ("pandoc-" `isPrefixOf`) - <$> S.getDirectoryContents "doc" + map ("tools" ). nub . sort . map (-<.> "") . filter ("pandoc-" `isPrefixOf`) + <$> S.getDirectoryContents "tools" shakeArgs shakeOptions{ @@ -167,11 +167,11 @@ main = do cmd Shell "m4 -P -DMAN -I" dir lib src "|" pandoc "-f markdown -s --template" tmpl - -- "--filter doc/pandoc-drop-web-blocks" - "--filter doc/pandoc-drop-html-blocks" - "--filter doc/pandoc-drop-html-inlines" - "--filter doc/pandoc-drop-links" - "--filter doc/pandoc-drop-notes" + -- "--filter tools/pandoc-drop-web-blocks" + "--filter tools/pandoc-drop-html-blocks" + "--filter tools/pandoc-drop-html-inlines" + "--filter tools/pandoc-drop-links" + "--filter tools/pandoc-drop-notes" "-o" out -- render man page nroffs to fixed-width text for embedding in executables, with nroff @@ -195,11 +195,11 @@ main = do cmd Shell "m4 -P -I" dir lib src "|" pandoc "-f markdown" - -- "--filter doc/pandoc-drop-web-blocks" - "--filter doc/pandoc-drop-html-blocks" - "--filter doc/pandoc-drop-html-inlines" - "--filter doc/pandoc-drop-links" - "--filter doc/pandoc-drop-notes" + -- "--filter tools/pandoc-drop-web-blocks" + "--filter tools/pandoc-drop-html-blocks" + "--filter tools/pandoc-drop-html-inlines" + "--filter tools/pandoc-drop-links" + "--filter tools/pandoc-drop-notes" "-t texinfo |" makeinfo "--force --no-split -o" out @@ -234,9 +234,9 @@ main = do cmd Shell "m4 -P -DMAN -DWEB -I" dir lib src "|" pandoc "-f markdown -t markdown --atx-headers" - "--filter doc/pandoc-demote-headers" - -- "--filter doc/pandoc-add-toc" - -- "--filter doc/pandoc-drop-man-blocks" + "--filter tools/pandoc-demote-headers" + -- "--filter tools/pandoc-add-toc" + -- "--filter tools/pandoc-drop-man-blocks" ">>" out -- adjust and combine man page mds for single-page web output, using pandoc @@ -248,10 +248,10 @@ main = do forM_ webmanpages $ \f -> do -- site/hledger.md, site/journal.md cmd Shell ("printf '\\n\\n' >>") webmanall :: Action ExitCode cmd Shell "pandoc" f "-t markdown --atx-headers" - -- "--filter doc/pandoc-drop-man-blocks" - "--filter doc/pandoc-drop-toc" - -- "--filter doc/pandoc-capitalize-headers" - "--filter doc/pandoc-demote-headers" + -- "--filter tools/pandoc-drop-man-blocks" + "--filter tools/pandoc-drop-toc" + -- "--filter tools/pandoc-capitalize-headers" + "--filter tools/pandoc-demote-headers" ">>" webmanall :: Action ExitCode -- build the currently checked out web docs and save as a named snapshot diff --git a/doc/.gitignore b/doc/.gitignore index 77d4d9d0b..5ed0544af 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,10 +1,10 @@ -pandoc-add-toc -pandoc-capitalize-headers -pandoc-demote-headers -pandoc-drop-html-blocks -pandoc-drop-html-inlines -pandoc-drop-links -pandoc-drop-man-blocks -pandoc-drop-notes -pandoc-drop-toc -pandoc-drop-web-blocks +../tools/pandoc-add-toc +../tools/pandoc-capitalize-headers +../tools/pandoc-demote-headers +../tools/pandoc-drop-html-blocks +../tools/pandoc-drop-html-inlines +../tools/pandoc-drop-links +../tools/pandoc-drop-man-blocks +../tools/pandoc-drop-notes +../tools/pandoc-drop-toc +../tools/pandoc-drop-web-blocks diff --git a/tools/pandoc-add-toc b/tools/pandoc-add-toc new file mode 100755 index 000000000..cebca605b Binary files /dev/null and b/tools/pandoc-add-toc differ diff --git a/doc/pandoc-add-toc.hs b/tools/pandoc-add-toc.hs similarity index 100% rename from doc/pandoc-add-toc.hs rename to tools/pandoc-add-toc.hs diff --git a/tools/pandoc-capitalize-headers b/tools/pandoc-capitalize-headers new file mode 100755 index 000000000..41c1bb886 Binary files /dev/null and b/tools/pandoc-capitalize-headers differ diff --git a/doc/pandoc-capitalize-headers.hs b/tools/pandoc-capitalize-headers.hs similarity index 100% rename from doc/pandoc-capitalize-headers.hs rename to tools/pandoc-capitalize-headers.hs diff --git a/tools/pandoc-demote-headers b/tools/pandoc-demote-headers new file mode 100755 index 000000000..21daf5577 Binary files /dev/null and b/tools/pandoc-demote-headers differ diff --git a/doc/pandoc-demote-headers.hs b/tools/pandoc-demote-headers.hs similarity index 100% rename from doc/pandoc-demote-headers.hs rename to tools/pandoc-demote-headers.hs diff --git a/tools/pandoc-drop-html-blocks b/tools/pandoc-drop-html-blocks new file mode 100755 index 000000000..2123d638d Binary files /dev/null and b/tools/pandoc-drop-html-blocks differ diff --git a/doc/pandoc-drop-html-blocks.hs b/tools/pandoc-drop-html-blocks.hs similarity index 100% rename from doc/pandoc-drop-html-blocks.hs rename to tools/pandoc-drop-html-blocks.hs diff --git a/tools/pandoc-drop-html-inlines b/tools/pandoc-drop-html-inlines new file mode 100755 index 000000000..33e84e837 Binary files /dev/null and b/tools/pandoc-drop-html-inlines differ diff --git a/doc/pandoc-drop-html-inlines.hs b/tools/pandoc-drop-html-inlines.hs similarity index 100% rename from doc/pandoc-drop-html-inlines.hs rename to tools/pandoc-drop-html-inlines.hs diff --git a/tools/pandoc-drop-links b/tools/pandoc-drop-links new file mode 100755 index 000000000..4d2a9e837 Binary files /dev/null and b/tools/pandoc-drop-links differ diff --git a/doc/pandoc-drop-links.hs b/tools/pandoc-drop-links.hs similarity index 100% rename from doc/pandoc-drop-links.hs rename to tools/pandoc-drop-links.hs diff --git a/tools/pandoc-drop-man-blocks b/tools/pandoc-drop-man-blocks new file mode 100755 index 000000000..56edc7959 Binary files /dev/null and b/tools/pandoc-drop-man-blocks differ diff --git a/doc/pandoc-drop-man-blocks.hs b/tools/pandoc-drop-man-blocks.hs similarity index 100% rename from doc/pandoc-drop-man-blocks.hs rename to tools/pandoc-drop-man-blocks.hs diff --git a/tools/pandoc-drop-notes b/tools/pandoc-drop-notes new file mode 100755 index 000000000..d0d30771f Binary files /dev/null and b/tools/pandoc-drop-notes differ diff --git a/doc/pandoc-drop-notes.hs b/tools/pandoc-drop-notes.hs similarity index 100% rename from doc/pandoc-drop-notes.hs rename to tools/pandoc-drop-notes.hs diff --git a/tools/pandoc-drop-toc b/tools/pandoc-drop-toc new file mode 100755 index 000000000..dabbe3d4d Binary files /dev/null and b/tools/pandoc-drop-toc differ diff --git a/doc/pandoc-drop-toc.hs b/tools/pandoc-drop-toc.hs similarity index 100% rename from doc/pandoc-drop-toc.hs rename to tools/pandoc-drop-toc.hs diff --git a/tools/pandoc-drop-web-blocks b/tools/pandoc-drop-web-blocks new file mode 100755 index 000000000..f39e08d39 Binary files /dev/null and b/tools/pandoc-drop-web-blocks differ diff --git a/doc/pandoc-drop-web-blocks.hs b/tools/pandoc-drop-web-blocks.hs similarity index 100% rename from doc/pandoc-drop-web-blocks.hs rename to tools/pandoc-drop-web-blocks.hs