divan-data/update.sh
Anas Rashid 97f022c9e4
Some checks are pending
Wikisource sync / sync (push) Waiting to run
Ganjoor-compatible export (manifest.json, poets/, index/)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:05:14 +02:00

14 lines
493 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
python3 export_ganjoor.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 -A
git commit -q -m "data: Wikisource sync $(date -u +%F)"
git push -q origin HEAD
echo "pushed"