master
Bel LaPointe 2021-12-14 21:48:08 -07:00
parent 7658a68959
commit 4bde877280
1 changed files with 2 additions and 2 deletions

4
poc.sh
View File

@ -28,8 +28,8 @@ original() {
} }
for url in $(foo | grep -o 'https:..www.dndbeyond.com.compendium[^"]*' | sed 's/#.*//' | sort -u); do for url in $(foo | grep -o 'https:..www.dndbeyond.com.compendium[^"]*' | sed 's/#.*//' | sort -u); do
echo $url echo $url
foo $url > /tmp/f.html foo $url \
pandoc --ascii --toc --wrap=none --strip-comments -o /tmp/f.md /tmp/f.html; cat /tmp/f.md \ | pandoc -f html -t markdown --ascii --toc --wrap=none --strip-comments -o - \
| sed '/^:::.*/d' \ | sed '/^:::.*/d' \
| sed -e '/^# Chapter/p' -e '0,/^# Chapter/d' \ | sed -e '/^# Chapter/p' -e '0,/^# Chapter/d' \
| sed -e '/^Share$/,$d' \ | sed -e '/^Share$/,$d' \