her.esy.fun/engine/org2gemini.sh
Yann Esposito (Yogsototh) 3d0522192c
fix bug in hacky script
2020-11-09 11:37:32 +01:00

10 lines
272 B
Bash
Executable file

#!/usr/bin/env bash
cd "$(git rev-parse --show-toplevel)" || exit 1
src="$1"
dst="$2"
./engine/org2gemini_step1.sh "$src" | \
perl -pe 's#\[\[([^]]*)\]\[([^]]*)\]\]#\n=> $1 $2#g;s#=> file:([^ ]*)\.org#=> $1.gmi#g;s#\[\[(file:)?([^]]*)\]\]#=> $2#g;s#^\* *##' > "$dst"