Creates an RSS feed to keep track of updates from Trello boards you belong to
Python
Latest commit eece727 Jun 10, 2015 @naiyt Merge pull request #10 from mtchetch/master
Fixed the documentation formatting

README.md

trello-rss

Trello is a great app, but unfortunately doesn't currently have any RSS feed features. If Fog Creek decides to add it in the future, all the better. However, based on this, it doesn't seem like a high priority right now.

I decided to throw together some Python to create RSS feeds for your Trello boards. This is useful for getting a broad overview of actions on your Trello boards delivered to your favorite RSS reader.

You're welcome to extend this into your own app, or use my web app to generate Trello RSS feeds.

Dependencies

API Key and Auth Token

You need an API Key to use the Trello API, and an auth token to let this app read your Trello boards. Get a key here and instructions on getting a token here. (Tokens are not necessary for public boards.)

Installation instructions

Until I get some packaging setup, the easiest thing for now is to just place this project, py-trello, and PyRSS2Gen in the same directory.

Usage

Usage is pretty basic. You create a TrelloRSS object, with these parameters:

TrelloRSS(apikey, [, token][, channel_title][, rss_channel_link][, rss_description])

If you don't pass in token we assume you're looking at public boards only. The channel info is used to create your channel info for the RSS feed. It defaults to "My Trello RSS Feed" for the title, "http://trello.com" for the link, and "Trello RSS Feed" for the description.

If you did pass in a token, you can retrieve info on all of your boards using this:

from trellorss import TrelloRSS
my_rss = TrelloRSS(apikey, apiprivatekey, token)
my_rss.get_all(20) # Gets the 20 most recent actions
print my_rss.rss # This will print the xml generated by PyRSS2Gen. Pass this into your favorite feed generator.

You can also specify what types of actions to make the feed on. (See below for supported actions.)

my_rss = TrelloRSS(apikey, apiprivatekey, token)
my_rss.get_only(['comments','lists'])
print my_rss.rss

These are the available actions:

  • 'comments'
  • 'board'
  • 'lists'
  • 'cards'
  • 'createChecklist'
  • 'updateCheck'
  • 'moveCard'

Passing in anything else will result in an exception.

You can also create a feed on public boards. You'll need to get the board id out of the url (should look like this: nC8QJJoZ). Let's use the Trello Development board as an example.

public_rss = TrelloRSS(apikey)
public_rss.get_from('nC8QJJoZ', public_board=True, num=30)

get_from takes these parameters:

TrelloRSS.get_from(board_id, [, public_board][, items][, number])

public_board defaults to False, items default to all, and number defaults to 15.

Usage code example

#!/usr/bin/python
from trellorss import TrelloRSS
your_rss = TrelloRSS('apikey here','apisecret here', 'application token here')
your_rss.get_all(20) # Gets the 20 most recent actions
f = open('trellofeed.xml', 'w+') #Open your rss-feed for writing
f.write(your_rss.rss.encode("UTF-8")) #Write with the correct encoding
f.close()  # This will save the xml generated by PyRSS2Gen. Pass this into your favorite feed reader