witten
/
luminotes
Archived
1
0
Fork 0
This repository has been archived on 2023-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
luminotes/view/Rss_channel.py

20 lines
503 B
Python

from Rss_tags import Rss, Channel, Title, Link, Description, Language
class Rss_channel( Rss ):
MAX_ITEMS = 20
def __init__( self, title, link, description, rss_items, language = None ):
Rss.__init__(
self,
Channel(
Title( u"%s" % title ),
Link( link ),
Description( description ),
Language( language or u"en-us" ),
rss_items[ : self.MAX_ITEMS ],
),
version = u"2.0",
xmlns_dc = u"http://purl.org/dc/elements/1.1/",
)