Personal wiki notebook (not under development)

Rss_channel.py 503B

1234567891011121314151617181920
  1. from Rss_tags import Rss, Channel, Title, Link, Description, Language
  2. class Rss_channel( Rss ):
  3. MAX_ITEMS = 20
  4. def __init__( self, title, link, description, rss_items, language = None ):
  5. Rss.__init__(
  6. self,
  7. Channel(
  8. Title( u"%s" % title ),
  9. Link( link ),
  10. Description( description ),
  11. Language( language or u"en-us" ),
  12. rss_items[ : self.MAX_ITEMS ],
  13. ),
  14. version = u"2.0",
  15. xmlns_dc = u"http://purl.org/dc/elements/1.1/",
  16. )