Refactor gen.ml with pipes
This commit is contained in:
parent
80920018a4
commit
7e960d5754
1 changed files with 7 additions and 5 deletions
10
posts/gen.ml
10
posts/gen.ml
|
|
@ -4,9 +4,11 @@ let pandoc_params = "--css ../../assets/style.css -s --to html5 " ^
|
||||||
"--metadata pagetitle='basename' --highlight-style zenburn "
|
"--metadata pagetitle='basename' --highlight-style zenburn "
|
||||||
|
|
||||||
let vert md = begin
|
let vert md = begin
|
||||||
if md <> "gen.ml" && md <> "html" then
|
let cmd = ("pandoc " ^ pandoc_params ^ md ^ " -o html/" ^ md ^ ".html ") in
|
||||||
ignore( Sys.command ("pandoc " ^ pandoc_params ^ md ^ " -o html/" ^ md ^ ".html ") )
|
ignore( Sys.command cmd )
|
||||||
end ;;
|
end ;;
|
||||||
|
|
||||||
let contents = Array.to_list (Sys.readdir ".") in
|
let contents = Sys.readdir "."
|
||||||
List.map vert contents ;;
|
|> Array.to_list
|
||||||
|
|> List.filter (fun e -> e <> "gen.ml" && e <> "html")
|
||||||
|
|> List.map vert
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue