;tools: Shake: comment unused orgfiles script
This commit is contained in:
parent
27329f7de8
commit
2168382058
44
Shake.hs
44
Shake.hs
@ -772,34 +772,28 @@ main = do
|
||||
phony "site" $ do
|
||||
need [
|
||||
"webmanuals"
|
||||
,"orgfiles"
|
||||
]
|
||||
cmd_ "make -C site build"
|
||||
|
||||
phony "orgfiles" $
|
||||
need [
|
||||
-- "doc/BACKLOG.md"
|
||||
]
|
||||
|
||||
-- These org files are converted to markdown for the website.
|
||||
[ -- "doc/BACKLOG.md"
|
||||
] |%> \out -> do
|
||||
let src = out -<.> "org"
|
||||
need [src]
|
||||
-- replace the generated top heading with our own so we can insert the TOC after it
|
||||
let heading = dropExtension out
|
||||
mdlines <- drop 1 . lines . fromStdout <$> (cmd Shell pandoc fromorg towebmd src :: Action (Stdout String))
|
||||
liftIO $ writeFile out $ unlines $ [
|
||||
"<!-- " ++ "Generated by \"Shake " ++ out ++ " from " ++ src ++ " -->"
|
||||
,""
|
||||
,"# " ++ heading
|
||||
,""
|
||||
,"<div class=\"pagetoc\">"
|
||||
,""
|
||||
,"<!-- toc -->"
|
||||
,"</div>"
|
||||
,""
|
||||
] ++ mdlines
|
||||
-- Markdown generated from org files, for the website.
|
||||
-- [ -- "doc/BACKLOG.md"
|
||||
-- ] |%> \out -> do
|
||||
-- let src = out -<.> "org"
|
||||
-- need [src]
|
||||
-- -- replace the generated top heading with our own so we can insert the TOC after it
|
||||
-- let heading = dropExtension out
|
||||
-- mdlines <- drop 1 . lines . fromStdout <$> (cmd Shell pandoc fromorg towebmd src :: Action (Stdout String))
|
||||
-- liftIO $ writeFile out $ unlines $ [
|
||||
-- "<!-- " ++ "Generated by \"Shake " ++ out ++ " from " ++ src ++ " -->"
|
||||
-- ,""
|
||||
-- ,"# " ++ heading
|
||||
-- ,""
|
||||
-- ,"<div class=\"pagetoc\">"
|
||||
-- ,""
|
||||
-- ,"<!-- toc -->"
|
||||
-- ,"</div>"
|
||||
-- ,""
|
||||
-- ] ++ mdlines
|
||||
|
||||
-- XXX try to style backlog items as unnumbered or nested-numbered list items
|
||||
{-
|
||||
|
||||
Loading…
Reference in New Issue
Block a user