divan-data/update.sh
Anas Rashid 99a6502b4b
Some checks are pending
Wikisource sync / sync (push) Waiting to run
Rename export_ganjoor.py -> export_diwan.py, ganjoor_ids -> diwan_ids; Language ur-PK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:51:03 +02:00

14 lines
491 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_diwan.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"