aboutsummaryrefslogtreecommitdiff
path: root/help/genhelp.bqn
blob: 4bf27e092def8709da51cbde6fec0de8c55c5915 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bqn

files  "README.md"¨/ ((¬∊"_.")/¨) ".md"(-↑≡⊣)¨/ •file.List ""

thing  {
    data  •FLines 𝕩
    names  (⊣∾", "∾⊢)´{(¬·`' '=)/(»·`':')/𝕩}¨("## "3)¨/data
    td   ∾/¨(data)=¨"()"
    sym  (+`·»-˝(¬»∧«)='`'1"()"=)/ 2data
    sym (1+'|'=)(/+(-´"\|")×{«⊒/𝕨})
    sym "`,` or `⋄`"("`,``⋄`")
    "| "  sym  " | ["  names  "]("𝕩 ") |"
}¨ files

head  
"*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/index.html).*"
⟨⟩
"# REPL Help"
⟨⟩
"Symbols are listed in alphabetical order of page name, ignoring syntactical roles."
⟨⟩
"| Symbol | Link |"
"|--------|------|"

"README.md" •FLines head  thing #rename once you have a proper file.