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(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)
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()
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()
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(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)
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)
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()