return 0 except OSError as e: return 1 def update_gdrive_dir_tree(self): pass def push_local_file_changes_to_drive(self): pass if __name__ == "__main__": gdrivehelper = GDriveMgrHelper("~") # root dir will be home # get authorized and create a service gdrive.create_drive_root_dir() service = gdrive.create_service() gdrivehelper.set_service(service) # gdrivehelper.create_tree("root") # this will build tree starting at root google drive directory # print(gdrivehelper.dir_tree) # pickle the object to a file so we can reuse it as a template to download files # with open('dir_tree.pickle', 'wb') as f: # pickle.dump(gdrivehelper.dir_tree, f) # next create the local directory Tree # then create the file structure - temporary for testing # then download all the files into their proper locations gdrivehelper.download_files() print("") print("*** Finished Downloading Files ***")
def setUp(self): self.root_file_id = u'19GSi5-kmCvJ9ldwBUcqe8vhzSF8fvSgOmch-3MuOYKw' self.root_file_title = u'perl script' self.nested_file_id = "0ByKN-hr2wl1PeG5LTTZQb2NDaWc" self.nested_file_title = "Project 5.iml" self.service = gdrive.create_service()