Name | ccpstencil JSON |
Version |
0.8.0
JSON |
| download |
home_page | None |
Summary | An Alviss powered Template renderer where the context input can be files and entire directory structures can be rendered. |
upload_time | 2024-06-04 14:55:50 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | MIT License Copyright (c) 2024 CCP Games Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
alviss
template
render
jinja2
tools
ccp
utils
|
VCS |
|
bugtrack_url |
|
requirements |
ccptools
alviss
jinja2
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# CCP Stencil
An Alviss and Jinja2 powered template renderer where the context input can be
files and entire directory structures can be rendered.
This is a generalized variant of the "CCP Borg Bootstrapper" project
bootstrapping and build and deployment tool which used entire "template"
projects that were rendered to bootstrap entire projects and to render CI/CD
manifests on demand.
The rest of this readme is (at the moment) just a "sketch" for how this package
should work and was written before any actual code or functionality.
## Context
- [x] No context (Weird use case...?!?)
- [x] kwargs context (via code)
- [x] Dict context (via code)
- [x] Alviss file context (json/yaml + inheritance)
- [x] Args context (from commandline)
## Template
- [x] String template (via code)
- [x] File template
- [x] Args template (from commandline)
- [ ] Directory template
## Renderer
- [x] String renderer (via code)
- [x] Stdout renderer (for commandline)
- [x] File renderer
- [ ] Directory renderer
## Other features...?
- [x] ENV var rendering (can be done via ${__ENV__:FOO} in Alviss input)?
- [ ] Meta-data header in files for Directory rendering that controls file names and/or if they should be rendered or not
- [x] Skip-if tag for skipping file rendering
- [ ] Some meta-tag that can control the output name of a file via the `FileRenderer`
- [ ] Meta-data file for directories in Directory rendering that control the directory name?
- [x] Proper Jinja2 Environment Template Loader to enable Jinja's include/extend stuff?
- [x] Custom macros/scripts/filters?
## Use Cases
- From commandline (main use case, e.g. rendering CI/CD manifests)
- From code
### Command Line Use Case Examples
Using these as a basis for functionality (this is written before any actual code)!
#### Example 1
```shell
$ ccp-stencil -i context.yaml -t template.html -o result.html
```
- Alviss file input: `-i context.yaml`
- Template file input: `-t template.html`
- Render file output: `-o result.html`
#### Example 2
```shell
$ ccp-stencil -a name=Bob -a age=7 -a color=Red -s "My name is {{name}} and I am {{age}} years old and my favorite color is {{color}}"
My name is Bob and I am 7 years old and my favorite color is Red
```
- Args input: `-a name=Bob -a age=7 -a color=Red`
- String template input: `-s "My name is {name} and I am {age} years old and my favorite color is {color}"`
- Print (stdout) output: _No argument, this is default!_
#### Example 3
```shell
$ ccp-stencil -T templates/ -O build/
```
- No context input: _No argument, this is default!_
- Template directory input: `-T templates/`
- Render directory output: `-O build/`
Raw data
{
"_id": null,
"home_page": null,
"name": "ccpstencil",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "alviss, template, render, jinja2, tools, ccp, utils",
"author": null,
"author_email": "Thordur Matthiasson <thordurm@ccpgames.com>",
"download_url": "https://files.pythonhosted.org/packages/fc/8c/811bf8d72c198ff979d5a3f86a04913becc080faaa5285f4429c2b72ef1c/ccpstencil-0.8.0.tar.gz",
"platform": null,
"description": "# CCP Stencil\n\nAn Alviss and Jinja2 powered template renderer where the context input can be \nfiles and entire directory structures can be rendered.\n\nThis is a generalized variant of the \"CCP Borg Bootstrapper\" project \nbootstrapping and build and deployment tool which used entire \"template\" \nprojects that were rendered to bootstrap entire projects and to render CI/CD \nmanifests on demand. \n\nThe rest of this readme is (at the moment) just a \"sketch\" for how this package \nshould work and was written before any actual code or functionality.\n\n## Context\n\n- [x] No context (Weird use case...?!?)\n- [x] kwargs context (via code)\n- [x] Dict context (via code)\n- [x] Alviss file context (json/yaml + inheritance)\n- [x] Args context (from commandline)\n\n## Template\n\n- [x] String template (via code)\n- [x] File template\n- [x] Args template (from commandline)\n- [ ] Directory template\n\n## Renderer\n\n- [x] String renderer (via code)\n- [x] Stdout renderer (for commandline)\n- [x] File renderer\n- [ ] Directory renderer\n\n## Other features...?\n\n- [x] ENV var rendering (can be done via ${__ENV__:FOO} in Alviss input)?\n- [ ] Meta-data header in files for Directory rendering that controls file names and/or if they should be rendered or not\n - [x] Skip-if tag for skipping file rendering\n - [ ] Some meta-tag that can control the output name of a file via the `FileRenderer`\n- [ ] Meta-data file for directories in Directory rendering that control the directory name?\n- [x] Proper Jinja2 Environment Template Loader to enable Jinja's include/extend stuff?\n- [x] Custom macros/scripts/filters?\n\n## Use Cases\n\n- From commandline (main use case, e.g. rendering CI/CD manifests)\n- From code\n\n### Command Line Use Case Examples\n\nUsing these as a basis for functionality (this is written before any actual code)!\n\n#### Example 1\n\n```shell\n$ ccp-stencil -i context.yaml -t template.html -o result.html\n```\n\n- Alviss file input: `-i context.yaml`\n- Template file input: `-t template.html`\n- Render file output: `-o result.html`\n\n\n#### Example 2\n\n```shell\n$ ccp-stencil -a name=Bob -a age=7 -a color=Red -s \"My name is {{name}} and I am {{age}} years old and my favorite color is {{color}}\"\nMy name is Bob and I am 7 years old and my favorite color is Red\n```\n\n- Args input: `-a name=Bob -a age=7 -a color=Red`\n- String template input: `-s \"My name is {name} and I am {age} years old and my favorite color is {color}\"`\n- Print (stdout) output: _No argument, this is default!_\n\n\n#### Example 3\n\n```shell\n$ ccp-stencil -T templates/ -O build/\n```\n\n- No context input: _No argument, this is default!_\n- Template directory input: `-T templates/`\n- Render directory output: `-O build/`\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 CCP Games Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "An Alviss powered Template renderer where the context input can be files and entire directory structures can be rendered.",
"version": "0.8.0",
"project_urls": {
"Changelog": "https://github.com/ccpgames/ccp-stencil/blob/main/CHANGELOG.md",
"Documentation": "https://github.com/ccpgames/ccp-stencil/blob/main/README.md",
"Homepage": "https://github.com/ccpgames/ccp-stencil",
"Issues": "https://github.com/ccpgames/ccp-stencil/issues",
"Repository": "https://github.com/ccpgames/ccp-stencil.git"
},
"split_keywords": [
"alviss",
" template",
" render",
" jinja2",
" tools",
" ccp",
" utils"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "98f9c78a4a264eb947c3b33f8f4611afdd02fc6afb102f6063ba90d45e8f1848",
"md5": "a2817d4d83f2fd4e7ab23315e4b06bfe",
"sha256": "c67d0bff0d08e35482b1d9c1448b899e3203e41484c8740c8ecde17b2bdb4b19"
},
"downloads": -1,
"filename": "ccpstencil-0.8.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a2817d4d83f2fd4e7ab23315e4b06bfe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 24739,
"upload_time": "2024-06-04T14:55:48",
"upload_time_iso_8601": "2024-06-04T14:55:48.889022Z",
"url": "https://files.pythonhosted.org/packages/98/f9/c78a4a264eb947c3b33f8f4611afdd02fc6afb102f6063ba90d45e8f1848/ccpstencil-0.8.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fc8c811bf8d72c198ff979d5a3f86a04913becc080faaa5285f4429c2b72ef1c",
"md5": "0858fabdac25c7be71371bd88fec89ba",
"sha256": "2aa40a8bf77725a04e2077ad10d50977e9052a2d4b7257266a1a3f9a7e60a6ec"
},
"downloads": -1,
"filename": "ccpstencil-0.8.0.tar.gz",
"has_sig": false,
"md5_digest": "0858fabdac25c7be71371bd88fec89ba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17511,
"upload_time": "2024-06-04T14:55:50",
"upload_time_iso_8601": "2024-06-04T14:55:50.084109Z",
"url": "https://files.pythonhosted.org/packages/fc/8c/811bf8d72c198ff979d5a3f86a04913becc080faaa5285f4429c2b72ef1c/ccpstencil-0.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-04 14:55:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ccpgames",
"github_project": "ccp-stencil",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "ccptools",
"specs": [
[
">=",
"1.1"
],
[
"<",
"2"
]
]
},
{
"name": "alviss",
"specs": [
[
"<",
"4"
],
[
">=",
"3.3"
]
]
},
{
"name": "jinja2",
"specs": [
[
"<",
"4"
],
[
">=",
"3.1"
]
]
}
],
"lcname": "ccpstencil"
}