diff --git a/README.md b/README.md index d296e8f..ada861d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# iagitup.py - v1.5 - archive a github repository to the Internet Archive +# iagitup - v1.5 - archive a git repository from GitHub to the Internet Archive A tool to archive a GitHub repository on the Internet Archive. The script downloads the GitHub repository, creates a [git bundle](https://git-scm.com/docs/git-bundle) and uploads it on archive.org @@ -37,6 +37,10 @@ You can add also custom metadata: iagitup --metadata= +To know the version: + + iagitup -v + Example: iagitup https://github.com// diff --git a/iagitup/__main__.py b/iagitup/__main__.py index 1dd025f..2b6e894 100644 --- a/iagitup/__main__.py +++ b/iagitup/__main__.py @@ -38,13 +38,17 @@ # Configure argparser parser = argparse.ArgumentParser(description=PROGRAM_DESCRIPTION) -parser.add_argument('--metadata', '-m', default=None, type=str, required=False, help="Custom metadata to add to the archive.org item") +parser.add_argument('--metadata', '-m', default=None, type=str, required=False, help="custom metadata to add to the archive.org item.") +parser.add_argument('--version', '-v', action='version', version=__version__) parser.add_argument('gitubeurl', type=str, help='[GITHUB REPO] to archive') args = parser.parse_args() - - def main(): + print args.v + if args.v: + print __version__ + exit(0) + URL = args.gitubeurl custom_metadata = args.metadata md = None