Skip to content

Polls RSS feed and publishes message onto Signal using signal-cli-rest-api

License

Notifications You must be signed in to change notification settings

mfuhrmann/peertube-rss-to-signal-bridge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

peertube-rss-to-signal-bridge

This repo was forked from https://github.com/francocm/rss-to-signal-bridge and modified to be a PeerTube RSS to Signal bridge.

The original docs are very good so I've kept them below. Maybe just let me mention how to obtain a Signal group ID, since this was not super obvious.

In the signal-cli container run signal-cli -u +YOURNUMBER listGroups to see the IDs. Removed the = at the end. Use a tool like https://gc.de/gc/base64/ to encode again. You can use this new and longer string with the two == at the end and in the docker-compose file.

rss-to-signal-bridge

Polls RSS feed and publishes message onto Signal using signal-cli-rest-api.

Configuration

Key Type Required Description Example
SIGNAL_API_URL String Yes http:https://127.0.0.1:8080/v2/send The message send endpoint of your hosted signal-cli-rest-api instance.
SIGNAL_SENDER_NUMBER String Yes +44xxxxxxxxxx The sender number as configured on your signal-cli-rest-api instance.
SIGNAL_DESTINATIONS String Yes group.xxxxxxxxxxxxx= (just 1 group) or comma separated numbers ex: +44xxxxxxxxxx,+44yyyyyyyyyy The recipients of the message. If the recipient is a group, put just 1 group ID here, else comma separated list of numbers. For details on how to obtain the group ID follow the signal-cli-rest-api documentation.
SIGNAL_FAKE_SEND Python Boolean No False If True, no message is sent to Signal, and instead each message is printed into the logs. This is important whilst debugging / testing, to avoid overuse of the service.
RSS_FEED_URL String Yes https://xxxxxxxxxxxxx The RSS feed URL to poll.
MESSAGE_TEMPLATE String Yes NEW STOCK ALERT - {title}\n\nSummary: {summary}\n\nURL: {link}\n\nPublish timestamp: {publish_timestamp} The message template, The placeholders show in the example are replaced with the RSS content. Move these around / use these in whichever way you want.
RSS_POLL_INTERVAL int Yes 120 Number of seconds between each RSS poll interval.

Running (via docker-compose)

  1. cp docker-compose.yml.example docker-compose.yml
  2. Configure the environment variables (and any other relevant configuration) inside the copied docker-compose.yml.
  3. docker-compose up -d

Important

  • This script saves the state under data/state.dat.
    • It's important:
      • that this file is mounted from the host into the container (the example docker-compose.yml already has this set up)
      • for the container to have write permissions into this folder so as to be able to create this file.
    • This file is used to save the last processed RSS entry from the RSS feed, so as not to end up re-sending the same alerts over and over.
    • If this file is corrupted, lost, or somehow broken, it can lead to the script either breaking, or flooding Signal / recipients with alerts.

EOF

About

Polls RSS feed and publishes message onto Signal using signal-cli-rest-api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 94.3%
  • Dockerfile 5.7%