zeal_tf_aws_docset/convert.sh

15 lines
289 B
Bash
Raw Normal View History

2023-05-31 13:39:56 +00:00
#!/bin/bash -eu
filepath=$1
filename=$(basename ${filepath})
output=$2
output="${output/.html.markdown}.html"
printf "${filepath}\r"
mkdir -p $(dirname ${output})
[ -s $output ] && exit 0
< $filepath awk '$1 == "page_title:"{$1="title:"} 1' | pandoc -f markdown -t html5 -s > $output