瀏覽代碼

[bin] Updating nyt download script

Colin Powell 5 月之前
父節點
當前提交
4371a8a72d
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      bin/.bin/nyt

+ 3 - 2
bin/.bin/nyt

@@ -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