TurboFeeds

TurboGears controller and widgets for feed handling
Download

TurboFeeds Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Christopher Arndt
  • Publisher web site:
  • http://chrisarndt.de/project/spammcan/

TurboFeeds Tags


TurboFeeds Description

TurboGears controller and widgets for feed handling TurboFeeds is a TurboGears extension that 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, most importantly support for Genshi templates. It works with both the TurboGears 1.0 and the 1.1 branch.Installation:To install TurboFeeds from the Cheeseshop use easy_install: easy_install TurboFeedsThis 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.If you want to get the latest development version, you can check out the trunk from the Subversion repository with:svn co http://svn.turbogears.org/projects/TurboFeeds/trunk TurboFeedsFor bug reports and feature requests, please go to the TurboGears trac at http://trac.turbogears.org/.To open a ticket, you'll need a trac account. Please select "TurboFeeds" as the ticket component.Usage:Controller:from turbogears import controllers, exposefrom turbofeeds import FeedController, FeedHeadLinks, FeedLinksclass 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, 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" ) feedlheadinks = FeedHeadLinks(controller=feed) feedlinks = FeedLinks(controller=feed, title = "Click link to access the feed in %(type)s format") @expose('.templates.mypage') def mypage(self): return dict( feedheadlinks=self.feedheadlinks, feedlinks=self.feedlinks)Template:< head > ${feadheadlinks()} ...< /head >< body > < h2 >Feed links< /h2 > ${feedlinks('%(type)s feed', url_params=dict(format='full'))} ...< /body > Requirements: · Python · TurboGears


TurboFeeds Related Software