Exemplo n.º 1
0
def main(src, dest, parent_rev=None):
    if APP_KEY == '' or APP_SECRET == '':
        exit("You need to set your APP_KEY and APP_SECRET!")
    term = DropboxTerm(APP_KEY, APP_SECRET)

    if (parent_rev != None):
        metadata = term.do_put(src, dest, parent_rev)
    else:
        metadata = term.do_put(src, dest, None)
    print "%s %s" % (metadata['path'], metadata['rev'])
    print >> sys.stderr, "%s %s" % (metadata['path'], metadata['rev'])
Exemplo n.º 2
0
def main(src, dest, parent_rev=None):
    if APP_KEY == "" or APP_SECRET == "":
        exit("You need to set your APP_KEY and APP_SECRET!")
    term = DropboxTerm(APP_KEY, APP_SECRET)

    if parent_rev != None:
        metadata = term.do_put(src, dest, parent_rev)
    else:
        metadata = term.do_put(src, dest, None)
    print "%s %s" % (metadata["path"], metadata["rev"])
    print >> sys.stderr, "%s %s" % (metadata["path"], metadata["rev"])
def main():
    if APP_KEY == '' or APP_SECRET == '':
        exit("You need to set your APP_KEY and APP_SECRET!")
    term = DropboxTerm(APP_KEY, APP_SECRET)

    try:
      with open('delta.txt', 'r') as f:
        cursor = f.read()
    except IOError as e:
      cursor = None
    
    new_cursor = term.do_delta(cursor)

    with open('delta.txt','w') as f:
       f.write(new_cursor)
Exemplo n.º 4
0
def main(path):
    if APP_KEY == '' or APP_SECRET == '':
        exit("You need to set your APP_KEY and APP_SECRET!")
    term = DropboxTerm(APP_KEY, APP_SECRET)

    if path != "":
        term.do_cd(path)
    term.do_ls()
Exemplo n.º 5
0
def main(src,dest):
    if APP_KEY == '' or APP_SECRET == '':
        exit("You need to set your APP_KEY and APP_SECRET!")
    term = DropboxTerm(APP_KEY, APP_SECRET)

    term.do_mv(src,dest)
def main():
    if APP_KEY == '' or APP_SECRET == '':
        exit("You need to set your APP_KEY and APP_SECRET!")
    term = DropboxTerm(APP_KEY, APP_SECRET)
    #term.cmdloop()
    term.do_login2()
Exemplo n.º 7
0
def main(src, dest):
    if APP_KEY == '' or APP_SECRET == '':
        exit("You need to set your APP_KEY and APP_SECRET!")
    term = DropboxTerm(APP_KEY, APP_SECRET)

    term.do_mv(src, dest)
Exemplo n.º 8
0
def main(path):
    if APP_KEY == '' or APP_SECRET == '':
        exit("You need to set your APP_KEY and APP_SECRET!")
    term = DropboxTerm(APP_KEY, APP_SECRET)

    term.do_mkdir(path)
Exemplo n.º 9
0
def main(path):
    if APP_KEY == '' or APP_SECRET == '':
        exit("You need to set your APP_KEY and APP_SECRET!")
    term = DropboxTerm(APP_KEY, APP_SECRET)

    term.do_rm(path)
Exemplo n.º 10
0
def main():
    if APP_KEY == '' or APP_SECRET == '':
        exit("You need to set your APP_KEY and APP_SECRET!")
    term = DropboxTerm(APP_KEY, APP_SECRET)
    #term.cmdloop()
    term.do_login1()