bridges rss with twitter or even with generic commands
Find a file
2019-01-09 16:52:27 -06:00
app comments fix 2019-01-09 16:22:43 -06:00
vendor fix max size issue with text 2019-01-08 18:20:04 -06:00
.gitignore switch logging to lgr 2019-01-08 03:16:29 -06:00
.travis.yml remove vendor flag, not using modules yet 2019-01-02 15:06:46 -06:00
docker-compose.yml comment dry run in compose 2018-12-08 23:26:02 -06:00
Dockerfile add lint deaadline 2019-01-08 20:54:53 -06:00
Gopkg.lock fix max size issue with text 2019-01-08 18:20:04 -06:00
Gopkg.toml switch logging to lgr 2019-01-08 03:16:29 -06:00
LICENSE Initial commit 2018-12-04 20:31:26 -06:00
README.md add info about app params 2019-01-09 16:52:27 -06:00

rss2twitter Build Status Coverage Status Go Report Card Docker Automated build

The service publishes RSS updates to twitter. The reason is simple - I needed self-hosted thingy to post tweets on a feed change for my sites (podcasts and blogs). Tried several "cloud services" for this and lately switched to IFTTT. It worked, but slow and unreliable. Sometimes it took hours to get twit posted, sometimes I had to trigger it manually. In addition IFTTT can't have multiple twitter accounts defined for the same IFTTT account and I had to deal with multiple IFTTT accounts just to post to different twitter's timelines.

Install

Use provided docker-compose.yml and change FEED value. All twitter-api credentials can be retrieved from https://developer.twitter.com/en/apps and should be set in environment or directly in the compose file.

Templates

--template parameter (env $TEMPLATE) defines output tweet's format with:

  • {{.Title}} - title fo rss item (entry)
  • {{.Link}} - rss link
  • {{.Text}} - item description

default is {{.Title}} - {{.Link}}

Parameters

Application Options:
  -r, --refresh=         refresh interval (default: 30s) [$REFRESH]
  -t, --timeout=         rss feed timeout (default: 5s) [$TIMEOUT]
  -f, --feed=            rss feed url [$FEED]
      --consumer-key=    twitter consumer key [$TWI_CONSUMER_KEY]
      --consumer-secret= twitter consumer secret [$TWI_CONSUMER_SECRET]
      --access-token=    twitter access token [$TWI_ACCESS_TOKEN]
      --access-secret=   twitter access secret [$TWI_ACCESS_SECRET]
      --template=        twitter message template (default: {{.Title}} - {{.Link}}) [$TEMPLATE]
      --dry              dry mode [$DRY]
      --dbg              debug mode [$DEBUG]
  • refresh interval defines how often RSS feed will be checked and restricts the minimal time interval between two tweets.
  • values for refresh and timeout should be presented with units "d" (days), "h" (hours), "m" (minutes) os "s" (seconds)
  • dry disables publishing to twitter and sends updates to logger only