A tool for creating Boiler Plates.
Project description
boip
boip is an abbreviation for Boiler Plate.
A library that generates code from code templates based on the answers to some questions.
I am a technical artist.
Therefore, the template to be added has a lot of code generation such as Maya related.
1. How to use.
1.1. pip install
python -m pip install boip
1.2. Run boip with CLI.
python -m boip
1.3. CD to the folder where you want to place the template.
cd "Folder path where you want to place the template."
1.4. Choose a template and answer your questions.
1.5. Check the generated folder.
It is copied under cd with the last selected folder name.
Since I chose "Maya Qt-MVC" this time, a template of Maya + Qt + MVC pattern is generated.
2. Add your own template.
Prepare a code template (BoipSet) in advance. Then specify the folder path where BoipSet is located with the -s flag.
python -m boip -s "Target folder path."
2.1. What is BoipSet?
The following two are set as a Boip Set.
- After asking a question, a folder named "template" to use for replacement.
- Configuration file named boip.yaml.
2.1.1. How to write boip.yaml.
title: MayaQt-MVC # template name
convertExtensions: # distExtension srcExtension(The same extension is okay.)
py: py
ui: ui
question: # question list
- name: tool_name # Name to use for replacement. Use with {Name} for stationery.
message: "Tool name?" # Question.
default: sampleWindow # Default Value.
- name: maya_version
message: "What version of Maya are you using?"
default: 2020
2.1.2. How to make a template.
The folders under template will be copied. After that, the inside of {name} is converted by the answer to the question.
It is expected that automatic generation will be included in the future, but currently it is manual.
Example)In the case of "MayaQt-MVC" above.
I have two questions, {tool_name} and {maya_version}.
- template
import sys
print("{tool_name}")
print("{maya_version}")
- answer the questions.
Tool name? > sampleWindow
What version of Maya are you using? > 2020
- After generation. The answer to the question will be converted to the following.
import sys
print("sampleWindow")
print("2020")
If you have a nice template, Please make a merge request!
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 Boip-0.0.3.tar.gz
.
File metadata
- Download URL: Boip-0.0.3.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/2.7.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32e60edb65671f7f4d3f7e834bb021b5ea342840746c6c339e3c5d9514f84e70 |
|
MD5 | bc7c26a81c754432a43f383c7ee4cc19 |
|
BLAKE2b-256 | a36e790b3be66572e52bef4ec2d8b5d295a013e83609de022edb78d0e97c5c2b |
File details
Details for the file Boip-0.0.3-py2-none-any.whl
.
File metadata
- Download URL: Boip-0.0.3-py2-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/2.7.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36c38e14ebbca44a21cf4053338080a0b40b9dd75e1a4dcd1980b7eb0cfd7c25 |
|
MD5 | bb108d0599ed48f036fa7efcbb0c8674 |
|
BLAKE2b-256 | 865530a20a1d4c46d911cc3c32538f99fdebaebd09b156717bb3aac6f4eac24b |