Generate new projects from git repositories
Project description
new
Generate new projects from git repositories
new is a command to create new projects based on existing git repos. It simply shallow clones a repository to a directory with your specified new project name, and cleans up the git files like they were never there. It also supports 1:1 string replacement.
Usage
You can create new project from any github repository with just the username and project name
The following command will create a new project for you based on this one, if you do not provide a full git url it will default to GitHub:
new myNewProject divanvisagie/new
You can also specify a URL to any git repository that you have access to:
new myNewProject git@gitlab.com:divan/new.git
These examples are just simple clones though, new also lets authors configure a repository so that it will prompt you to replace strings that you may want to rename for your project.
You can give it a try with:
new myNewProject divanvisagie/kotlin-tested-seed
You will see that it prompts you to replace the package name, just pressing enter will skip this and keep the name:
> new myNewProject divanvisagie/kotlin-tested-seed
Creating testbed from https://github.com/divanvisagie/kotlin-tested-seed.git
Enumerating objects: 14, done.
Counting objects: 100% (14/14), done.
Compressing objects: 100% (9/9), done.
Total 14 (delta 0), reused 10 (delta 0), pack-reused 0
Enter replacement text for com.divanvisagie.example
text : com.divanvisagie.example
description: The package name
> com.divanvisagie.mynewproject
The reason we see this is because the kotlin-tested-seed
repository contains a .new.yml
file at its root:
replace:
strings:
- match: com.divanvisagie.example
description: The package name
You can configure as many match strings as you want in your own seed projects.
Installation Options
PyPi
pip install new-project
Development
Set up the python environment with:
python -m venv env
Install dependencies
pip install -r requirements.txt
Tests are run with pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file new-project-0.0.9.tar.gz
.
File metadata
- Download URL: new-project-0.0.9.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8004c6bd5ecf2882f2544e28235e9dd34771d15ceffa198ec9f4a3266da0fd0 |
|
MD5 | bf882efd5061e13c612c114aca26cd09 |
|
BLAKE2b-256 | e37bbee4451ae2b9c1bf82bb3318b15491a545e1874c28c14c91f5b356c44b5a |
File details
Details for the file new_project-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: new_project-0.0.9-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2759f126c4cc144b0e46062a8065002ae8349af4df40f63ae5650ba182cea1cf |
|
MD5 | 1efe8391184358b4958528c2a8a561ba |
|
BLAKE2b-256 | d9f6ba40c35505640d3ace0738fb135defe4c5931357e8bb821a63036e4560d4 |