;tools: Shake: comment unused orgfiles script

This commit is contained in:
Simon Michael 2024-12-12 09:29:48 -10:00
parent 27329f7de8
commit 2168382058

View File

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