def main(): iagitup.check_ia_credentials() URL = args.gitubeurl custom_metadata = args.metadata md = None custom_meta_dict = None print(":: Downloading %s repository..." % URL) gh_repo_data, repo_folder = iagitup.repo_download(URL) # parse supplemental metadata. if custom_metadata != None: custom_meta_dict = {} for meta in custom_metadata.split(','): k, v = meta.split(':') custom_meta_dict[k] = v # upload the repo on IA identifier, meta, bundle_filename= iagitup.upload_ia(repo_folder, gh_repo_data, custom_meta=custom_meta_dict) # cleaning shutil.rmtree(repo_folder) # output print("\n:: Upload FINISHED. Item information:") print("Identifier: %s" % meta['title']) print("Archived repository URL: \n \thttps://archive.org/details/%s" % identifier) print("Archived git bundle file: \n \thttps://archive.org/download/{0}/{1}.bundle \n\n".format(identifier, bundle_filename))