divan-data/update.sh
Anas Rashid 7ac86c7e42 Diwan: classical Urdu poetry & prose from Urdu Wikisource
384 authors, 11,087 works (10,446 poetry, 641 prose), FTS5 search,
JSONL export, daily Gitea Actions sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 22:48:40 +02:00

13 lines
473 B
Bash
Executable File

#!/usr/bin/env bash
# Pull new/edited pages from Wikisource, rebuild index, commit + push only if the data changed.
set -euo pipefail
cd "$(dirname "$0")"
python3 wikisource.py
python3 build_index.py
git add export
if git diff --cached --quiet -- export; then echo "no changes"; exit 0; fi # export/*.jsonl is the change signal; diwan.db bytes change every run
git add diwan.db
git commit -q -m "data: Wikisource sync $(date -u +%F)"
git push -q origin HEAD
echo "pushed"