[bin] Updating nyt download script
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
BASEDIR="/media/photos/nyt"
|
||||
BASEDIR="/media/photos/misc/nytimes"
|
||||
DATE=$(date +"%Y-%m-%d")
|
||||
TMPFILE=/tmp/nyt.pdf
|
||||
OUTFILE=$BASEDIR/$DATE.jpg
|
||||
@ -11,6 +11,7 @@ else
|
||||
curl -o /tmp/nyt.pdf -L https://static01.nyt.com/images/$DATEPATH/nytfrontpage/scan.pdf
|
||||
convert -density 150 -quality 75 $TMPFILE $OUTFILE
|
||||
ln -sf $OUTFILE /var/lib/weewx/www/today.jpg
|
||||
curl -H "X-Title: NYT headlines today" -d "https://wx.lab.unbl.ink/today.jpg" https://ntfy.unbl.ink/news
|
||||
ln -sf $OUTFILE $BASEDIR/today.jpg
|
||||
curl -H "X-Title: NYT headlines today" -d "https://files.lab.unbl.ink/nytimes/today.jpg" https://ntfy.unbl.ink/news
|
||||
rm $TMPFILE
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user