An easy way to create a tool to generate code boilerplates like "npm init" and "vue create" for any programming language.
Project description
An easy way to create a tool to generate code boilerplates like npm init
and vue create
for any programming and markup language.
Features
Cross-platform: You can use it on Windows, Mac and Linux, and…
You don’t need to have Python installed!
Simple and beautiful command line interface!
Manipulate files with template engine: Only knowing a model engine can create boilers for any programming and markup language. Currently…
Jinja, Mako and Genshi are supported!
Manipulate files with template engine and YAML: You can choose which files and directories will be written and define their content intuitively with a YAML file
Complete: You have several options to manipulate from input and arguments to commands to be executed and the behavior of the template engine
You can add boilerplates to use offline, just run:
boilee add <boilerplate-name>
The outputs are true complete cli’s: The boilers generated can receive arguments, receive inputs, show help, show boilerplate information, get information from the system and execute commands. This makes them true cli’s, as well as
npm init
andvue-create
.
Installation
Obtain the executable
You can get here the executables for Windows, Linux and Mac OS
Installing via pip
You can install boilee via pip on your system (or on a venv) with the following command:
pip install boilee
Installing from source code
To get the executable from the source see the Build section
Usage
# Create a zip file that contains all the information of the boilerplate:
boilee make <input-directory> <boilerplate-name>
# Generate boilerplate
boilee run <input-file> <output-directory> [...boilerplate-options]
QuickStart
Create the following files:
# example_boilerplate/project/scripts/python3.py
def main():
print("Message from Python 3:")
print("{{ message }}")
if __name__ == "__main__":
main()
# example_boilerplate/project/scripts/python2.py
def main():
print "Message from Python 2:"
print "{{ message }}"
if __name__ == "__main__":
main()
# example_boilerplate/.boilee/structure.yml
- {{ project_name }} @content="project": # Creates a directory with a name provided by the user with the content of the "project" directory
- scripts: # "scripts" directory
- python{{ python-version }}.py
# example_boilerplate/.boilee/parameters.yml
project_name:
input-type: input
parameter_type: argument
message: Enter the project name
python-version:
input-type: list
message: Select a Python version
choices:
- Python 3:
value: 3
- Python 2:
value: 2
message:
input-type: input
message: Enter a message
Create a zip file that contains all the information of the boilerplate:
boilee make example_boilerplate example
Generate boilerplate and test:
boilee run example.zip example_python3 --python-version=3 --message=Hi!
python3 example_python3/scripts/python3.py
# Result
Message from Python 3:
Hi!
boilee run example.zip example_python2 --python-version=2 --message=Hi!
python2 example_python2/scripts/python2.py
# Result
Message from Python 2:
Hi!
If a parameter is not provided it will be requested later.
Development
To open this project in a development environment see the Preparation section in the Contributor Guidelines
You can also open this project in an automated development environment in gitpod:
Contributing
Build
By default boilee uses pyoxidizer to generate an executable.
To generate an executable with pyoxidizer (if pyoxidizer is already installed) run the command:
pyoxidizer build
The executable will be generated inside the “build” directory
License
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 boilee-1.0.0.tar.gz
.
File metadata
- Download URL: boilee-1.0.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03e2023044a6b88541ceece89d135adb610772f7b1f90690d0f5b15c57f7f163 |
|
MD5 | 5a509dbf282e9c86c0045c3e0ad7795b |
|
BLAKE2b-256 | ceadfdcb0534005b484e9aa4e7b29ba513e8213dabea9c1ae2be1b235a94d24e |
File details
Details for the file boilee-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: boilee-1.0.0-py3-none-any.whl
- Upload date:
- Size: 22.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c990bd9f884e9b23162a5f23743f6df947a9cb4babddc5e5b1c365df26f474c |
|
MD5 | 8a18db940a2787e471ab77c2b671a646 |
|
BLAKE2b-256 | 9f0f4d4095477a97d8a654fc16dae11500566d1fbc63b1a142c43bbc795b0b6d |