From a16cca9dbdac50d7b9d734eb30212e09a925c3f8 Mon Sep 17 00:00:00 2001 From: Ike Date: Wed, 10 May 2017 20:48:29 +0200 Subject: [PATCH] Publish on PyPi --- .gitignore | 3 ++ MANIFEST.in | 2 ++ README.rst | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++ Readme.md | 80 ---------------------------------------------- setup.cfg | 2 ++ setup.py | 31 ++++++++++++++++++ 6 files changed, 129 insertions(+), 80 deletions(-) create mode 100644 MANIFEST.in create mode 100644 README.rst delete mode 100644 Readme.md create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 85e508c..a357b91 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ backup settings +build +dist +gickup.egg-info diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..e02cfac --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +# Include the license file +include LICENSE.txt diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..7b37c69 --- /dev/null +++ b/README.rst @@ -0,0 +1,91 @@ +Gickup +====== + +This is a script for backing up multiple git repos, keeping local timestamped +copies of all available branches. + +Features +-------- + +* Save state of all remote branches into local branches by current date/time +* Keep track of backed up repositories, automatic batch backup of all known repos +* Configure repository "indices" + + * Scan servers for git repos to auto-add them (using ``ssh find``) + * Scan github user for repos to auto-add them + +How to use +---------- + +.. code:: bash + + # Add new repo to backup list manually + gickup addrepo ssh://user@example.com + gickup addrepo https://github.com/user/example.git + gickup addrepo /some/local/path + + # Optionally specify a target directory + gickup addrepo ssh://user@example.com /target/dir + + # Add github users / ssh server to watch for new repos + gickup addindex --type github user + gickup addindex github://anotheruser + gickup addindex user@example.com:remote/path + + # Then scan for unknown repos + gickup updaterepolist + ... + + # Or scan without configuring + gickup updaterepolist --type github user + ... + gickup updaterepolist user@example.com:remote/path + ... + + # Now do a backup of all known repos + gickup dobackup + + # ... or a specific one + gickup dobackup /local/backup/path + +Settings +-------- + +``dateformat`` + formatstring used to save remote branches into (``backup//``) + +``localbasepath`` + directory where backups will be located by default + +``repos`` + configured repos and respective backup directories + +``servers`` + tuples of server-url (with user part) and server-path which will be scanned + for new repos by updaterepolist. + +``github_users`` + a list of github usernames which will be scanned for new repos by + updaterepolist. + +Why "Gickup"? +------------- + +Well, every project needs a name and https://github.com/sciunto-org/gitbackup +beat me to the obvious one. + +On this occasion: Thank you to the one who gave me the suggestion. + +License +------- + +Gickup is licensed under the AGPLv3 or later, see ``LICENSE.txt``. + +Apart from that I'm open to discussion. If you need a different license feel +free to contact me. + +See also +-------- + +* https://github.com/sciunto-org/gitbackup +* https://github-backup.branchable.com/ diff --git a/Readme.md b/Readme.md deleted file mode 100644 index 8a54958..0000000 --- a/Readme.md +++ /dev/null @@ -1,80 +0,0 @@ -Gickup -====== - -This is a script for backing up multiple git repos, keeping local timestamped -copies of all available branches. - -Features --------- - -* Save state of all remote branches into local branches by current date/time -* Keep track of backed up repositories, automatic batch backup of all known repos -* Scan servers for git repos to auto-add them (using `ssh find`) -* Scan github user for repos to auto-add them - -How to use ----------- - -```sh -# Add new repo to backup list manually -gickup addrepo ssh://user@example.com -gickup addrepo https://github.com/user/example.git -gickup addrepo /some/local/path - -# Optionally specify a target directory -gickup addrepo ssh://user@example.com /target/dir - -# Add github users / ssh server to watch for new repos -gickup add_github_user user -gickup addserver user@example.com:remote/path - -# Then scan for unknown repos -gickup updaterepolist -... - -# Or scan without configuring -gickup updaterepolist --type github user -... -gickup updaterepolist user@example.com:remote/path -... - -# Now do a backup of all known repos -gickup dobackup - -# ... or a specific one -gickup dobackup /local/backup/path -``` - -Settings --------- - -* `dateformat` formatstring used to save remote branches into - (`backup//`) -* `localbasepath` directory where backups will be located by default -* `repos` configured repos and respective backup directories -* `servers` tuples of server-url (with user part) and server-path which will be - scanned for new repos by updaterepolist. -* `github_users` a list of github usernames which will be scanned for new repos - by updaterepolist. - -Why "Gickup"? -------------- - -Well, every project needs a name and https://github.com/sciunto-org/gitbackup -beat me to the obvious one. - -On this occasion: Thank you to the one who gave me the suggestion. - -License -------- - -Gickup is licensed under the AGPLv3 or later, see `LICENSE.txt`. - -Apart from that I'm open to discussion. If you need a different license feel -free to contact me. - -See also --------- - -* https://github.com/sciunto-org/gitbackup -* https://github-backup.branchable.com/ diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..498ec14 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[metadata] +license_file = LICENSE.txt diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..ed6817d --- /dev/null +++ b/setup.py @@ -0,0 +1,31 @@ +import os +from setuptools import setup + +def read(fname): + return open(os.path.join(os.path.dirname(__file__), fname)).read() + +setup( + name = 'gickup', + version = '1.0', + url='https://github.com/tu500/gickup', + author = 'Philip Matura', + author_email = 'philip.m@tura-home.de', + description = ('Automatic git backup script for multiple repositories'), + keywords='git backup', + license='AGPLv3+', + packages=['gickup'], + long_description=read('README.rst'), + entry_points=''' + [console_scripts] + gickup=gickup.__main__:main + ''', + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Environment :: Console', + 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', + 'Operating System :: POSIX :: Linux', + 'Programming Language :: Python :: 3 :: Only', + 'Topic :: Software Development :: Version Control :: Git', + 'Topic :: System :: Archiving :: Backup', + ], +)