Do not follow this link

~vesto/post_rss

A simple app for converting HTTP post requests to an RSS feed
fix null feed bug
add git email line

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~vesto/post_rss
read/write
git@git.sr.ht:~vesto/post_rss

You can also use your local clone with git send-email.

#post_rss

This is a simple appliance that intakes HTTP POST requests containing some content and converts it into an RSS feed. I built it to add visibility to some cron jobs on servers, as I would otherwise never really look at the logs. I needed a simple mechanism to send a read-it-whenever notification that didn't involve setting up SMTP servers nor some over-complicated observability service.

The workflow is as follows:

  1. Create a new feed, subscribe to its RSS feed in your reader of choice.
  2. Send POST requests to the API URL with a payload that looks like so:
{
    "subject": "Hello world",
    "author": "my-script.py",
    "body": "Nothing to see here"
}

and that's it! The post will then be appended to your RSS feed and will show up in your reader the next time it's fetched.

post_rss comes with a small management console for managing and previewing feeds:

#Deployment

The easiest way to get started is to use docker-compose. Add the following definition to your docker-compose.yaml:

post_rss:
    image: vesto/post_rss
    environment:
    - POST_RSS_USERNAME=username
    - POST_RSS_PASSWORD=superSecretPassword
    - BASE_URL=http://localhost:5000
    - SECRET_KEY=[random 32 character string]
    - DB_PATH=/var/post_rss.db
    volumes:
    - ./post_rss.db:/var/post_rss.db
    ports:
    - 5000:5000

Once defined, spin up your server with docker compose up -d post_rss, open http://localhost:5000, type in your username/password, and you should be good to go. Note that you'll need to host this container somewhere that is visible to both your RSS reader and wherever you're calling the POST API from.

You can also run the application as a standard Flask app; there's nothing special going on here that needs Docker:

$ pip3 install -r requirements.txt
$ flask -A post_rss run

#Contributing

If you'd like to hack on this, clone the repo and run it like so:

$ pip3 install -r requirements.txt
$ flask -A post_rss --debug run

You've probably already noticed that this project is a bit different than other open source projects you've interacted with. We're on SourceHut instead of GitHub! Not to fear though- if you're interested in reporting a bug you can send an email to the mailing list.

I'm pretty new to using SourceHut and haven't done much with git-email so let's see how this goes!

#Building a new image

This is mostly for myself to remember how to push to the Docker hub:

$ docker build -t vesto/post_rss .
$ docker push vesto/post_rss

#License

This project is licensed under the GNU General Public License v3. More information can be found in the LICENSE.txt file.

Do not follow this link