add a script to copy images over

main
Brian Hicks 2023-04-24 08:37:51 -05:00
parent 2c634917ef
commit 7f5ee77745
Signed by: brian
GPG Key ID: C4F324B9CAAB0D50
1 changed files with 12 additions and 0 deletions

12
copy-image-from-obsidian.sh Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
SRC="${@:-}"
if test -z "$SRC"; then
echo "USAGE: ${0:-} filename.png"
exit 1
fi
DEST="$(sed -E 's/ +/-/g' <<< "$SRC")"
cp "$HOME/Notes/media/$SRC" "static/images/$DEST"