cp-template
This is a very simple utility to generate directories based on templates.
Install
pip install cp-template
Usage
cp-template TEMPLATE_PATH DESTINATION_PATH key=value ...
Suppose you have the following directory structure (Note: the {{}}s are part of the filenames)
{{project}}/
.gitignore
README.md # File contains "{{project}} by {{author}}"
{{project}}/
__init__.py
Then you can run the following command:
cp-template './{{project}}' pineapple author=me
And it will generate this in the current directory:
pineapple/
.gitignore
README.md # File contains "pineapple by me"
pineapple/
__init__.py
The template directory does not have to contain {{...}}. If it does not, the stem of the destination path (last part of the path minus the extension) is placed in the STEM variable, so you can refer to it in the files using {{STEM}}.
More features will be added as I need them, but feel free to make PRs to contribute some.
Metadata
Release files for cp-template 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cp-template-0.3.0.tar.gz | 3.1 kB | Without provenance | Details for cp-template-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cp_template-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for cp_template-0.3.0-py3-none-any.whl |
Total release size: 6.4 kB
Release files / cp-template-0.3.0.tar.gz
| Download URL | cp-template-0.3.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2306a4990e78f52b26bae5db2b1ae89c63078096d23e14d9f40b80fabd8cc44c
|
|
BLAKE2b-256 checksum How to use checksums |
65cdfc9be039abb9fa0be57f774791da0241f6da6e905a00d3799ef4b38891a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.9 Darwin/21.3.0
|
Release files / cp_template-0.3.0-py3-none-any.whl
| Download URL | cp_template-0.3.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
199b400261e464e57186ee45fb9ed6ec82f1072b253ebed8815ba244e6dcb9a5
|
|
BLAKE2b-256 checksum How to use checksums |
bb57b513c0434b5919c4ef4da104ea6017b7b4934fb8382d80a50f37810f4e06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.9 Darwin/21.3.0
|
Security for cp-template 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.