feat: add local ad-free newspaper

This commit is contained in:
2026-05-27 14:09:15 +00:00
parent 0d31af526c
commit 4b1ea2da11
6 changed files with 359 additions and 2 deletions
+9
View File
@@ -11,6 +11,8 @@ HOME_SRC="$REPO_DIR/home-screen-index.html"
HOME_DST="/home/jgitta/kiosk-home/index.html"
WEATHER_SRC="$REPO_DIR/weather.html"
WEATHER_DST="/home/jgitta/kiosk-home/weather.html"
NEWS_SRC="$REPO_DIR/news.html"
NEWS_DST="/home/jgitta/kiosk-home/news.html"
CONFIG_SRC="$REPO_DIR/config.json"
# Auto-increment patch version (0.2.0 → 0.2.1 → 0.2.2 ...)
VERSION_FILE="$REPO_DIR/VERSION"
@@ -62,6 +64,12 @@ if [ -f "$WEATHER_SRC" ]; then
echo " Synced weather page"
fi
if [ -f "$NEWS_SRC" ]; then
cp "$NEWS_SRC" "$NEWS_DST"
chown jgitta:jgitta "$NEWS_DST" 2>/dev/null || true
echo " Synced news page"
fi
echo "==> Committing and pushing to Gitea..."
git -C "$REPO_DIR" add -A
git -C "$REPO_DIR" commit -m "$COMMIT_MSG" 2>/dev/null || echo " (nothing new to commit)"
@@ -95,6 +103,7 @@ if [ -n "$KIOSK" ]; then
config_json=\\\$(cat config.json | sed 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g' | sed 's/\\\"/\\\\\\\"/g' | tr '\\\n' ' ')
sed \"s|const config = {};|const config = \\\$config_json;|\" home-screen-index.html > /home/jgitta/kiosk-home/index.html
cp weather.html /home/jgitta/kiosk-home/weather.html
cp news.html /home/jgitta/kiosk-home/news.html
/usr/local/bin/kiosk-restart
"
echo " Production updated."