From c3bb2309bdfd8598a2c71fa66c95543fb70ca9c1 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Fri, 15 Jul 2022 16:28:42 -0400 Subject: =?UTF-8?q?Convert=20./gendocs=20from=20bash=20to=20BQN=20(require?= =?UTF-8?q?s=20=E2=80=A2file.At=20bugfix=20from=20latest=20CBQN)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gendocs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gendocs b/gendocs index c7a566ff..559d4f5b 100755 --- a/gendocs +++ b/gendocs @@ -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 𝕩 } + ∾ (