From ed6f7b5ac3ba26c044b4a70a3d61e01ad784d1cf Mon Sep 17 00:00:00 2001 From: gnat Date: Sat, 27 Jul 2024 13:59:26 -0700 Subject: [PATCH] add scripts directory --- scripts/img-caption | 11 +++++++++++ scripts/make-link | 1 + 2 files changed, 12 insertions(+) create mode 100755 scripts/img-caption create mode 100755 scripts/make-link diff --git a/scripts/img-caption b/scripts/img-caption new file mode 100755 index 0000000..33b36ea --- /dev/null +++ b/scripts/img-caption @@ -0,0 +1,11 @@ +#!/bin/bash + +path=$1 +caption=$2 + +if [ -z "${caption}" ]; then + caption="$(basename "$path" | sed 's/-/ /g; s/\.[^.]*$//')" +fi + +echo "
$caption
$caption
" + diff --git a/scripts/make-link b/scripts/make-link new file mode 100755 index 0000000..79aa553 --- /dev/null +++ b/scripts/make-link @@ -0,0 +1 @@ +echo "$1"