2020-07-06 15:07:22 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-10-09 15:14:58 +00:00
|
|
|
fromDir="$HOME/Documents/slip-box/"
|
2020-07-06 15:07:22 +00:00
|
|
|
toDir="$HOME/devel/personal/Ryankes.eu/wiki"
|
|
|
|
date=$(date)
|
|
|
|
|
|
|
|
rm -rf "$toDir"/wiki/*
|
2020-09-17 12:08:21 +00:00
|
|
|
grep -ril "^\#+select_tags:[\ a-zA-Z0-9]namepage" "$fromDir"*.org | while read -r line; do
|
2020-07-06 15:07:22 +00:00
|
|
|
baseName="$(basename "$line")"
|
|
|
|
markdownFilename="$(echo "$baseName" | cut -f 1 -d '.').md"
|
|
|
|
pandoc "$line" --filter convertLinks.py -t markdown_mmd+yaml_metadata_block -o "$toDir/wiki/$markdownFilename" -s
|
|
|
|
echo "Exporting $baseName to $markdownFilename"
|
|
|
|
done
|
|
|
|
|
|
|
|
git -C "$toDir" add .
|
2020-11-15 13:26:14 +00:00
|
|
|
git -C "$toDir" commit -m "docs: update $date"
|
2020-07-06 15:07:22 +00:00
|
|
|
git -C "$toDir" push origin master
|