Skip to content

Commit

Permalink
feat: include information on readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lpmatos committed Jul 28, 2020
1 parent c41020e commit 4fbbf6f
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 5 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,40 @@
This Python CLI is a very simple tool that help you to clone all projects inside a [gitlab](http://www.gitlab.com) group.

This project is inspired from [gitup](https://github.com/ezbz/gitlabber) and has parts taken from there.

### Usage

usage: gitlabcr [-h] [-u <url>] [-t <token>] [-n <namespace>] [-p <path>] [--disable-root] [--version]

Gitlabrc - clones all projects inside namespaces

optional arguments:
-h, --help show this help message and exit
-u <url>, --url <url>
base URL of GitLab instance
-t <token>, --token <token>
token GitLab API
-n <namespace>, --namespace <namespace>
namespace in GitLab to clone all projects
-p <path>, --path <path>
destination path for cloned projects
--disable-root do not create root namepace folder in path
--version show version

### Exemples

* Clone all repositories inside specific namespace in current directory:

gitlabrc -u $GITLAB_URL -t $GITLAB_TOKEN -n msp/charts

* Clone all repositories inside specific namespace in specific directory:

gitlabrc -u $GITLAB_URL -t $GITLAB_TOKEN -n msp/charts -p /home/ubuntu

* Getting repositories with specific git clone method:

gitlabrc -u $GITLAB_URL -t $GITLAB_TOKEN -n msp/charts -p /home/ubuntu -m http

* Show all repositories without clone/fetch:

gitlabrc -u $GITLAB_URL -t $GITLAB_TOKEN -n msp/charts --dry-run
2 changes: 1 addition & 1 deletion gitlabrc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-

VERSION = (0, 0, 11)
VERSION = (0, 0, 17)

__version__ = ".".join(map(str, VERSION))
8 changes: 4 additions & 4 deletions gitlabrc/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
Examples:
Clone all repositories inside specific namespace in current directory:
gitlabcr -u $GITLAB_URL -t $GITLAB_TOKEN -n msp/charts
gitlabrc -u $GITLAB_URL -t $GITLAB_TOKEN -n msp/charts
Clone all repositories inside specific namespace in specific directory:
gitlabcr -u $GITLAB_URL -t $GITLAB_TOKEN -n msp/charts -p /home/ubuntu
gitlabrc -u $GITLAB_URL -t $GITLAB_TOKEN -n msp/charts -p /home/ubuntu
Getting repositories with specific git clone method:
gitlabcr -u $GITLAB_URL -t $GITLAB_TOKEN -n msp/charts -p /home/ubuntu -m http
gitlabrc -u $GITLAB_URL -t $GITLAB_TOKEN -n msp/charts -p /home/ubuntu -m http
Show all repositories without clone/fetch:
gitlabcr -u $GITLAB_URL -t $GITLAB_TOKEN -n msp/charts --dry-run
gitlabrc -u $GITLAB_URL -t $GITLAB_TOKEN -n msp/charts --dry-run
"""
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-

from codecs import open
from gitlabrc import __version__
from os.path import abspath, dirname, join
from setuptools import setup, find_packages
Expand Down

0 comments on commit 4fbbf6f

Please sign in to comment.