<?xml version="1.0" encoding="utf-8"?> <feed version="0.3" xmlns="http://www.w3.org/2005/Atom" xml:lang="en"> ## see http://www.atomenabled.org/developers/syndication/ #from manager import WikiText, DoneText #def format_atom_date(date): # from time import localtime, strftime # date = localtime(int(date)) # return strftime('%Y-%m-%dT%H:%M:%SZ', date) #updated = max(files)[0] <id>`manager.site + manager.document`</id> <title>`title`</title> <updated>`format_atom_date(updated)`</updated> <link rel="alternate" type="text/html" href="`manager.uri`"/> <author><name>Michael Urman</name><uri>`manager.site`</uri></author> #for mtime, file in files: # meta = manager.load_meta(file) <entry> <title>`meta.get('title', 'Untitled')`</title> <link rel="alternate" type="text/html" href="`manager.site + file`"/> <id>`manager.site + file`</id> <updated>`format_atom_date(meta.get('modified', mtime))`</updated> <published>`format_atom_date(meta.get('issued', mtime))`</published> # for category in meta.get('categories', '').split(): <category term="`category`"/> # pass <content type="text/html" mode="escaped"><![CDATA[`DoneText(manager.load_document(file), manager=manager).replace(']]>',']]\\76')`]]></content> </entry> #pass </feed>