summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorwuhei <wuhei@users.noreply.github.com>2026-11-20 15:49:14 +0100
committerwuhei <wuhei@users.noreply.github.com>2026-11-20 15:49:14 +0100
commit07ac2567dab0041ced22fde8fafbd4c7ae90da0e (patch)
treeef4bdc29f7195a27931e7889424dec487c9784b9 /scripts
parent6f9aaf04904a5b1d455fae358d3f88cc1e5384ee (diff)
downloadlilchinese-07ac2567dab0041ced22fde8fafbd4c7ae90da0e.tar.gz
prepare for publication: MIT licence, no bundled third-party photo, tighter ignores
- the intro picture was press photography from a news site; it is no longer tracked (web/intro.jpg is gitignored) and scripts/fetch-intro.sh installs your own. The page drops the <img> if it 404s, so a fresh clone is just the red field and the title. - .gitignore now covers recorder output (mp4/mkv/webm/mov/m4v), the media files that land in the working directory during a talk (*.png/*.jpg/*.wav/*.mp3), models and session logs, so 'git add -A' cannot sweep them into a commit. - LICENSE: MIT for the code.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fetch-intro.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/fetch-intro.sh b/scripts/fetch-intro.sh
new file mode 100755
index 0000000..54db7a9
--- /dev/null
+++ b/scripts/fetch-intro.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Installs a picture for the intro page: web/intro.jpg
+#
+# Nothing so specific is shipped with the repo — the page works with the title alone.
+# Give this script a local image (best) or a URL:
+#
+# ./scripts/fetch-intro.sh ~/pictures/session.jpg
+# ./scripts/fetch-intro.sh https://example.org/strug.jpg
+#
+# Whatever you choose must be yours to use: web/intro.jpg is not covered by this
+# project's licence, and it is gitignored so it never ends up in a commit.
+set -eu
+[ $# -ge 1 ] || { sed -n '2,10p' "$0" | sed 's/^# \{0,1\}//'; exit 1; }
+src=$1
+dest=web/intro.jpg
+case "$src" in
+ http://*|https://*)
+ curl -L --fail -A "Mozilla/5.0" -o "$dest" "$src"
+ ;;
+ *)
+ [ -f "$src" ] || { echo "no such file: $src" >&2; exit 1; }
+ cp "$src" "$dest"
+ ;;
+esac
+echo "installed $dest ($(wc -c <"$dest") bytes) — rebuild the binary to embed it"