This commit is contained in:
Maxim Khomutov 2022-04-01 13:04:14 +03:00 committed by SantaSpeen
parent e3842436b3
commit 89f2653fcd
2 changed files with 53 additions and 5 deletions

View File

@ -1,5 +1,11 @@
# GitSwitch
<p class="text-center" align="center">
<a href="https://gitflic.ru/project/dbi471/git-switch/blob?file=LICENSE"><img alt="License" src="https://img.shields.io/github/license/SantaSpeen/git-switch?style=for-the-badge"></a>
<a href="#"><img alt="GitHub stars" src="https://img.shields.io/github/stars/SantaSpeen/git-switch?style=for-the-badge"></a>
<a href="https://gitflic.ru/user/santaspeen"><img src="https://img.santaspeen.ru/github/magic.svg" alt="magic"></a>
</p>
A tool that will help you copy repositories from GitHub into GitFlic.
## Installation
@ -10,16 +16,21 @@ A tool that will help you copy repositories from GitHub into GitFlic.
$ pip3 install -r requirements.txt
```
If you don't have python installed, download it from [http://python.org/](http://python.org/).
## Usage
Get GitHub token from: https://github.com/settings/tokens \
Get GitFlic token from: https://gitflic.ru/settings/oauth/token
```shell
# Shell
python3 main.py --help
$ python3 main.py --help
```
The script if going to clone all the repos for a given access token under `./cloned-repos/<login>/<repo_name>`.
Then:
* Get GitHub token from: [https://github.com/settings/tokens](https://github.com/settings/tokens)
* Get GitFlic token from: [https://github.com/settings/tokens](https://gitflic.ru/settings/oauth/token)
If you are using 2AF into GitFlic select ssh connection using the key: `--use_ssh true`.
The script will copy all the necessary repositories to `./cloned-repos/<login>/<repo_name>`, then push it to GitFlic

37
READMEru.md Normal file
View File

@ -0,0 +1,37 @@
# GitSwitch
<p class="text-center" align="center">
<a href="https://gitflic.ru/project/dbi471/git-switch/blob?file=LICENSE"><img alt="License" src="https://img.shields.io/github/license/SantaSpeen/git-switch?style=for-the-badge"></a>
<a href="#"><img alt="GitHub stars" src="https://img.shields.io/github/stars/SantaSpeen/git-switch?style=for-the-badge"></a>
<a href="https://gitflic.ru/user/santaspeen"><img src="https://img.santaspeen.ru/github/magic.svg" alt="magic"></a>
</p>
Инструмент, который поможет вам скопировать репозитории из GitHub в GitFlic.
## Установка
```shell
# Shell
$ pip3 install -r requirements.txt
```
Если у вас не установлен питон, скачайте с [http://python.org/](http://python.org/).\
Актуально для windows.
## Использывание
```shell
# Shell
$ python3 main.py --help
```
Изучив аргументы:
* Получите GitHub токен отсюда: [https://github.com/settings/tokens](https://github.com/settings/tokens)
* Получите GitFlic токен отсюда: [https://github.com/settings/tokens](https://gitflic.ru/settings/oauth/token)
Если у вас подключена 2AF в GitFlic используйте ssh: `--use_ssh true`.
Скрипт скопирует все нужные репозитории в `./cloned-repos/<login>/<repo_name>`, затем запушит их в GitFlic.