2020-11-08 20:38:58 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
cd "$(git rev-parse --show-toplevel)" || exit 1
|
|
|
|
|
|
|
|
src="$1"
|
|
|
|
dst="$2"
|
|
|
|
|
2020-11-09 10:37:32 +00:00
|
|
|
./engine/org2gemini_step1.sh "$src" | \
|
2020-11-09 10:46:18 +00:00
|
|
|
perl -pe 's#\[\[([^]]*)\]\[([^]]*)\]\]#\n=> $1 $2#g;s#=> file:([^ ]*)\.org#=> $1.gmi#g;s#\[\[(file:)?([^]]*)\]\]#=> $2#g;' | \
|
|
|
|
perl -pe 's#^\* *\n##' > "$dst"
|