https://github.com/josemyduarte/feed2pocket
Feeds 2 Pocket fetches and store RSS items into Pocket for you to read later
https://github.com/josemyduarte/feed2pocket
cloudflare cloudflare-workers pocket readitlater rss
Last synced: 3 months ago
JSON representation
Feeds 2 Pocket fetches and store RSS items into Pocket for you to read later
- Host: GitHub
- URL: https://github.com/josemyduarte/feed2pocket
- Owner: JosemyDuarte
- License: agpl-3.0
- Created: 2024-12-28T16:57:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-01T07:34:28.000Z (about 1 year ago)
- Last Synced: 2025-05-20T18:21:42.625Z (about 1 year ago)
- Topics: cloudflare, cloudflare-workers, pocket, readitlater, rss
- Language: TypeScript
- Homepage:
- Size: 361 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Feeds 2 Pocket
⚠️ [Pocket got shutdown down](https://support.mozilla.org/en-US/kb/future-of-pocket). This project no longer work 😔.
## Overview
Feeds 2 Pocket fetches and store RSS items into [Pocket](https://getpocket.com/) for you to read later. Motivation for this project is to have a simple way to read my RSS feeds on my [Kobo e-reader](https://help.kobo.com/hc/en-us/articles/360017763753-Use-the-Pocket-App-with-your-Kobo-eReader).
This project is designed to be run as a cron job in [Cloudflare Workers](https://workers.cloudflare.com/).
Notice that this project doesn't have a user interface. You will need to configure everything is a non-fancy way, unfortunately.
## Features
- Fetch RSS feeds
- Store RSS items into Pocket
- Retry mechanism in case of failure to fetch or store an item
- Avoid duplicates
- Allow to specify tags for each feed
## Configuration
You will need to create a D1 Database in Cloudflare to run the migration scripts. You can do this by running the following command:
```bash
wrangler d1 create f2p-db
```
Then you can run the migration script:
```bash
wrangler d1 migrations apply --remote F2P_DB
```
Copy the `wrangler.toml.example` to `wrangler.toml` and update it with your database ID (you can get it from Cloudflare dashboard).
## Usage
Add your Pocket access token to the database (you can do it with migration scripts or from Cloudflare dashboard):
```sql
--- Check here how to get your Pocket access token: https://getpocket.com/developer/docs/authentication
INSERT INTO users (username, access_token) VALUES ('your_username', 'your_access_token');
```
Add the feeds you want to fetch:
```sql
INSERT INTO feeds (url, tags, user_id) VALUES ('https://lobste.rs/top/rss', 'programming,tech', 1);
```
Now you can run the worker:
```bash
npm run deploy
```
Notice that by default **the worker runs once a day**. You can change this by updating the cron expression in the `wrangler.toml` file or from Cloudflare dashboard.
Before running the cron, don't forget to define the following environment variable:
- `POCKET_CONSUMER_KEY`: See [Pocket API](https://getpocket.com/developer/docs/authentication) for how to get your consumer key.
Which can be added directly from Cloudflare dashboard or by running the following command:
```bash
wrangler secret put POCKET_CONSUMER_KEY
```