]> git.armaanb.net Git - lightcards-gemini.git/blob - convert
Make links relative to root
[lightcards-gemini.git] / convert
1 #!/usr/bin/env bash
2
3 curl -O https://git.sr.ht/~armaan/lightcards/blob/main/man/lightcards.1
4 curl -O https://git.sr.ht/~armaan/lightcards/blob/main/man/lightcards-config.5
5
6 find . -type f -name 'lightcards**' -not -name '*gmi*' | \
7         while read i; do
8                 base=$(basename ${i} | cut -d '.' -f -2)
9                 pandoc ${i} -t markdown | md2gemini > ${base}.gmi
10                 sed -i -e 's/[*]//g' -e 's/^\: */    /g' -e 's/%5C//g' ${base}.gmi
11                 rm ${i}
12         done