Added updated and id to atom feed
[ccoop.git] / ccoop-atomize.py
index b5b4ddf8754708464a81b002e2079bebb30b28a4..d39b3bb2cf664ec29bf15a9090a9d3d21a92bb26 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-import sys, os
+import sys, os,datetime
 
 account=sys.argv[1]
 name=sys.argv[2]
@@ -11,8 +11,10 @@ nlines = len(lines)
 
 print '<?xml version="1.0" encoding="UTF-8"?>'
 print '<feed xmlns="http://www.w3.org/2005/Atom">'
+print "<id>tag:nirgal.com,2000:ccoop/"+account+"</id>"
 print "<title>"+name+" "+account+"</title>"
 print '<subtitle type="text">Balance: '+balance+'</subtitle>'
+print "<updated>"+datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")+"</updated>"
  
 iline = 0
 for line in lines: