Skip to content

Commit

Permalink
added -v argument
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamdam committed Sep 22, 2018
1 parent 7549850 commit c2f4923
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -37,6 +37,10 @@ You can add also custom metadata:

iagitup --metadata=<key:value,key2:val2> <github_repo_url>

To know the version:

iagitup -v

Example:

iagitup https://github.com/<GITHUBUSER>/<RESPOSITORY>
Expand Down
10 changes: 7 additions & 3 deletions iagitup/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c2f4923

Please sign in to comment.