diff --git a/atomtopubsub.py b/atomtopubsub.py index 3cbcef5..9c39806 100755 --- a/atomtopubsub.py +++ b/atomtopubsub.py @@ -49,6 +49,8 @@ def parse(): print colored('++ new entry %s' % entry.title, 'green') else: print colored('++ update entry %s' % entry.title, 'yellow') + + time.sleep(2) xmpp.publish(feed['server'], key, entry) # And we update the last updated date for the feed diff --git a/publishx.py b/publishx.py index c53ec99..31ce886 100644 --- a/publishx.py +++ b/publishx.py @@ -60,6 +60,9 @@ class publishx(sleekxmpp.ClientXMPP): iq['pubsub']['configure']['form'].addField('pubsub#type', ftype = 'text-single', value = NS_ATOM) + iq['pubsub']['configure']['form'].addField('pubsub#deliver_payload', + ftype = 'boolean', + value = 0) iq['pubsub']['configure']['form'].addField('pubsub#description', ftype = 'text-single', value = description) @@ -77,7 +80,6 @@ class publishx(sleekxmpp.ClientXMPP): item = pubsub.Item() item['id'] = entry.id - #payload = ET.Item() ent = ET.Element("entry") ent.set('xmlns', NS_ATOM) @@ -91,7 +93,6 @@ class publishx(sleekxmpp.ClientXMPP): content = ET.SubElement(ent, "content") content.set('type', entry.content[0].type) - #document, errors = tidy_document() content.text = entry.content[0].value if(hasattr(entry, 'links')):