Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbachry/outreddit
Export reddit comment threads to pocket
https://github.com/mbachry/outreddit
kobo pocket reddit
Last synced: 2 days ago
JSON representation
Export reddit comment threads to pocket
- Host: GitHub
- URL: https://github.com/mbachry/outreddit
- Owner: mbachry
- License: mit
- Created: 2024-12-23T16:20:17.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-23T16:31:41.000Z (about 1 month ago)
- Last Synced: 2024-12-23T17:30:08.930Z (about 1 month ago)
- Topics: kobo, pocket, reddit
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
outreddit
=========Are you an avid fan of /r/AskHistorians subreddit? Do you use pocket
service? Do you read pocket articles on a Kobo reader? Do you have a
server/vps? This tiny HTTP server will convert reddit threads to a
format pocket can parse and save to your Kobo.Install
=======Install `uv` and git-clone/copy the project dir to your server. Pick
and local port and run with:```
uv run uvicorn --port 7777 outreddit:app
```Add a systemd unit to make the service permanent:
```
[Unit]
Description=outreddit[Service]
orkingDirectory=/path/to/outreddit
ExecStart=/bin/uv run uvicorn --port 7777 outreddit:app
DynamicUser=yes
PrivateDevices=yes
SystemCallFilter=@system-service
RestrictAddressFamilies=AF_INET
MemoryDenyWriteExecute=yes[Install]
WantedBy=multi-user.target
```Add an nginx redirect:
```
location /outreddit {
proxy_pass http://127.0.0.1:7777;
proxy_set_header Host $host;
}
```Usage
=====Grab a single-comment link to a comment and pass it as `url` parameter, eg.:
```
https://example.com/outreddit?url=https://www.reddit.com/r/AskHistorians/comments/14x8cs/what_did_it_cost_to_go_see_an_actual_mozart_opera/c7hdzih/
```Save the page to pocket.
Notes
=====Since pocket doesn't support authentication your service is exposed to
the entire internet. In order to prevent your server from becoming an
"open relay" reddit proxy, there's a fixed 3req/minute rate
limit. It's also best to keep `location` in nginx conf secret:
consider prefixing with a random uuid, etc.