Name | orji JSON |
Version |
4.5.0
JSON |
| download |
home_page | None |
Summary | Org mode to jinja2 templating. |
upload_time | 2024-06-12 10:37:45 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7.0 |
license | MIT |
keywords |
orgmode
markdown
latex
jinja2
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# OrJi
[](https://github.com/crdoconnor/orji/actions/workflows/regression.yml)
OrJi is a command line tool to generate text files using [jinja2](https://en.wikipedia.org/wiki/Jinja_(template_engine))
and [orgmode](https://en.wikipedia.org/wiki/Org-mode) files. It can be used to generate LaTeX, Markdown or HTML or any other kind of text from an orgmode file.
It is somewhat inspired by [j2cli](https://github.com/kolypto/j2cli).
## Quickstart
Simple org mode file used with simple template.
simple.org
```
* A normal note
Just a note
* TODO Wash car :morning:
Car wash.
* TODO File taxes :evening:
File taxes for wife too.
* DONE Watch TV
```
simple.jinja2
```
{% for note in root %}
{%- if note.state == "TODO" -%}
# {{ note.name }} ({% for tag in note.tags %}{{ tag }}{% endfor %})
{{ note.body }}
{% endif %}
{% endfor %}
```
Running:
```bash
orji out simple.org simple.jinja2
```
Will output:
```
# Wash car (morning)
Car wash.
# File taxes (evening)
File taxes for wife too.
```
## Why?
The practical itch I was scratching was editing and writing small blocks of content in [orgzly](https://orgzly.com/) on my phone and being able to kick off a small script that either turned it into a nice letter PDF or CV pdf or updated the markdown on my website.
It also lets me maintain [separation of concerns](https://en.wikipedia.org/wiki/Separation_of_concerns) on personal documents by keeping content in org files and style in jinja2 templates.
## Install
OrJi can be installed with pip:
```bash
pip install orji
```
As a command line app, it is typically best installed via
[pipx](https://pipx.pypa.io/stable/).
```bash
pipx install orji
```
### Using OrJi
- [Demonstration of all template features](https://hitchdev.com/orji/using/all-template-features)
- [Deliberately trigger a template failure](https://hitchdev.com/orji/using/deliberate-failure)
- [Insert file](https://hitchdev.com/orji/using/insert)
- [Example of Generated LaTeX A4 CV](https://hitchdev.com/orji/using/latex-cv)
- [Example of Generated LaTeX A4 Letter](https://hitchdev.com/orji/using/latex-letter)
- [Convert chunks of orgmode text into markdown](https://hitchdev.com/orji/using/markdown)
- [Use a python module with template variables and methods](https://hitchdev.com/orji/using/module)
- [Templated with more than one note](https://hitchdev.com/orji/using/orji-run-multiple)
- [Run](https://hitchdev.com/orji/using/orji-run)
Raw data
{
"_id": null,
"home_page": null,
"name": "orji",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7.0",
"maintainer_email": null,
"keywords": "orgmode, markdown, latex, jinja2",
"author": null,
"author_email": "Colm O'Connor <colm.oconnor.github@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/1e/35/06a236af73534a08937bcaa4fe994ff1de7d23550f7f831b96c1c89b775d/orji-4.5.0.tar.gz",
"platform": null,
"description": "# OrJi\n\n[](https://github.com/crdoconnor/orji/actions/workflows/regression.yml)\n\nOrJi is a command line tool to generate text files using [jinja2](https://en.wikipedia.org/wiki/Jinja_(template_engine))\nand [orgmode](https://en.wikipedia.org/wiki/Org-mode) files. It can be used to generate LaTeX, Markdown or HTML or any other kind of text from an orgmode file.\n\nIt is somewhat inspired by [j2cli](https://github.com/kolypto/j2cli).\n\n## Quickstart\n\n\n\nSimple org mode file used with simple template.\n\n\n\n\n\nsimple.org\n```\n* A normal note\n\nJust a note\n\n* TODO Wash car :morning:\n\nCar wash.\n\n* TODO File taxes :evening:\n\nFile taxes for wife too.\n\n* DONE Watch TV\n\n```\n\n\nsimple.jinja2\n```\n{% for note in root %}\n{%- if note.state == \"TODO\" -%}\n# {{ note.name }} ({% for tag in note.tags %}{{ tag }}{% endfor %})\n\n{{ note.body }}\n{% endif %}\n{% endfor %}\n\n```\n\n\n\n\nRunning:\n```bash\norji out simple.org simple.jinja2\n```\n\nWill output:\n```\n\n# Wash car (morning)\n\nCar wash.\n\n# File taxes (evening)\n\nFile taxes for wife too.\n\n\n\n\n```\n\n\n## Why?\n\nThe practical itch I was scratching was editing and writing small blocks of content in [orgzly](https://orgzly.com/) on my phone and being able to kick off a small script that either turned it into a nice letter PDF or CV pdf or updated the markdown on my website.\n\nIt also lets me maintain [separation of concerns](https://en.wikipedia.org/wiki/Separation_of_concerns) on personal documents by keeping content in org files and style in jinja2 templates.\n\n## Install\n\nOrJi can be installed with pip:\n\n```bash\npip install orji\n```\n\nAs a command line app, it is typically best installed via\n[pipx](https://pipx.pypa.io/stable/).\n\n```bash\npipx install orji\n```\n\n### Using OrJi\n\n- [Demonstration of all template features](https://hitchdev.com/orji/using/all-template-features)\n- [Deliberately trigger a template failure](https://hitchdev.com/orji/using/deliberate-failure)\n- [Insert file](https://hitchdev.com/orji/using/insert)\n- [Example of Generated LaTeX A4 CV](https://hitchdev.com/orji/using/latex-cv)\n- [Example of Generated LaTeX A4 Letter](https://hitchdev.com/orji/using/latex-letter)\n- [Convert chunks of orgmode text into markdown](https://hitchdev.com/orji/using/markdown)\n- [Use a python module with template variables and methods](https://hitchdev.com/orji/using/module)\n- [Templated with more than one note](https://hitchdev.com/orji/using/orji-run-multiple)\n- [Run](https://hitchdev.com/orji/using/orji-run)\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Org mode to jinja2 templating.",
"version": "4.5.0",
"project_urls": {
"changelog": "https://hitchdev.com/orji/changelog",
"documentation": "https://hitchdev.com/orji/using",
"homepage": "https://hitchdev.com/orji",
"repository": "https://github.com/crdoconnor/orji"
},
"split_keywords": [
"orgmode",
" markdown",
" latex",
" jinja2"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "618a314d48e7a073e04e1668c985ea2a0525dc8058971f9556481029e50384ce",
"md5": "174bcaf67ec39fd0cfc03cba52be09b3",
"sha256": "42f41b47fb0fa1930099c4611bc0f9e3cd4a8c979a6ff8f9c30df63f0960f1e9"
},
"downloads": -1,
"filename": "orji-4.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "174bcaf67ec39fd0cfc03cba52be09b3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7.0",
"size": 14704,
"upload_time": "2024-06-12T10:37:41",
"upload_time_iso_8601": "2024-06-12T10:37:41.692436Z",
"url": "https://files.pythonhosted.org/packages/61/8a/314d48e7a073e04e1668c985ea2a0525dc8058971f9556481029e50384ce/orji-4.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1e3506a236af73534a08937bcaa4fe994ff1de7d23550f7f831b96c1c89b775d",
"md5": "dd93c708e5316b4152a67d976959de57",
"sha256": "e6a2ec8e7c95acdf9fd567a338050ade5fcafc15eb92fc703c1e5d0ab5549ca3"
},
"downloads": -1,
"filename": "orji-4.5.0.tar.gz",
"has_sig": false,
"md5_digest": "dd93c708e5316b4152a67d976959de57",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7.0",
"size": 29182,
"upload_time": "2024-06-12T10:37:45",
"upload_time_iso_8601": "2024-06-12T10:37:45.644681Z",
"url": "https://files.pythonhosted.org/packages/1e/35/06a236af73534a08937bcaa4fe994ff1de7d23550f7f831b96c1c89b775d/orji-4.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-12 10:37:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "crdoconnor",
"github_project": "orji",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "orji"
}