Skip to content

Commit

Permalink
Publish on PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
tu500 committed May 10, 2017
1 parent c848e8c commit a16cca9
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 80 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
backup
settings
build
dist
gickup.egg-info
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Include the license file
include LICENSE.txt
91 changes: 91 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -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://[email protected]
gickup addrepo https://github.com/user/example.git
gickup addrepo /some/local/path
# Optionally specify a target directory
gickup addrepo ssh://[email protected] /target/dir
# Add github users / ssh server to watch for new repos
gickup addindex --type github user
gickup addindex github://anotheruser
gickup addindex [email protected]:remote/path
# Then scan for unknown repos
gickup updaterepolist
...
# Or scan without configuring
gickup updaterepolist --type github user
...
gickup updaterepolist [email protected]: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/<date>/<name>``)

``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/
80 changes: 0 additions & 80 deletions Readme.md

This file was deleted.

2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
license_file = LICENSE.txt
31 changes: 31 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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 = '[email protected]',
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',
],
)

0 comments on commit a16cca9

Please sign in to comment.