Save RSS Feeds to your Pocket account ✨automagically✨
- Register a Pocket app here. Copy the
.dev.vars.example
file to.dev.vars
, and paste your consumer key into thePOCKET_PLATFORM_CONSUMER_KEY
variable. - Uncomment the lines marked
UNCOMMENT THIS LINE
in thesrc/index.ts
file. - Run
pnpm install
(replace with package manager of choice), then runpnpm dev
. - Visit the URL the dev process provides(should look like
http://localhost:8787/
, port may vary). Follow the Auth Flow Presented. When presented with the Access Token, copy it. - Re-add the comments to the lines you uncommented in step 2.
- Create a new KV Namespace(how-to), or use an existing one. Paste the Namespace ID into the
wrangler.json
. - Configure the feeds you wish to follow in
config.ts
. You can also configure a prefix that Thea will use when writing to KV, to ensure it doesn't collide with other Workers/Pages Functions that use the same namespace. - Create two Worker Secrets with
wrangler
(how-to), beingPOCKET_PLATFORM_CONSUMER_KEY
- Your Pocket Consumer KeyPOCKET_USER_AUTHORIZATION_TOKEN
- The Access Token you copied in step 4.
- Run
pnpm run deploy
to deploy the worker to Cloudflare. Updates can take a little while to start, but once they do, they should stay in-sync with the RSS Feed.
By default, Thea is set to update every 5 minutes. This can be adjusted in the triggers.cron
section of the wrangler.json
file.
Authentication code inspired by Pocket-SDK-TypeScript by Michaél Reilly