diff --git a/README.md b/README.md index 926a6db..e4bca0b 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,13 @@ GitHub-Backup requires the `PyGitHub` Python package for the GitHub API v3. Installation is simple with ```bash -pip install -r requirements.txt +pip install git+https://github.com/clockfort/GitHub-Backup ``` ## Usage ``` -usage: github-backup.py [-h] [-v {all,public,private}] +usage: github-backup [-h] [-v {all,public,private}] [-a {owner,collaborator,organization_member}] [-d] [-q] [-m] [-f] [-g ARGS [ARGS ...]] [-t {git,http,ssh}] [-s SUFFIX] [-p PASSWORD] @@ -69,7 +69,7 @@ Then, put it in a cron job somewhere and forget about it for eternity. Example: ```bash -./github-backup.py mohamed786 /home/mohamed786/githubbak -o LineageOS +github-backup mohamed786 /home/mohamed786/githubbak -o LineageOS ``` ## Use a a personal access token (PAT) instead of your password diff --git a/github_backup/__init__.py b/github_backup/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/github-backup.py b/github_backup/github_backup.py similarity index 100% rename from github-backup.py rename to github_backup/github_backup.py diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 28112b6..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -requests -PyGitHub \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..838562e --- /dev/null +++ b/setup.py @@ -0,0 +1,20 @@ +from setuptools import setup + +setup(name='GitHub-Backup', + version='0.1', + description='Makes a backup of all of a github user\'s repositories', + url='https://github.com/clockfort/GitHub-Backup', + author='Chris Lockfort', + author_email='clockfort@csh.rit.edu', + license='CC0-1.0', + packages=['github_backup'], + install_requires=[ + 'requests', + 'PyGitHub' + ], + entry_points = { + 'console_scripts': [ + 'github-backup=github_backup.github_backup:main' + ], + }, + zip_safe=True)