def add_item(self, title, link, description, author_email=None,<EOL>author_name=None, author_link=None, pubdate=None, comments=None,<EOL>unique_id=None, enclosure=None, categories=(), item_copyright=None,<EOL>ttl=None, **kwargs):
to_unicode = lambda s: force_text(s, strings_only=True)<EOL>if categories:<EOL><INDENT>categories = [to_unicode(c) for c in categories]<EOL><DEDENT>if ttl is not None:<EOL><INDENT>ttl = force_text(ttl)<EOL><DEDENT>item = {<EOL>'<STR_LIT:title>': to_unicode(title),<EOL>'<STR_LIT>': iri_to_uri(link),<EOL>'<STR_LIT:description>': to_unicode(description),<EOL>'<STR_LIT>': to_unicode(author_email),<EOL>'<STR_LIT>': to_unicode(author_name),<EOL>'<STR_LIT>': iri_to_uri(author_link),<EOL>'<STR_LIT>': pubdate,<EOL>'<STR_LIT>': comments,<EOL>'<STR_LIT>': to_unicode(unique_id),<EOL>'<STR_LIT>': enclosure,<EOL>'<STR_LIT>': categories or (),<EOL>'<STR_LIT>': to_unicode(item_copyright),<EOL>'<STR_LIT>': ttl,<EOL>}<EOL>item.update(kwargs)<EOL>self.items.append(item)<EOL>
Adds an item to the feed. All args are expected to be Python Unicode
objects except pubdate, which is a datetime.datetime object, and
enclosure, which is an instance of the Enclosure class.