-
Notifications
You must be signed in to change notification settings - Fork 0
/
pocket-add-frontpages
executable file
·29 lines (27 loc) · 1.22 KB
/
pocket-add-frontpages
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
for url in \
https://www.nytimes.com/section/todayspaper \
https://www.washingtonpost.com/todays_paper/updates \
https://economist.com https://www.wsj.com/news/types/bookshelf \
https://www.nytimes.com/section/books \
https://www.economist.com/books-and-arts/ \
https://newyorker.com https://theatlantic.com \
https://www.prospectmagazine.co.uk/category/arts-and-books \
https://www.washingtonpost/entertainment/books \
https://news.ycombinator.com/best; do
curl -L \
-H "Content-Type: application/json; charset=UTF-8" \
-H "X-Accept: application/json" \
-d "{\"url\": \"$url\", \"consumer_key\": \"$POCKET_CONSUMER_KEY\",\"access_token\": \"$POCKET_ACCESS_TOKEN\"}" \
-X POST "https://getpocket.com/v3/add"
done
# WSJ requires special care; each section has its own page
for section in \
frontpage us world opinion business review offduty lifearts new-york; do
url=https://www.wsj.com/print-edition/$(date +'%Y%m%d')/$section
curl -L \
-H "Content-Type: application/json; charset=UTF-8" \
-H "X-Accept: application/json" \
-d "{\"url\": \"$url\", \"consumer_key\": \"$POCKET_CONSUMER_KEY\",\"access_token\": \"$POCKET_ACCESS_TOKEN\"}" \
-X POST "https://getpocket.com/v3/add"
done