This repository has been archived on 2024-02-25. You can view files and clone it, but cannot push or open issues/pull-requests.
bytes.zone/copy-image-from-obsidian.sh

13 lines
215 B
Bash
Executable File

#!/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"