2021-11-27 15:19:56 +00:00
|
|
|
import DocGen4
|
|
|
|
import Lean
|
|
|
|
|
2021-12-05 13:56:25 +00:00
|
|
|
open DocGen4 Lean IO
|
2021-11-27 15:19:56 +00:00
|
|
|
|
2021-12-05 13:56:25 +00:00
|
|
|
def main (args : List String) : IO Unit := do
|
2022-01-20 14:03:10 +00:00
|
|
|
if args.isEmpty then
|
|
|
|
IO.println "Usage: doc-gen4 root/url/ Module1 Module2 ..."
|
|
|
|
IO.Process.exit 1
|
|
|
|
return
|
2022-01-07 09:56:39 +00:00
|
|
|
let root := args.head!
|
|
|
|
let modules := args.tail!
|
2021-12-05 13:56:25 +00:00
|
|
|
let path ← lakeSetupSearchPath (←getLakePath) modules.toArray
|
|
|
|
IO.println s!"Loading modules from: {path}"
|
|
|
|
let doc ← load $ modules.map Name.mkSimple
|
2021-12-15 11:02:05 +00:00
|
|
|
IO.println "Outputting HTML"
|
2022-01-07 09:56:39 +00:00
|
|
|
htmlOutput doc root
|