- Add the author tag support

This commit is contained in:
Jaussoin Timothée 2014-10-16 20:06:29 +02:00
parent 5740730609
commit a46f8141dc

View File

@ -1,6 +1,7 @@
import sys
import logging
import getpass
from optparse import OptionParser
from termcolor import colored, cprint
@ -102,6 +103,13 @@ class publishx(sleekxmpp.ClientXMPP):
link.set('type', l['type'])
link.set('rel', l['rel'])
if(hasattr(entry, 'authors')):
author = ET.SubElement(ent, "author")
name = ET.SubElement(author, "name")
name.text = entry.authors[0].name
if(hasattr(entry.authors[0], 'href')):
uri = ET.SubElement(author, "uri")
uri.text = entry.authors[0].href
item['payload'] = ent