From a46f8141dcef4d91bdec0fad77acd0159364fb15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaussoin=20Timoth=C3=A9e?= Date: Thu, 16 Oct 2014 20:06:29 +0200 Subject: [PATCH] - Add the author tag support --- publishx.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/publishx.py b/publishx.py index 31ce886..8307c05 100644 --- a/publishx.py +++ b/publishx.py @@ -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