TurboGears controller and widgets for feed handling.
Project description
Turbofeeds is a TurboGears extension which provides support for generating RSS and Atom feeds and matching display widgets.
TurboFeeds was formerly the feed sub-package of the main TurboGears distribution. It was extracted from the TG core to ease updating, enhancing, and maintaining both projects.
TurboFeeds is mostly backwards-compatible with the turbogears.feed package, but has lots of fixes and a few new features.
Installation
To install TurboFeeds from the Cheeseshop use easy_install:
[sudo] easy_install TurboFeeds
This requires the setuptools package to be installed. If you have not done so already, download the ez_setup.py script and run it to install setuptools.
Usage
Controller:
from turbogears import controllers, expose from turbofeed import FeedController, FeedLinks class MyFeedController(FeedController): def get_feed_data(self, **kwargs): entries = [] # Fill ``entries`` with dicts containing at least items for: # # title, link, summary and published # # For example, supposing ``entry`` is a database object # representing a blog article: entries.append(dict( title = entry.title, author = dict(name = entry.author.display_name, email = entry.author.email_address), summary = entry.post[:30], published = entry.published, updated = entry.updated or entry.published, link = 'http://blog.foo.org/article/%s' % entry.id )) return dict(entries=entries) class Root(controllers.RootController): feed = MyFeedController( base_url = '/feed' title = "my fine blog", link = "http://blog.foo.org", author = dict(name="John Doe", email="john@foo.org"), id = "http://blog.foo.org", subtitle = "a blog about turbogears" ) feedlinks = FeedLinks(controller=feed, title = "Click link to access the feed in %(type)s format") @expose('templates.mypage') def mypage() return dict(feedlinks=self.feedlinks)
Template:
<h2>Feed links</h2> ${feedlinks('%(type)s feed', url_params=dict(format='full')))}
Documentation
The TurboFeeds source is thoroughly documented with doc strings. The source distribution comes with epydoc-generated API documentation included.
You can also refer to the documentation for the original turbogears.feed package on the TurboGears documentation wiki:
All information on this page is also still valid for TurboFeeds, you just have to replace:
from turbogears.feed import FeedController
with:
from turbofeeds import FeedController
Credits
The turbogears.feed package was first introduced in TurboGears version 0.9a1 and was added by Elvelind Grandin.
Christopher Arndt turned it into the TurboGears extension TurboFeeds.
Other contributors include:
Florent Aide, Simon Belak, Kevi Dangoor, Charles Duffy, Alberto Valverde, Jorge Vargas
Please notify the maintainer, if you think your name should belong here too.
The feed icons used by the CSS for the FeedLinks widget where taken from http://www.feedicons.com/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file TurboFeeds-0.1b.zip
.
File metadata
- Download URL: TurboFeeds-0.1b.zip
- Upload date:
- Size: 106.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d99c0ec8494f570e2d2211b4915b23f305f78095e05ff83ae0184df17d9a16b2 |
|
MD5 | ba101c46c44b12fbcb9b8a59a140bb74 |
|
BLAKE2b-256 | a27cd2350a3692750771f583211f05449bdff1ff365c56f00618b0edecf5f86c |
File details
Details for the file TurboFeeds-0.1b.tar.bz2
.
File metadata
- Download URL: TurboFeeds-0.1b.tar.bz2
- Upload date:
- Size: 42.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa89ec17e1d53440207ab94c6555e982f0aa0bf02fc285e852066f01cb979898 |
|
MD5 | 0f581c5dd3ac2075fb64068d6c1f8c3e |
|
BLAKE2b-256 | 4ab02374ad2b6062517c056b2a87458e1689c2e2f0047b41bde4e3a38ccb1582 |
File details
Details for the file TurboFeeds-0.1b-py2.5.egg
.
File metadata
- Download URL: TurboFeeds-0.1b-py2.5.egg
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0f236cf2b1782ebe4ccaa25916f467f75ecf24e5a430cda44acd7222348628e |
|
MD5 | 747ba5e90bd92eae4de471b704012653 |
|
BLAKE2b-256 | ce8a14216fcac2f78a762d105757b71c2488e0344b7f62a4e59512dea8ccd45f |