mrproject - make projects from templates
This project is home cooked software. But of course, you are free to use it as you wish. You might even like it.
Features:
- Generate projects from templates:
mrproject new --template <template> <project_name> - Templates are normal python projects and don't use any templating language. That means you can actually use/test your template while you add new features.
- The default templates are build with a high degree of automation in mind.
- List existing templates:
mrproject list - That's it 🤷
Usage
mrproject help
usage: mrproject command
Commands:
new Create a new project from a template with `project_name`.
list List all available templates.
help Print usage documentation on a specific command.
Usage: mrproject new
mrproject help new
usage: mrproject new [-t|--template] [-n|--no-interaction] project_name
Create a new project from a template with `project_name`.
Example usage:
mrproject new my_new_project
mrproject new my_new_project --template my_fancy_template
Options:
--template
The name or path of the template to use.
Use `mrproject list` to list all available templates.
--no-interaction
Don't ask for user input but accept defaults.
When calling mrproject new
- the user config file is read (
~/.config/mrproject/config.toml), - the user is asked to specify/overwrite all variables defined in
mrproject_template.toml, - the template project is copied to the current working directory,
- every occurrence of
MRPROJECT_*is replaced with the corresponding value (including the folder and file names), - and that's it. This approach is very limited (on purpose) and very simple.
Usage: mrproject list
mrproject help list
usage: mrproject list
List all available templates.
Template
Currently mrproject comes with the following templates:
What Is A Template?
A template is a just a folder that with these files:
mrproject_template.toml # contains the variables that are substituted
README.md # README desribing the features of the template
MRPROJECT_PROJECT_NAME/ # the acual project that is copied
... # anything you want really :)
tests/ # optional tests for your template
...
The file mrproject_template.toml MUST contain the following fields:
[mrproject.template.substitutions]
MRPROJECT_AUTHOR = "your name"
MRPROJECT_EMAIL = "your@email.com"
Some additional fields are added by mrproject automatically:
MRPROJECT_CURRENT_YEAR- the current year
The fields MUST start with MRPROJECT_ and MUST be upper case.
Create Your Own Template
First, read the section above.
Then, you can create your own template by putting it in the templates folder under:
~/.local/share/mrproject/templates/.
~/.local/share/mrproject/templates/
my_template/
README.md
mrproject_template.toml
MRPROJECT_PROJECT_NAME/
...
tests/
...
User Config
The user config file is located at ~/.config/mrproject/config.toml.
Currently you can only specify default substitutions:
[mrproject.template.substitutions]
MRPROJECT_AUTHOR = "your name"
MRPROJECT_EMAIL = "your@email.com"
Why mrproject?
There are many project template generators out there, and many of them are great and more feature rich than this one.
But I want to have a simple one where I can actually use/test the project template as I add new features. This is achieved by not using any templating language, but reserved keywords.
Metadata
Release files for mrproject 0.2.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 |
|---|---|---|---|---|
| mrproject-0.2.0.tar.gz | 36.3 kB | Without provenance | Details for mrproject-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mrproject-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for mrproject-0.2.0-py3-none-any.whl |
Total release size: 76.7 kB
Release files / mrproject-0.2.0.tar.gz
| Download URL | mrproject-0.2.0.tar.gz |
|---|---|
| Size | 36.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d6646dc9d4c1de331f896aaee8b71567961407b6d086a479f01a8620d11abfc
|
|
BLAKE2b-256 checksum How to use checksums |
6c609bbf3b793de2618356d0bca59b5bcd1a4106819d3155f119dfaaf6c00458
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/6.6.10-76060610-generic
|
Release files / mrproject-0.2.0-py3-none-any.whl
| Download URL | mrproject-0.2.0-py3-none-any.whl |
|---|---|
| Size | 40.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d5e56a9df49b7a67c78b8152d9bb71708b5ae08827d7b1c2d8dcedf151a34b3
|
|
BLAKE2b-256 checksum How to use checksums |
2bb862d224e51452dbe6710142f02efdb1c833134e01991851ca2cf4cd298b65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/6.6.10-76060610-generic
|
Security for mrproject 0.2.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.