Add a script for archiving the JSON schedule

I want to have a little redundancy just in case I'm unable to record data.
This commit is contained in:
gg 2023-08-07 00:15:47 -07:00
parent 19cbd64897
commit 44094647bb
1 changed files with 7 additions and 0 deletions

7
bin/schedule-archive.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
SCHEDULE_URL="https://smtgvs.weathernews.jp/a/solive_timetable/timetable.json"
DIR="$(date +"%Y/%m")"
OUT="$(date +"$DIR/%d_%H:%M.json")"
mkdir -p $DIR
curl -q "$SCHEDULE_URL" > $OUT