clone:
git clone https://<PAT>@github.com/username/repo.git
filter files changed since (last run)
find /data/nextcloud/sdfueneb/files/notes/blog -type f -newermt $(cat last-run.txt)
/data/nextcloud/sdfueneb/files/notes/_new/20240727-1543-51-836.md /data/nextcloud/sdfueneb/files/notes/_new/20240727-1431-40-468.md /data/nextcloud/sdfueneb/files/notes/_new/20240727-1422-56-562.md
todo: copy to tmp
mkdir /tmp/obsidian2hugo
# todo: nested folders must be created
find /data/nextcloud/sdfueneb/files/notes/_new -type f -newermt 2024-07-24 | awk '{sub("/data/nextcloud/sdfueneb/files/notes", "") ; ; print "cp /data/nextcloud/sdfueneb/files/notes/_new"$1 " /tmp/obsidian2hugo"$1}'|sh
CHANGED_SINCE_DATE="2024-07-24"
BLOG_FOLDER="/data/nextcloud/sdfueneb/files/notes/_new"
while read f; do ;
mkdir -p $(dirname "/tmp/obsidian2hugo${f}");
cp "${BLOG_FOLDER}${f}" "/tmp/obsidian2hugo${f}";
done < <(find "${BLOG_FOLDER}" -type f -newermt "${CHANGED_SINCE_DATE}" | awk '{sub("'${BLOG_FOLDER}'", "")}1');
todo: convert markdown obsidian to hugo
reset current date:
date +%F > last-run.txt
2024-08-01
edit (4 jan 2025) I think this is obsolete I’m guessing this was about changing obsidian wikilinks (with the square brackets) into other links
In the end I ended up changing the hugo template. So instead, my hugo content/xxx contains wikilinks, and the template filters them out.