aboutsummaryrefslogtreecommitdiff
path: root/gendocs
blob: 09912d52c889b6fff3708a63314db4c9b3618c64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#! /usr/bin/env bqn

# Generate HTML files from markdown ones
AtListType  file
files  {
  # args gives a list of files, but if it's empty, convert everything
  0<≠•args ? (('/'=)⊸↓•path∾⁼•wdpathAt)¨ args
;
  # All markdown files in directories corresponding to ones in docs/
  SubDirs  { 𝕩 <⊸∾  𝕊¨ ('d'=Type¨)/ 𝕩⊸At¨ List 𝕩 }
   (<At¨·(".md"≡¯3⊸↑)¨⊸/List)¨ (≠↓¨SubDirs) "docs/"
}
files Import "md.bqn"