diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-07-15 16:28:42 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-07-15 16:28:42 -0400 |
| commit | c3bb2309bdfd8598a2c71fa66c95543fb70ca9c1 (patch) | |
| tree | b9ff4530796b93b35640760cfaab39132a454584 | |
| parent | f989e80fb38beea9c803d34ceee6f40bdbf0269a (diff) | |
Convert ./gendocs from bash to BQN (requires •file.At bugfix from latest CBQN)
| -rwxr-xr-x | gendocs | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,11 @@ -#! /usr/bin/env bash +#! /usr/bin/env bqn # Generate HTML files from markdown ones -# Argument gives specific files if present; otherwise convert everything -bqn md.bqn ${1-*.md */*.md */*/*.md} ${@:2:$#} +# •args gives a list of files if present; otherwise convert everything +files ← { 0<≠•args ? •args ; + # All markdown files in directories corresponding to ones in docs/ + At‿List‿Type ← •file + SubDirs ← { 𝕩 <⊸∾ ∾ 𝕊¨ ('d'=Type¨)⊸/ 𝕩⊸At¨ List 𝕩 } + ∾ (<At¨·(".md"≡¯3⊸↑)¨⊸/List)¨ (≠↓¨SubDirs) At "docs/" +} +files •Import "md.bqn" |
