aboutsummaryrefslogtreecommitdiff
path: root/help/genhelp.bqn
blob: 5b11366bc9b35f8aa08ca9f5e77ef32beb45ae13 (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 ""
gl  "+-×÷⋆√⌊⌈∧∨¬|≤<>≥=≠≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!˙˜∘○⊸⟜⌾⊘◶⎊⎉˘⚇¨⌜⍟⁼´˝`←⇐↩⋄,.(){};:?⟨⟩[]‿·•𝕨𝕎𝕩𝕏𝕗𝔽𝕘𝔾𝕤𝕊𝕣¯π∞@#"

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

head  
"*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/index.html).*"
⟨⟩
"# REPL Help"
⟨⟩
"| Symbol | Link |"
"|--------|------|"

"README.md" •FLines head  rows