from pyail import PyAIL import sys import json import uuid ail_url = 'https://yourailIP:7000' ail_key = '' source_uuid = "{}".format(uuid.uuid4()) ailfeedertype = "ail_feeder_jabber" try: pyail = PyAIL(ail_url, ail_key, ssl=False) except Exception as e: print(e) sys.exit(0) for content in sys.stdin: elm = json.loads(content) tmp = elm['en'] tmpmt = {} tmpmt['jabber:to'] = elm['to'] tmpmt['jabber:from'] = elm['from'] tmpmt['jabber:ts'] = elm['timestamp'] tmpmt['jabber:id'] = "{}".format(uuid.uuid4()) pyail.feed_json_item(tmp, tmpmt, ailfeedertype, source_uuid) ~