commit a2cf927baa496bdeb0151e614049b74d78f17edd
parent b8b7d948cd5bb18b9de33c29f8db67e829d47d96
Author: Henry Unite <unitehenry@gmail.com>
Date: Sun, 10 May 2026 21:54:11 +0000
feed: external feeds
Diffstat:
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/configs/feeds.csv b/configs/feeds.csv
@@ -0,0 +1,7 @@
+unitehenry,https://unitehenry.com/blog/rss.xml,unitehenry
+geohot,https://geohot.github.io/blog/feed.xml,geohot
+flowstate,/twitter/user/flowstate,flowstate
+tetsuoai,/twitter/user/tetsuoai,tetsuoai
+dax,/twitter/user/thdxr,thdxr
+valigo,/twitter/user/valigo,valigo
+tsoding,/twitter/user/tsoding,tsoding
diff --git a/scripts/feeds b/scripts/feeds
@@ -19,6 +19,16 @@ sleep 5
mkdir -p public/feeds
-curl 'http://127.0.0.1:1200/twitter/user/elonmusk?format=json' > public/feeds/elonmusk.json
-
-npx prettier --write public/feeds
+while IFS= read -r line; do
+ RSS_PATH=$(echo $line | awk -F ',' '{print $2}')
+ FEED_FILENAME=$(echo $line | awk -F ',' '{print $3}')
+
+ if [[ $RSS_PATH == http* ]]; then
+ echo $RSS_PATH
+ curl $RSS_PATH > "/tmp/$FEED_FILENAME.xml"
+ xq -j "/tmp/$FEED_FILENAME.xml" > "public/feeds/$FEED_FILENAME.json"
+ else
+ echo "http://127.0.0.1:1200$RSSPATH?format=json"
+ curl "http://127.0.0.1:1200$RSSPATH?format=json" > "public/feeds/$FEED_FILENAME.json"
+ fi
+done < configs/feeds.csv