mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-10 05:39:31 +03:00
;shake: txt manuals are different, group others together
[ci skip]
This commit is contained in:
parent
f91076cc6a
commit
95f1172c1b
28
Shake.hs
28
Shake.hs
@ -263,6 +263,20 @@ main = do
|
|||||||
,webmanuals
|
,webmanuals
|
||||||
]
|
]
|
||||||
|
|
||||||
|
-- Generate plain text manuals suitable for embedding in
|
||||||
|
-- executables and viewing with a pager.
|
||||||
|
phony "txtmanuals" $ need txtmanuals
|
||||||
|
txtmanuals |%> \out -> do -- hledger/hledger.txt
|
||||||
|
let src = manualNameToManpageName $ dropExtension out
|
||||||
|
need [src]
|
||||||
|
-- cmd Shell groff "-t -e -mandoc -Tascii" src "| col -b >" out -- http://www.tldp.org/HOWTO/Man-Page/q10.html
|
||||||
|
-- Workaround: groff 1.22.4 always calls grotty in a way that adds ANSI/SGR escape codes.
|
||||||
|
-- (groff -c is supposed to switch those to backspaces, which we could
|
||||||
|
-- remove with col -b, but it doesn't as can be seen with groff -V.)
|
||||||
|
-- To get plain text, we run groff's lower-level commands (from -V) and add -cbuo.
|
||||||
|
-- -Wall silences most troff warnings, remove to see them
|
||||||
|
cmd Shell "tbl" src "| eqn -Tascii | troff -Wall -mandoc -Tascii | grotty -cbuo >" out
|
||||||
|
|
||||||
-- Generate nroff man pages suitable for man output.
|
-- Generate nroff man pages suitable for man output.
|
||||||
phony "nroffmanuals" $ need nroffmanuals
|
phony "nroffmanuals" $ need nroffmanuals
|
||||||
nroffmanuals |%> \out -> do -- hledger/hledger.1
|
nroffmanuals |%> \out -> do -- hledger/hledger.1
|
||||||
@ -283,20 +297,6 @@ main = do
|
|||||||
"--lua-filter tools/pandoc-drop-links.lua"
|
"--lua-filter tools/pandoc-drop-links.lua"
|
||||||
"-o" out
|
"-o" out
|
||||||
|
|
||||||
-- Generate plain text manuals suitable for embedding in
|
|
||||||
-- executables and viewing with a pager.
|
|
||||||
phony "txtmanuals" $ need txtmanuals
|
|
||||||
txtmanuals |%> \out -> do -- hledger/hledger.txt
|
|
||||||
let src = manualNameToManpageName $ dropExtension out
|
|
||||||
need [src]
|
|
||||||
-- cmd Shell groff "-t -e -mandoc -Tascii" src "| col -b >" out -- http://www.tldp.org/HOWTO/Man-Page/q10.html
|
|
||||||
-- Workaround: groff 1.22.4 always calls grotty in a way that adds ANSI/SGR escape codes.
|
|
||||||
-- (groff -c is supposed to switch those to backspaces, which we could
|
|
||||||
-- remove with col -b, but it doesn't as can be seen with groff -V.)
|
|
||||||
-- To get plain text, we run groff's lower-level commands (from -V) and add -cbuo.
|
|
||||||
-- -Wall silences most troff warnings, remove to see them
|
|
||||||
cmd Shell "tbl" src "| eqn -Tascii | troff -Wall -mandoc -Tascii | grotty -cbuo >" out
|
|
||||||
|
|
||||||
-- Generate Info manuals suitable for viewing with info.
|
-- Generate Info manuals suitable for viewing with info.
|
||||||
phony "infomanuals" $ need infomanuals
|
phony "infomanuals" $ need infomanuals
|
||||||
infomanuals |%> \out -> do -- hledger/hledger.info
|
infomanuals |%> \out -> do -- hledger/hledger.info
|
||||||
|
Loading…
Reference in New Issue
Block a user