diff options
| -rwxr-xr-x | gendocs | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,10 +1,12 @@ #! /usr/bin/env bqn # Generate HTML files from markdown ones -# •args gives a list of files if present; otherwise convert everything -files ← { 0<≠•args ? •args ; +At‿List‿Type ← •file +files ← { + # •args gives a list of files, but if it's empty, convert everything + 0<≠•args ? (('/'=⊑)⊸↓•path∾⁼•wdpath⊸At)¨ •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) "docs/" } |
