asv.feed

Minimal Atom feed writer.

Classes

FeedEntry

Atom feed entry.

Functions

write_atom(dest, entries, author, title, address[, ...])

Write an atom feed to a file.

Module Contents

class asv.feed.FeedEntry(title, updated, link=None, content=None, id_context=None, id_date=None)[source]

Atom feed entry.

Parameters

titlestr

Title of the entry

updateddatetime

Update date

linkstr, optional

Link (alternate) for the entry

contentstr, optional

Body HTML text for the entry.

id_contextlist of str, optional

Material to generate unique IDs from. Feed readers show each id as a separate entry, so if an entry is updated, it appears as a new entry only if the id_context changes. Default: [title, link, content]

id_datedatetime

Date to include in the id. Default: same as updated

title[source]
updated[source]
content = None[source]
id_context = None[source]
id_date = None[source]
get_atom(id_prefix, language)[source]
asv.feed.write_atom(dest, entries, author, title, address, updated=None, link=None, language='en')[source]

Write an atom feed to a file.

Parameters

deststr

Destination file path, or a file-like object

entrieslist of FeedEntry

Feed entries.

authorstr

Author of the feed.

titlestr

Title for the feed.

addressstr

Address (domain name or email) to be used in building unique IDs.

updateddatetime, optional

Time stamp for the feed. If not given, take from the newest entry.

linkstr, optional

Link for the feed.

languagestr, optional

Language of the feed. Default is ‘en’.