Files

27 lines
574 B
Fish
Executable File

#!/usr/bin/env fish
function html_to_md
set -l filename $argv[1]
set -l filename_md $(basename $filename .html).md
echo "transforming $filename => $filename_md..."
pandoc -f html -t markdown $filename -o $filename_md
end
# funcsave html_to_md # uncomment only for the first run / when this function changes
function main
if not type -q bun
echo "bun is not installed"
return 1
end
rm typst-docs/*
bun index.ts
cd typst-docs
parallel -j 8 html_to_md ::: (ls -1)
cat *.md > DOCUMENTATION.md
cd ../
end
main