Personal wiki notebook (not under development)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Rss_channel.py 503B

12345678910111213141516171819
  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. )