View on GitHub

Github-auto-tools

Python command line tool to clone all public repos and gists from a single github account, and populate empty new repos with a set of templated default files.

Download this project as a .zip file Download this project as a tar.gz file

github-clonetools

Python command line tool to clone all public repos and gists from a single github account, and populate empty new repos with a set of templated common default files.

Installation:

Developed for Python 2.7x work, though it may work for other distributions.

To install, run python setup.py build install

Usage:

The setup.py file installs three command line scripts into your python scripts directory.

Files generated for empty repos:

When an empty repo is cloned using either the clonerepos or cloneall script, the directory is automatically populated with a set of templated default files. These include:

Additionally, for empty projects with the word "python" in the description:

These files can be templated with repo-specifc information (or however else you'd like) using the methods in github_clonetools/default_files.py. Individual default files can be added/removed to the script behavior by editing the method write_default_files in github_clonetools/clonetools.py.

This behavior can be tested using any empty repo. I use https://github.com/thearn/test-empty-repo for this purpose.

Examples:

To clone all of github user thearn's public gists and repos into the current directory:

$ cloneall thearn

To clone all github user thearn's public gists and repos into the separate thearn_repos and thearn_gists directories:

$ cloneall thearn thearn_repos thearn_gists

To clone all of github user thearn's public repos into a directory named thearn_repos:

$ clonerepos thearn thearn_repos

To clone all of github user thearn's public gists into a directory named thearn_gists:

$ clonegists thearn thearn_gists