Public
Script
October 23, 2023
![zackoverflow avatar](https://images.clerk.dev/uploaded/img_2Tg3AwqUy52inqmZfg4MbeC7G09.webp)
pollRssAndEmail
@zackoverflow
Script
Subscribe to RSS feeds with e-mail notifications This lets you subscribe to RSS feeds. It checks periodically for any new posts from any of your RSS feed subscriptions, and then sends you an e-mail with the link to the any new posts. Getting started 1. Generate auth keys Follow this to get your auth keys, and export your public keys. This will be used to e-mail yourself since @std.email is preferred over console.email 2. Create a @me.rssEmail val You can do that by clicking this link and hitting 'Run'. Or you can copy-paste this code into a new val: const rssEmail = "you@youremail.com" 3. Fork this val Hit 'Fork' on this val and run it. Then you can schedule the val to run every hour or whatever duration you'd like. 4. Add RSS feeds to @me.rssFeeds If you look at your vals, you should find a new one called rssFeeds . It should look similar to this: let rssFeeds = [
"https://cprimozic.net/rss.xml",
"https://matklad.github.io/feed.xml",
"https://journal.stuffwithstuff.com/rss.xml",
"https://lexi-lambda.github.io/feeds/all.rss.xml",
]; This is supposed to be an array containing the links of each RSS feed you'd like to subscribe to (in the form of JS strings). To add RSS feeds, you can update this val by adding a new string containing the new RSS link. Resetting the cache If for any reason you would like to reset the cache, you can clear the keys of rssCache or use this convenience function to do so. @zackoverflow.rssResetCache(@me.rssCache)
October 23, 2023