diff options
Diffstat (limited to 'sfeedrc')
-rw-r--r-- | sfeedrc | 225 |
1 files changed, 225 insertions, 0 deletions
diff --git a/sfeedrc b/sfeedrc new file mode 100644 index 0000000..c5e3001 --- /dev/null +++ b/sfeedrc | |||
@@ -0,0 +1,225 @@ | |||
1 | # -*- sh -*- | ||
2 | |||
3 | # SFEED="$HOME/.sfeed" | ||
4 | USER_AGENT='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0' | ||
5 | # sfeedpath="$SFEED/feeds" | ||
6 | maxjobs="$(nproc)" | ||
7 | |||
8 | ### Feeds ####################################################### | ||
9 | |||
10 | feeds() { | ||
11 | feeds_planets | ||
12 | feeds_youtube | ||
13 | feeds_podcasts | ||
14 | feeds_friends | ||
15 | feeds_news | ||
16 | feeds_smolweb | ||
17 | feeds_comics | ||
18 | feeds_misc | ||
19 | feeds_me | ||
20 | } | ||
21 | |||
22 | feeds_planets() { | ||
23 | feed "Planet Emacs" "https://planet.emacslife.com/atom.xml" | ||
24 | feed "Planet Lisp" "https://planet.lisp.org/rss20.xml" | ||
25 | feed "Planet Scheme" "https://planet.scheme.org/atom.xml" | ||
26 | } | ||
27 | |||
28 | feeds_youtube() { | ||
29 | feed "3Blue1Brown" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCYO_jab_esuFRV4b17AJtAw' | ||
30 | feed "AB - Ancienne Belgique" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCUVAw2kdxJlcfCdEcdgXv5A' | ||
31 | feed "Abraham Moller" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCMfIwe2KHD2XoBO2lWqeFXg' | ||
32 | feed "Adam Ragusea" 'https://www.youtube.com/feeds/videos.xml?channel_id=UC9_p50tH3WmMslWRWKnM7dQ' | ||
33 | feed "Babish Culinary Universe" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCJHA_jMfCvEnv-3kRjTCQXw' | ||
34 | feed "Baggers" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCMV8p6Lb-bd6UZtTc_QD4zA' | ||
35 | feed "Case Duckworth" 'https://www.youtube.com/feeds/videos.xml?channel_id=UC92gRJdnUYklVu4pvj9n0Lw' | ||
36 | feed "Claire Saffitz x Dessert Person" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCvw6Y1kr_8bp6B5m1dqNyiw' | ||
37 | feed "Computerphile" 'https://www.youtube.com/feeds/videos.xml?channel_id=UC9-y-6csu5WGm29I7JiwpnA' | ||
38 | feed "EBRPL Career Center" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCIvntuaxP7PyaJDeHE_9E8Q' | ||
39 | feed "EmacsConf and Emacs hangouts" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCwuyodzTl_KdEKNuJmeo99A' | ||
40 | feed "freeCodeCamp.org" 'https://www.youtube.com/feeds/videos.xml?channel_id=UC8butISFwT-Wl7EV0hUK0BQ' | ||
41 | feed "Gavin Freeborn" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCJetJ7nDNLlEzDLXv7KIo0w' | ||
42 | feed "Henry Homesweet" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCZqjwc1Wy5t1rsviYYsJiYg' | ||
43 | feed "Howard Abrams" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCVHICXXtKG7rZgtC5xonNdQ' | ||
44 | feed "Ignite Talks" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCZotK8ZPTUNLMeW5Q6T0cKg' | ||
45 | feed "Jake B" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCBMMB7Yi0eyFuY95Qn2o0Yg' | ||
46 | feed "James Tomasino" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCbTp1BYjpuhDRG5OmgIT8iw' | ||
47 | feed "jan Misali" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCJOh5FKisc0hUlEeWFBlD-w' | ||
48 | feed "J Duckworth Animations" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCtAEaNVrNxAUy2VSRPD_PYQ' | ||
49 | feed "Jelle's Marble Runs" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCYJdpnjuSWVOLgGT9fIzL0g' | ||
50 | feed "John Kitchin" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCQp2VLAOlvq142YN3JO3y8w' | ||
51 | feed "karthik" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCbh_g91w0T6OYp40xFrtnhA' | ||
52 | feed "Ken Forkish" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCvVvFZd0e86bLbd5FdgYiUg' | ||
53 | feed "Lex Fridman" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCSHZKyawb77ixDdsGog4iWA' | ||
54 | feed "LockPickingLawyer" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCm9K6rby98W8JigLoZOh6FQ' | ||
55 | feed "Maangchi" 'https://www.youtube.com/feeds/videos.xml?channel_id=UC8gFadPgK2r1ndqLI04Xvvw' | ||
56 | feed "Mike Zamansky" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCxkMDXQ5qzYOgXPRnOBrp1w' | ||
57 | feed "MIT OpenCourseWare" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCEBb1b_L6zDS3xTUrIALZOw' | ||
58 | feed "My Analog Journal" 'https://www.youtube.com/feeds/videos.xml?channel_id=UC8TZwtZ17WKFJSmwTZQpBTA' | ||
59 | feed "Nat's What I Reckon" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCEFW1E8QzP-hKxjO2Rj68wg' | ||
60 | feed "Now You See It" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCWTFGPpNQ0Ms6afXhaWDiRw' | ||
61 | feed "Numberphile" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCoxcjq-8xIDTYp3uz647V5A' | ||
62 | feed "Philosophy Tube" 'https://www.youtube.com/feeds/videos.xml?channel_id=UC2PA-AKmVpU6NKCGtZq_rKQ' | ||
63 | feed "PronunciationManual" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCqDSLtXeZsGc3dtVb5MW13g' | ||
64 | feed "Protesilaos Stavrou" 'https://www.youtube.com/feeds/videos.xml?channel_id=UC0uTPqBCFIpZxlz_Lv1tk_g' | ||
65 | feed "RailCowGirl" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCj-Xm8j6WBgKY8OG7s9r2vQ' | ||
66 | feed "Simone Giertz" 'https://www.youtube.com/feeds/videos.xml?channel_id=UC3KEoMzNz8eYnwBC34RaKCQ' | ||
67 | feed "Steve Yegge" 'https://www.youtube.com/feeds/videos.xml?channel_id=UC2RCcnTltR3HMQOYVqwmweA' | ||
68 | feed "System Crafters" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCAiiOTio8Yu69c3XnR7nQBQ' | ||
69 | feed "Tasting History with Max Miller" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCsaGKqPZnGp_7N80hcHySGQ' | ||
70 | feed "Technology Connections" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCy0tKL1T7wFoYcxCe0xjN6Q' | ||
71 | feed "Too Many Zooz" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCtjXVqMVzBIgU0SO8AV0vPg' | ||
72 | feed "Townsends" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCxr2d4As312LulcajAkKJYw' | ||
73 | feed "Unitarian Church of Baton Rouge" 'https://www.youtube.com/feeds/videos.xml?channel_id=UClrqHvbiFM-1hn931ZmAPFw' | ||
74 | feed "Vulf" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCtWuB1D_E3mcyYThA9iKggQ' | ||
75 | feed "WFTDA: Women's Flat Track Derby Association" 'https://www.youtube.com/feeds/videos.xml?channel_id=UC7eMWpvytqd3gYAqxTl9w7g' | ||
76 | feed "Zach Anner" 'https://www.youtube.com/feeds/videos.xml?channel_id=UCPTVYxUoYWhNa8J7GzIGnyQ' | ||
77 | } | ||
78 | |||
79 | feeds_podcasts() { | ||
80 | feed "Tilde Whirl Tildeverse Podcast" 'https://tilde.town/~dozens/podcast/rss.xml' | ||
81 | feed "trash cat tech cat" 'https://podcast.librepunk.club/tctc/ogg.xml' | ||
82 | feed "Hacker Public Radio" 'https://hackerpublicradio.org/hpr_ogg_rss.php' | ||
83 | } | ||
84 | |||
85 | feeds_friends() { | ||
86 | # nihilazo | ||
87 | feed "lipu pi jan Niko" 'https://tilde.town/~nihilazo/index.xml' | ||
88 | # dozens | ||
89 | feed "chrismanbrown.gitlab.io (dozens)" 'https://chrismanbrown.gitlab.io/rss.xml' | ||
90 | feed "Dozens and Dragons" 'https://dozensanddragons.neocities.org/rss.xml' | ||
91 | feed "dozens: Society For Putting Things On Top Of Other Things" 'https://society.neocities.org/rss.xml' | ||
92 | feed "dozens: vgnfdblg" 'https://supervegan.neocities.org/feed.xml' | ||
93 | feed "dozens: backgammon" 'http://tilde.town/~dozens/backgammon/rss.xml' | ||
94 | feed "dozens: It's Pro Toad and Superb Owl" 'https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/feed.xml' | ||
95 | feed "dozens dreams" 'https://tilde.team/~dozens/dreams/rss.xml' | ||
96 | feed "dozens: write.as" 'https://write.tildeverse.org/dozens/feed/' | ||
97 | feed "dozens css art" 'http://tilde.town/~dozens/cssart/feed.xml' | ||
98 | ### | ||
99 | feed "Benjamin Wil" 'https://benjaminwil.info/feed.xml' | ||
100 | feed "(lambda (x) (create x))" 'http://lambdacreate.com/static/feed.rss' | ||
101 | feed "m455.casa" 'https://m455.casa/feed.rss' | ||
102 | feed "Oatmeal" 'https://eli.li/feed.rss' | ||
103 | feed "RSRSSS" 'https://envs.net/~lucidiot/rsrsss/feed.xml' | ||
104 | feed "Tomasino Blog" 'https://blog.tomasino.org/index.xml' | ||
105 | feed "Tomasino Labs" 'https://labs.tomasino.org/index.xml' | ||
106 | feed "Will's Blog" 'https://wflewis.com/feed.xml' | ||
107 | feed "Rick Carlino's Blog" 'https://rickcarlino.com/rss/feed.rss' | ||
108 | feed "Causal Agency" 'https://text.causal.agency/feed.atom' | ||
109 | feed "Benoit Joly" 'https://blog.benoitj.ca/posts/index.xml' | ||
110 | feed "p1k3::feed" 'https://p1k3.com/feed' | ||
111 | feed "linkbudz" 'https://linkbudz.m455.casa/feed.rss' | ||
112 | feed "Alex Schroeder" "https://alexschroeder.ch/wiki/feed/full/" | ||
113 | feed "Björn Wärmedal" "https://warmedal.se/~bjorn/atom.xml" | ||
114 | feed "a rickety bridge of impossible crossing" "https://bluelander.bearblog.dev/feed/" | ||
115 | } | ||
116 | |||
117 | feeds_comics() { | ||
118 | feed "Cat and Girl" 'https://catandgirl.com/feed/' | ||
119 | feed "Dinosaur Comics!" 'https://qwantz.com/rssfeed.php' | ||
120 | feed "False Knees" 'https://falseknees.tumblr.com/rss' | ||
121 | feed "Saturday Morning Breakfast Cereal" 'https://www.smbc-comics.com/comic/rss' | ||
122 | feed "xkcd" 'https://xkcd.com/atom.xml' | ||
123 | } | ||
124 | |||
125 | feeds_news() { | ||
126 | feed "tilde news: Private feed for acdw" \ | ||
127 | 'https://tilde.news/rss?token=FvdFj8rQkhrBy9j1yON1t6RYKDdcuG1MoUlyvRICmbgDGCf2JTWAEObDhdgt' | ||
128 | feed "Tildes Atom feed" 'https://tildes.net/topics.atom' | ||
129 | feed "NPR" "https://feeds.npr.org/1001/rss.xml" | ||
130 | } | ||
131 | |||
132 | feeds_me() { | ||
133 | : | ||
134 | } | ||
135 | |||
136 | feeds_smolweb() { | ||
137 | feed "~town friday postcard" 'https://tilde.town/~lucidiot/fridaypostcard.xml' | ||
138 | feed "Cosmic Voyage" 'https://cosmic.voyage/rss.xml' | ||
139 | feed "plan.cat" 'https://plan.cat/rss' | ||
140 | } | ||
141 | |||
142 | feeds_misc() { | ||
143 | feed "Crystalverse" 'https://crystalverse.com/feed/' | ||
144 | feed "Hetzner" 'https://status.hetzner.com/en.atom' | ||
145 | feed "LOW-TECH MAGAZINE" 'https://feeds2.feedburner.com/typepad/krisdedecker/lowtechmagazineenglish' | ||
146 | } | ||
147 | |||
148 | ### Filter ###################################################### | ||
149 | |||
150 | filter() { | ||
151 | case "$1" in | ||
152 | # Filter items based on feed name. | ||
153 | *NPR*) | ||
154 | sed 's@www\.npr\.org@text.npr.org@' | ||
155 | ;; | ||
156 | *) cat ;; | ||
157 | esac | | ||
158 | filter_add_empties | | ||
159 | filter_html_entities | | ||
160 | filter_embed_youtube | | ||
161 | filter_filter_links | ||
162 | } | ||
163 | |||
164 | filter_add_empties() { | ||
165 | awk 'BEGIN{FS="\t";OFS=FS;} | ||
166 | { $2 = $2 ? $2 : "[empty]" } | ||
167 | { print $1,$2,$3,$4,$5,$6,$7,$8,$9; } | ||
168 | ' | ||
169 | } | ||
170 | |||
171 | filter_embed_youtube() { | ||
172 | # replace youtube links with embed links | ||
173 | sed 's@www.youtube.com/watch?v=@www.youtube.com/embed/@g' | ||
174 | } | ||
175 | |||
176 | filter_filter_links() { | ||
177 | # shorten feedburner links and strip tracking parameters and pixels | ||
178 | awk -F '\t' 'BEGIN { OFS = "\t"; } | ||
179 | function filterlink(s) { | ||
180 | # protocol must start with http, https or gopher. | ||
181 | if (match(s, /^(http|https|gopher):\/\//) == 0) { | ||
182 | return ""; | ||
183 | } | ||
184 | # shorten feedburner links. | ||
185 | if (match(s, /^(http|https):\/\/[^\/]+\/~r\/.*\/~3\/[^\/]+\//)) { | ||
186 | s = substr($3, RSTART, RLENGTH); | ||
187 | } | ||
188 | # strip tracking parameters | ||
189 | # urchin, facebook, piwik, webtrekk and generic. | ||
190 | gsub(/\?(ad|campaign|fbclid|pk|tm|utm|wt)_([^&]+)/, "?", s); | ||
191 | gsub(/&(ad|campaign|fbclid|pk|tm|utm|wt)_([^&]+)/, "", s); | ||
192 | gsub(/\?&/, "?", s); | ||
193 | gsub(/[\?&]+$/, "", s); | ||
194 | return s | ||
195 | } | ||
196 | { | ||
197 | $3 = filterlink($3); # link | ||
198 | $8 = filterlink($8); # enclosure | ||
199 | # try to remove tracking pixels: <img/> tags with 1px width or height. | ||
200 | gsub("<img[^>]*(width|height)[[:space:]]*=[[:space:]]*[\"'"'"' ]?1[\"'"'"' ]?[^0-9>]+[^>]*>", "", $4); | ||
201 | print $0; | ||
202 | }' | ||
203 | } | ||
204 | |||
205 | filter_html_entities() { | ||
206 | # convert HTML entities into dumb counterparts | ||
207 | awk '{ | ||
208 | gsub(/"/,"\""); gsub(/"/,"\""); | ||
209 | gsub(/'/,"'\''"); gsub(/'/,"'\''"); | ||
210 | gsub(/&/,"\\&"); # MUST BE LAST!; | ||
211 | |||
212 | }' | ||
213 | } | ||
214 | |||
215 | # Fetch ######################################################### | ||
216 | |||
217 | fetch() { # fetch(name, url, feedfile) | ||
218 | # return | ||
219 | curl -s -L \ | ||
220 | --max-redirs 3 \ | ||
221 | --header "'User-Agent: $USER_AGENT'" \ | ||
222 | --fail \ | ||
223 | --max-time 15 \ | ||
224 | "$2" | ||
225 | } | ||