Name | galaxie-docs JSON |
Version |
0.5.3
JSON |
| download |
home_page | |
Summary | Galaxie Docs is a low-tech survival ToolKit for documents conversion |
upload_time | 2024-03-18 11:40:51 |
maintainer | |
docs_url | None |
author | Tuuux |
requires_python | >=3.0 |
license | |
keywords |
galaxie
docs
yaml
markdown
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![pipeline status](https://gitlab.com/Tuuux/galaxie-docs/badges/master/pipeline.svg)](https://gitlab.com/Tuuux/galaxie-docs/-/commits/master) [![coverage report](https://gitlab.com/Tuuux/galaxie-docs/badges/master/coverage.svg)](https://gitlab.com/Tuuux/galaxie-docs/-/commits/master) [![Documentation Status](https://readthedocs.org/projects/galaxie-docs/badge/?version=latest)](https://galaxie-docs.readthedocs.io/en/latest/?badge=latest)
```text
________ __ __
/ _____/_____ | | _____ ___ __|__| ____
/ \ ___\__ \ | | \__ \ \ \/ / |/ __ \
\ \_\ \/ __ \| |__/ __ \_> <| \ ___/_
\________(______/____(______/__/\__\__|\_____/
```
# Galaxie Docs, The ToolKit
## The Project
**Galaxie Docs** is a free software Tool Kit for convert document.
The lib is written with **Python** and deal with:
* Markdown to Html
* Yaml to Markdown
It is usable from CLI and Python code.
## Installation
* **Pre Version**: ```pip install galaxie-docs```
* **Dev Version**: ```pip install -i https://test.pypi.org/simple/ galaxie-docs```
## Documentation:
* **Readthedocs link**: [http://galaxie-docs.readthedocs.io](http://galaxie-docs.readthedocs.io)
* **Packages documentation**: [https://galaxie-docs.readthedocs.io/en/latest/glxdocs.html](https://galaxie-docs.readthedocs.io/en/latest/glxdocs.html)
## The Mission
Galaxie use Markdown format as text format, then the lib have targeted to convert documents around MarkDown.
Contribute
----------
You welcome !!!
- Issue Tracker: [https://gitlab.com/Tuuux/galaxie-docs/issues](https://gitlab.com/Tuuux/galaxie-docs/issues)
- Source Code: [https://gitlab.com/Tuuux/galaxie-docs](https://gitlab.com/Tuuux/galaxie-docs)
Screenshots
-----------
**The source**
```markdown
[![Documentation Status](https://readthedocs.org/projects/galaxie-curses/badge/?version=latest)](http://galaxie-curses.readthedocs.io/?badge=latest)
[![pipeline status](https://gitlab.com/Tuuux/galaxie-curses/badges/master/pipeline.svg)](https://gitlab.com/Tuuux/galaxie-curses/-/commits/master)
[![coverage report](https://gitlab.com/Tuuux/galaxie-curses/badges/master/coverage.svg)](https://gitlab.com/Tuuux/galaxie-curses/-/commits/master)
[![codecov](https://codecov.io/gl/Tuuux/galaxie-curses/branch/master/graph/badge.svg)](https://codecov.io/gl/Tuuux/galaxie-curses)
Galaxie Curses, The ToolKit
===========================
<div style="text-align:center"><img src ="https://gitlab.com/Tuuux/galaxie-curses/raw/master/docs/source/images/logo_galaxie.png" /></div>
Once upon a time, this project was hosted on a ancient platform called GitHub. Then came the Buyer.
The Buyer bought GitHub, willing to rule over its community.
I was not to sell, so here is the new home of "https://github.com/Tuuux/galaxie-curses".
The Project
-----------
**Galaxie Curses** alias **Le Truc Blue** (The Blue Thing) is a free software Tool Kit for the **NCurses** API.
It can be consider as a text based implementation of the famous **GTK+** Library (Or Ultra Inspired...).
Where ``implementation`` mean: ``Devellop a project from a documentation specs``.
Originally the project have start in 2016 when the author Jérôme.O have start to learn **Python** at home.
Then the lib is write in **Python**
```
**Pretty good**
<div style="text-align:center"><img src ="https://gitlab.com/Tuuux/galaxie-docs/-/raw/9005032bfb4f6418465721ab25726bdcdf95a96e/docs/source/_images/result_01.png" /></div>
**Syntax coloration with css**
<div style="text-align:center"><img src ="https://gitlab.com/Tuuux/galaxie-docs/-/raw/9005032bfb4f6418465721ab25726bdcdf95a96e/docs/source/_images/result_02.png" /></div>
## Usage
### CLI
For convert a YAML file name ``./file.yml`` in to a Markdown file name ``./file.md``
```bash
glx-yaml2md ./file.yml ./file.md
```
For convert a Markdown file name ``./file.md`` in to a HTML file name ``./file.html``
```bash
glx-html2md ./file.md ./file.html
```
### For Sphinx inside conf.py file
adapt cwd as you needed
```python
import os
import sys
from glxdocs.yaml2md import Yaml2Md
yaml2md = Yaml2Md()
cwd = os.path.dirname(os.path.abspath(__file__))
roles_src_path = os.path.join(cwd, 'data', 'roles')
roles_dst_reference = os.path.join(cwd, 'data', 'reference', 'role')
ignore_role_list = [
'galaxie_clans.dns',
'galaxie_clans.clan_host',
'galaxie_clans.system_base',
'galaxie_clans.system_users'
]
for element in os.listdir(roles_src_path):
default_directory = os.path.abspath(os.path.join(roles_src_path, element, 'defaults'))
if not os.path.isdir(default_directory) or element in ignore_role_list:
continue
for path, sub_dirs, files in os.walk(default_directory):
for filename in files:
if filename.startswith("."):
continue
yaml2md.file_input.path = os.path.join(path, filename)
yaml2md.file_output.path = roles_dst_reference + "_" + element + ".md"
yaml2md.convert_file()
sys.stdout.write("Converted {0}".format(roles_dst_reference + "_" + element + "\n"))
sys.stdout.flush()
```
**Help**
```bash
usage: glx-md2html [-h] [--lang LANG] [--charset CHARSET] source destination
Galaxie Docs - Markdown to HTML
positional arguments:
source source file path
destination destination file path
optional arguments:
-h, --help show this help message and exit
--lang LANG HTTP_ACCEPT_LANGUAGE
--charset CHARSET character sets
Developed under GPLv3+ license
```
```bash
usage: glx-yaml2md [-h] [--strip-regex strip_regex] [source_file] [target_file]
Galaxie Docs - YAML to Markdown
positional arguments:
source_file A pathname of an YAML input file. If no file operands are specified, the standard input shall
be used. If a file is '-', the utility read from the standard input at that point in the
sequence.
target_file A pathname of an target file. If no file operands are specified, the standard output shall be
used. If a file is '-', the utility write to the standard output at that point in the
sequence.
optional arguments:
-h, --help show this help message and exit
--strip-regex strip_regex
Regex which will remove everything it matches. Can be used e.g. to remove fold markers from
headings. Example to strip out [[[,]]] fold markers use: '\s*(:?\[{3}|\]{3})\d?$'. Check the
README for more details.
Developed under GPLv3+ license
```
## Features
* ``glx-md2html`` command line interface
* ``glx-yaml2md`` command line interface
* CSS is included inside html file
* Code coloration
* EveryMarkDown extension is enabled
* Defensive code style
* Singleton Thread safe
* Can be used as a class
## Roadmap
Be the documents wrapper for **Galaxie-Curses** lib .
* create Html to Markdown converter
* create CVS to Markdown converter
## Thanks
To everyone i have interest to it project, copy it, use it, diffuse it , and have fun ...
## License
GNU General Public License v3 or later (GPLv3+)
https://gitlab.com/Tuuux/galaxie-docs/blob/master/LICENSE
Raw data
{
"_id": null,
"home_page": "",
"name": "galaxie-docs",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.0",
"maintainer_email": "",
"keywords": "Galaxie,docs,yaml,markdown",
"author": "Tuuux",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/ca/47/879294e614de152cb7b601ba19465c828f7bb623e62e31802b5eb8e6e4a4/galaxie-docs-0.5.3.tar.gz",
"platform": null,
"description": "[![pipeline status](https://gitlab.com/Tuuux/galaxie-docs/badges/master/pipeline.svg)](https://gitlab.com/Tuuux/galaxie-docs/-/commits/master) [![coverage report](https://gitlab.com/Tuuux/galaxie-docs/badges/master/coverage.svg)](https://gitlab.com/Tuuux/galaxie-docs/-/commits/master) [![Documentation Status](https://readthedocs.org/projects/galaxie-docs/badge/?version=latest)](https://galaxie-docs.readthedocs.io/en/latest/?badge=latest)\n```text\n ________ __ __ \n / _____/_____ | | _____ ___ __|__| ____ \n / \\ ___\\__ \\ | | \\__ \\ \\ \\/ / |/ __ \\ \n \\ \\_\\ \\/ __ \\| |__/ __ \\_> <| \\ ___/_\n \\________(______/____(______/__/\\__\\__|\\_____/\n```\n\n# Galaxie Docs, The ToolKit\n\n## The Project\n\n**Galaxie Docs** is a free software Tool Kit for convert document.\n\nThe lib is written with **Python** and deal with:\n* Markdown to Html\n* Yaml to Markdown\n\nIt is usable from CLI and Python code.\n\n## Installation\n* **Pre Version**: ```pip install galaxie-docs``` \n* **Dev Version**: ```pip install -i https://test.pypi.org/simple/ galaxie-docs```\n\n## Documentation:\n* **Readthedocs link**: [http://galaxie-docs.readthedocs.io](http://galaxie-docs.readthedocs.io) \n* **Packages documentation**: [https://galaxie-docs.readthedocs.io/en/latest/glxdocs.html](https://galaxie-docs.readthedocs.io/en/latest/glxdocs.html)\n\n## The Mission\nGalaxie use Markdown format as text format, then the lib have targeted to convert documents around MarkDown.\n\nContribute\n----------\nYou welcome !!!\n\n- Issue Tracker: [https://gitlab.com/Tuuux/galaxie-docs/issues](https://gitlab.com/Tuuux/galaxie-docs/issues)\n- Source Code: [https://gitlab.com/Tuuux/galaxie-docs](https://gitlab.com/Tuuux/galaxie-docs)\n\nScreenshots\n-----------\n\n**The source**\n```markdown\n[![Documentation Status](https://readthedocs.org/projects/galaxie-curses/badge/?version=latest)](http://galaxie-curses.readthedocs.io/?badge=latest)\n[![pipeline status](https://gitlab.com/Tuuux/galaxie-curses/badges/master/pipeline.svg)](https://gitlab.com/Tuuux/galaxie-curses/-/commits/master)\n[![coverage report](https://gitlab.com/Tuuux/galaxie-curses/badges/master/coverage.svg)](https://gitlab.com/Tuuux/galaxie-curses/-/commits/master)\n[![codecov](https://codecov.io/gl/Tuuux/galaxie-curses/branch/master/graph/badge.svg)](https://codecov.io/gl/Tuuux/galaxie-curses)\n\nGalaxie Curses, The ToolKit\n===========================\n<div style=\"text-align:center\"><img src =\"https://gitlab.com/Tuuux/galaxie-curses/raw/master/docs/source/images/logo_galaxie.png\" /></div>\n\nOnce upon a time, this project was hosted on a ancient platform called GitHub. Then came the Buyer.\nThe Buyer bought GitHub, willing to rule over its community.\n\nI was not to sell, so here is the new home of \"https://github.com/Tuuux/galaxie-curses\".\n\nThe Project\n-----------\n**Galaxie Curses** alias **Le Truc Blue** (The Blue Thing) is a free software Tool Kit for the **NCurses** API.\nIt can be consider as a text based implementation of the famous **GTK+** Library (Or Ultra Inspired...).\n\nWhere ``implementation`` mean: ``Devellop a project from a documentation specs``.\n\nOriginally the project have start in 2016 when the author J\u00e9r\u00f4me.O have start to learn **Python** at home.\n\nThen the lib is write in **Python**\n\n```\n\n**Pretty good**\n<div style=\"text-align:center\"><img src =\"https://gitlab.com/Tuuux/galaxie-docs/-/raw/9005032bfb4f6418465721ab25726bdcdf95a96e/docs/source/_images/result_01.png\" /></div>\n\n**Syntax coloration with css**\n<div style=\"text-align:center\"><img src =\"https://gitlab.com/Tuuux/galaxie-docs/-/raw/9005032bfb4f6418465721ab25726bdcdf95a96e/docs/source/_images/result_02.png\" /></div>\n\n## Usage\n\n### CLI\nFor convert a YAML file name ``./file.yml`` in to a Markdown file name ``./file.md``\n```bash\nglx-yaml2md ./file.yml ./file.md\n```\n\nFor convert a Markdown file name ``./file.md`` in to a HTML file name ``./file.html``\n```bash\nglx-html2md ./file.md ./file.html\n```\n\n### For Sphinx inside conf.py file\nadapt cwd as you needed\n\n```python\nimport os\nimport sys\nfrom glxdocs.yaml2md import Yaml2Md\n\nyaml2md = Yaml2Md()\ncwd = os.path.dirname(os.path.abspath(__file__))\nroles_src_path = os.path.join(cwd, 'data', 'roles')\nroles_dst_reference = os.path.join(cwd, 'data', 'reference', 'role')\n\n\nignore_role_list = [\n 'galaxie_clans.dns',\n 'galaxie_clans.clan_host',\n 'galaxie_clans.system_base',\n 'galaxie_clans.system_users'\n]\n\nfor element in os.listdir(roles_src_path):\n default_directory = os.path.abspath(os.path.join(roles_src_path, element, 'defaults'))\n if not os.path.isdir(default_directory) or element in ignore_role_list:\n continue\n for path, sub_dirs, files in os.walk(default_directory):\n for filename in files:\n if filename.startswith(\".\"):\n continue\n\n yaml2md.file_input.path = os.path.join(path, filename)\n yaml2md.file_output.path = roles_dst_reference + \"_\" + element + \".md\"\n\n yaml2md.convert_file()\n\n sys.stdout.write(\"Converted {0}\".format(roles_dst_reference + \"_\" + element + \"\\n\"))\n sys.stdout.flush()\n```\n\n**Help**\n```bash\nusage: glx-md2html [-h] [--lang LANG] [--charset CHARSET] source destination\n\nGalaxie Docs - Markdown to HTML\n\npositional arguments:\n source source file path\n destination destination file path\n\noptional arguments:\n -h, --help show this help message and exit\n --lang LANG HTTP_ACCEPT_LANGUAGE\n --charset CHARSET character sets\n\nDeveloped under GPLv3+ license\n```\n\n```bash\nusage: glx-yaml2md [-h] [--strip-regex strip_regex] [source_file] [target_file]\n\nGalaxie Docs - YAML to Markdown\n\npositional arguments:\n source_file A pathname of an YAML input file. If no file operands are specified, the standard input shall\n be used. If a file is '-', the utility read from the standard input at that point in the\n sequence.\n target_file A pathname of an target file. If no file operands are specified, the standard output shall be\n used. If a file is '-', the utility write to the standard output at that point in the\n sequence.\n\noptional arguments:\n -h, --help show this help message and exit\n --strip-regex strip_regex\n Regex which will remove everything it matches. Can be used e.g. to remove fold markers from\n headings. Example to strip out [[[,]]] fold markers use: '\\s*(:?\\[{3}|\\]{3})\\d?$'. Check the\n README for more details.\n\nDeveloped under GPLv3+ license\n```\n\n## Features\n* ``glx-md2html`` command line interface\n* ``glx-yaml2md`` command line interface\n* CSS is included inside html file\n* Code coloration\n* EveryMarkDown extension is enabled\n* Defensive code style\n* Singleton Thread safe\n* Can be used as a class\n\n## Roadmap\nBe the documents wrapper for **Galaxie-Curses** lib .\n\n* create Html to Markdown converter\n* create CVS to Markdown converter\n\n## Thanks\nTo everyone i have interest to it project, copy it, use it, diffuse it , and have fun ...\n\n## License\nGNU General Public License v3 or later (GPLv3+)\nhttps://gitlab.com/Tuuux/galaxie-docs/blob/master/LICENSE\n",
"bugtrack_url": null,
"license": "",
"summary": "Galaxie Docs is a low-tech survival ToolKit for documents conversion",
"version": "0.5.3",
"project_urls": {
"Homepage": "https://gitlab.com/Tuuux/galaxie-docs",
"Issues": "https://gitlab.com/Tuuux/galaxie-docs/-/issues",
"Readthedocs": "http://galaxie-docs.readthedocs.io"
},
"split_keywords": [
"galaxie",
"docs",
"yaml",
"markdown"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ca47879294e614de152cb7b601ba19465c828f7bb623e62e31802b5eb8e6e4a4",
"md5": "570a5cf44b94e1581500a02ebc9ec03b",
"sha256": "3b9d799817cccb0a03d9c00a318690c388a1c02483efe7018394fb9e5c654a96"
},
"downloads": -1,
"filename": "galaxie-docs-0.5.3.tar.gz",
"has_sig": false,
"md5_digest": "570a5cf44b94e1581500a02ebc9ec03b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.0",
"size": 26063,
"upload_time": "2024-03-18T11:40:51",
"upload_time_iso_8601": "2024-03-18T11:40:51.904723Z",
"url": "https://files.pythonhosted.org/packages/ca/47/879294e614de152cb7b601ba19465c828f7bb623e62e31802b5eb8e6e4a4/galaxie-docs-0.5.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-18 11:40:51",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "Tuuux",
"gitlab_project": "galaxie-docs",
"lcname": "galaxie-docs"
}