mirror of
https://github.com/alrayyes/dotfiles/
synced 2023-11-14 15:56:30 +00:00
18 lines
586 B
Plaintext
18 lines
586 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
fromDir="$HOME/Documents/org-roam/"
|
||
|
toDir="$HOME/devel/personal/Ryankes.eu/wiki"
|
||
|
date=$(date)
|
||
|
|
||
|
rm -rf "$toDir"/wiki/*
|
||
|
grep -ril "^\#+tags:[\ a-zA-Z0-9]namepage" "$fromDir"*.org | while read -r line; do
|
||
|
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 .
|
||
|
git -C "$toDir" commit -m "Update $date"
|
||
|
git -C "$toDir" push origin master
|