Ejemplo n.º 1
0
def sync_work_dir():

    path = "/home/tt/Documents/covscan.xmind"

    tasks = get_tasks(path)
    for t in tasks:
        P.run.add_task(t['title'])
Ejemplo n.º 2
0
def sync_file(xmlrpc_url, path, secret):
    client = connect(xmlrpc_url)
    tasks = get_tasks(path)
    tasks['secret'] = secret
    client.client.sync_tasks(
        base64.encodestring(
            zlib.compress(
                pickle.dumps(tasks)
            )
        )
    )
Ejemplo n.º 3
0
    return xmlrpclib.ServerProxy(url, allow_none=True, transport=tc,
                                 verbose=0)


def sync_file(xmlrpc_url, path, secret):
    client = connect(xmlrpc_url)
    tasks = get_tasks(path)
    tasks['secret'] = secret
    client.client.sync_tasks(
        base64.encodestring(
            zlib.compress(
                pickle.dumps(tasks)
            )
        )
    )

if __name__ == '__main__':
    #xmlrpc = "https://mindtask-mtstage.rhcloud.com/xmlrpc/client/"
    xmlrpc = "http://127.0.0.1:8000/xmlrpc/client/"

    client = connect(xmlrpc)

    path = "/home/tt/Documents/maps/personal.xmind"

    tasks = get_tasks(path)
    tasks['secret'] = '762aabc0f678440b96d5f132d55f4b13'

    print client.client.hello()

    client.client.sync_tasks(base64.encodestring(zlib.compress(pickle.dumps(tasks))))