### Genmax
Genmax is a simple code generation tool.
#### Key Components
- Projects
Genmax organizes all files and content in projects. Every project has itown folder. Genmax projects can be created in any folder.
- Flows
Genmax projects have flows to group together multiple files to be generated. Flows are in **yml** format.
- Data
You can pass data to templates that help generate data. For example, you can dynamically pass the name of attributes if you are generating a class file.
- Templates
These templates form the basis of the code to be generated. Genmax uses the Jinja2 engine for code generation.
- Output
Once the data is passed to a template, Genmax generates an output file with the generated code. For nested output locations, you can use **>** as a separator.
#### Commands
| Command | Description |
|:---|:---|
|gmx add proj \<project-name> | Create a new project.|
|gmx set proj \<project-name> | Set the current project.|
|gmx wf run \<workflow-name> | Run workflow for a given project.|
#### Extensions supported in templates
The following methods are supported in the template:
| Description | Method |
|:---|:---|
|Lower case first char| lcase(your_string)|
|Lower case| lowercase(your_string)|
|Upper case| uppercase(your_string)|
|Pluralize| pluralize(your_string)|
|Join With Commas| joinify(name_of_element, element_list)|
|Switch to Camel case| camel(your_string)|
|Switch to Kebab case| kebab(your_string)|
|Switch to Pascale case| pascale(your_string)|
|Switch to Dot case| dot(your_string)|
|Switch to Title case| title(your_string)|
|Switch to Snake case| snake(your_string)|
|Switch to Path format| path(your_string)|
|Generate UUID| uuid()|
|Generate secret in 16 bit - hexadecimal| secret()|
|Generate secret in 64 bit - hexadecimal| secret_complex()|
|Read config from .env file.| env(file_name, config_name)|
#### Quick Start
Create a sample project.
```bash
gmx init
```
Run the sample workflow in the project.
```bash
gmx wf run sample
```
#### Other commands
If you have multiple projects, you can set another one as active.
```bash
gmx proj set other-project
```
Delete a project using the below command.
```bash
gmx proj del project-name
```
#### Workflow Item Types
Add these to your workflow YAML file as needed.
| Item | Description |
|:---|:---|
| Generate ||
| data | Data to pass to the template. |
| action | The name of the generate action. |
| template | Template to use for code generation (j2 supported). |
| output | Name and extension of the output file. |
|||
| Write to File ||
| action | The name of the write_to_file action. |
| template | Template to write to file. |
| output | Name and extension of the output file. |
|||
Raw data
{
"_id": null,
"home_page": "https://https://github.com/razaibi/genmax/",
"name": "genmax",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "cli code generator automation",
"author": "Raza Balbale",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/a9/a6/0f2d5f5777444a84dddd1dc2feda1ad201e19aa18a63e5ec3d059bc52483/genmax-0.1.5.tar.gz",
"platform": null,
"description": "### Genmax\n\nGenmax is a simple code generation tool.\n\n#### Key Components\n\n- Projects\n\nGenmax organizes all files and content in projects. Every project has itown folder. Genmax projects can be created in any folder.\n\n- Flows\n\nGenmax projects have flows to group together multiple files to be generated. Flows are in **yml** format.\n\n- Data\n\nYou can pass data to templates that help generate data. For example, you can dynamically pass the name of attributes if you are generating a class file.\n\n- Templates\n\nThese templates form the basis of the code to be generated. Genmax uses the Jinja2 engine for code generation.\n\n- Output\n\nOnce the data is passed to a template, Genmax generates an output file with the generated code. For nested output locations, you can use **>** as a separator.\n\n#### Commands\n\n| Command | Description |\n|:---|:---|\n|gmx add proj \\<project-name> | Create a new project.|\n|gmx set proj \\<project-name> | Set the current project.|\n|gmx wf run \\<workflow-name> | Run workflow for a given project.|\n\n#### Extensions supported in templates\n\nThe following methods are supported in the template:\n\n| Description | Method |\n|:---|:---|\n|Lower case first char| lcase(your_string)|\n|Lower case| lowercase(your_string)|\n|Upper case| uppercase(your_string)|\n|Pluralize| pluralize(your_string)|\n|Join With Commas| joinify(name_of_element, element_list)|\n|Switch to Camel case| camel(your_string)|\n|Switch to Kebab case| kebab(your_string)|\n|Switch to Pascale case| pascale(your_string)|\n|Switch to Dot case| dot(your_string)|\n|Switch to Title case| title(your_string)|\n|Switch to Snake case| snake(your_string)|\n|Switch to Path format| path(your_string)|\n|Generate UUID| uuid()|\n|Generate secret in 16 bit - hexadecimal| secret()|\n|Generate secret in 64 bit - hexadecimal| secret_complex()|\n|Read config from .env file.| env(file_name, config_name)|\n\n#### Quick Start\n\nCreate a sample project.\n\n```bash\ngmx init\n```\n\nRun the sample workflow in the project.\n\n```bash\ngmx wf run sample\n```\n\n#### Other commands\n\nIf you have multiple projects, you can set another one as active.\n\n```bash\ngmx proj set other-project\n```\n\nDelete a project using the below command.\n\n```bash\ngmx proj del project-name\n```\n\n#### Workflow Item Types\n\nAdd these to your workflow YAML file as needed.\n\n| Item | Description |\n|:---|:---|\n| Generate ||\n| data | Data to pass to the template. |\n| action | The name of the generate action. |\n| template | Template to use for code generation (j2 supported). |\n| output | Name and extension of the output file. |\n|||\n| Write to File ||\n| action | The name of the write_to_file action. |\n| template | Template to write to file. |\n| output | Name and extension of the output file. |\n|||\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "A simple code generation tool.",
"version": "0.1.5",
"project_urls": {
"Documentation": "https://github.com/razaibi/genmax/README.md",
"Homepage": "https://https://github.com/razaibi/genmax/",
"Source": "https://github.com/razaibi/genmax",
"Tracker": "https://github.com/razaibi/genmax/"
},
"split_keywords": [
"cli",
"code",
"generator",
"automation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a33e62fbe6e091f00bebff9c8940da15f851e6630947e0e8bb14668445be2c9f",
"md5": "ffd4ff78f4909e005f5505b8377ae5e3",
"sha256": "3e62ba54e79c3b84619cc330925824004c948a6cd29cbd8bd32e47cd772bbdd8"
},
"downloads": -1,
"filename": "genmax-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ffd4ff78f4909e005f5505b8377ae5e3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 14905,
"upload_time": "2024-03-12T23:22:17",
"upload_time_iso_8601": "2024-03-12T23:22:17.377134Z",
"url": "https://files.pythonhosted.org/packages/a3/3e/62fbe6e091f00bebff9c8940da15f851e6630947e0e8bb14668445be2c9f/genmax-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a9a60f2d5f5777444a84dddd1dc2feda1ad201e19aa18a63e5ec3d059bc52483",
"md5": "3352575d16faabfe40cbd99dd503eec6",
"sha256": "290c0c509f6183e958b1ef068d6278b5f070370e86d20d10fab2db6b93a60306"
},
"downloads": -1,
"filename": "genmax-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "3352575d16faabfe40cbd99dd503eec6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11728,
"upload_time": "2024-03-12T23:22:18",
"upload_time_iso_8601": "2024-03-12T23:22:18.964431Z",
"url": "https://files.pythonhosted.org/packages/a9/a6/0f2d5f5777444a84dddd1dc2feda1ad201e19aa18a63e5ec3d059bc52483/genmax-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-12 23:22:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "razaibi",
"github_project": "genmax",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "genmax"
}