Name | rst-to-myst JSON |
Version |
0.3.4
JSON |
| download |
home_page | None |
Summary | Convert RST to MyST-Markdown. |
upload_time | 2023-01-16 23:29:28 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | None |
keywords |
restructuredtext
markdown
myst
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# rst-to-myst
[![Build Status][ci-badge]][ci-link]
[![codecov.io][cov-badge]][cov-link]
[![PyPI version][pypi-badge]][pypi-link]
Convert [ReStructuredText](https://docutils.sourceforge.io/) to [MyST Markdown](https://myst-parser.readthedocs.io/),
and also explore available roles/directives.
See [tests/fixtures/render.txt](tests/fixtures/render.txt) for examples of inputs -> outputs.
## Install
```bash
pip install rst-to-myst
```
or with sphinx:
```bash
pip install rst-to-myst[sphinx]
```
To then run a basic conversion of a whole project:
```console
$ rst2myst convert docs/**/*.rst
```
For greater control, you can pass configuration with CLI options, or via a YAML configuration file:
```console
$ rst2myst convert --config config.yaml docs/**/*.rst
```
`config.yaml`:
```yaml
language: en
sphinx: true
extensions:
- sphinx_panels
default_domain: py
consecutive_numbering: true
colon_fences: true
dollar_math: true
conversions:
sphinx_panels.dropdpwn.DropdownDirective: parse_all
```
See the documentation for more information: <https://rst-to-myst.readthedocs.io/>
## Development
This package utilises [flit](https://flit.readthedocs.io) as the build engine, and [tox](https://tox.readthedocs.io) for test automation.
To install these development dependencies:
```bash
pip install flit tox
```
To run the tests:
```bash
tox
```
To run the code formatting and style checks:
```bash
pip install pre-commit
pre-commit run --all
```
## Publish to PyPi
Either use flit directly:
```bash
flit publish
```
or trigger the GitHub Action job, by creating a release with a tag equal to the version, e.g. `v0.0.1`.
Note, this requires generating an API key on PyPi and adding it to the repository `Settings/Secrets`, under the name `PYPI_KEY`.
## TODO
The conversion covers almost all syntaxes (see <https://docutils.sourceforge.io/docs/user/rst/quickref.htm>) except:
- line blocks
- option lists
Also custom functions for directive parsing would be desirable.
[ci-badge]: https://github.com/executablebooks/rst-to-myst/workflows/CI/badge.svg?branch=main
[ci-link]: https://github.com/executablebooks/rst-to-myst/actions?query=workflow%3ACI+branch%3Amain+event%3Apush
[cov-badge]: https://codecov.io/gh/executablebooks/rst-to-myst/branch/main/graph/badge.svg
[cov-link]: https://codecov.io/gh/executablebooks/rst-to-myst
[pypi-badge]: https://img.shields.io/pypi/v/rst-to-myst.svg
[pypi-link]: https://pypi.org/project/rst-to-myst
Raw data
{
"_id": null,
"home_page": null,
"name": "rst-to-myst",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "restructuredtext,markdown,myst",
"author": null,
"author_email": "Chris Sewell <chrisj_sewell@hotmail.com>",
"download_url": "https://files.pythonhosted.org/packages/e6/bf/d53ee34814a6790b847f3951f94468b10e453d0699f4f3691faa24b46591/rst-to-myst-0.3.4.tar.gz",
"platform": null,
"description": "# rst-to-myst\n\n[![Build Status][ci-badge]][ci-link]\n[![codecov.io][cov-badge]][cov-link]\n[![PyPI version][pypi-badge]][pypi-link]\n\nConvert [ReStructuredText](https://docutils.sourceforge.io/) to [MyST Markdown](https://myst-parser.readthedocs.io/),\nand also explore available roles/directives.\n\nSee [tests/fixtures/render.txt](tests/fixtures/render.txt) for examples of inputs -> outputs.\n\n## Install\n\n```bash\npip install rst-to-myst\n```\n\nor with sphinx:\n\n```bash\npip install rst-to-myst[sphinx]\n```\n\nTo then run a basic conversion of a whole project:\n\n```console\n$ rst2myst convert docs/**/*.rst\n```\n\nFor greater control, you can pass configuration with CLI options, or via a YAML configuration file:\n\n```console\n$ rst2myst convert --config config.yaml docs/**/*.rst\n```\n\n`config.yaml`:\n\n```yaml\nlanguage: en\nsphinx: true\nextensions:\n- sphinx_panels\ndefault_domain: py\nconsecutive_numbering: true\ncolon_fences: true\ndollar_math: true\nconversions:\n sphinx_panels.dropdpwn.DropdownDirective: parse_all\n```\n\nSee the documentation for more information: <https://rst-to-myst.readthedocs.io/>\n\n## Development\n\nThis package utilises [flit](https://flit.readthedocs.io) as the build engine, and [tox](https://tox.readthedocs.io) for test automation.\n\nTo install these development dependencies:\n\n```bash\npip install flit tox\n```\n\nTo run the tests:\n\n```bash\ntox\n```\n\nTo run the code formatting and style checks:\n\n```bash\npip install pre-commit\npre-commit run --all\n```\n\n## Publish to PyPi\n\nEither use flit directly:\n\n```bash\nflit publish\n```\n\nor trigger the GitHub Action job, by creating a release with a tag equal to the version, e.g. `v0.0.1`.\n\nNote, this requires generating an API key on PyPi and adding it to the repository `Settings/Secrets`, under the name `PYPI_KEY`.\n\n## TODO\n\nThe conversion covers almost all syntaxes (see <https://docutils.sourceforge.io/docs/user/rst/quickref.htm>) except:\n\n- line blocks\n- option lists\n\nAlso custom functions for directive parsing would be desirable.\n\n[ci-badge]: https://github.com/executablebooks/rst-to-myst/workflows/CI/badge.svg?branch=main\n[ci-link]: https://github.com/executablebooks/rst-to-myst/actions?query=workflow%3ACI+branch%3Amain+event%3Apush\n[cov-badge]: https://codecov.io/gh/executablebooks/rst-to-myst/branch/main/graph/badge.svg\n[cov-link]: https://codecov.io/gh/executablebooks/rst-to-myst\n[pypi-badge]: https://img.shields.io/pypi/v/rst-to-myst.svg\n[pypi-link]: https://pypi.org/project/rst-to-myst\n",
"bugtrack_url": null,
"license": null,
"summary": "Convert RST to MyST-Markdown.",
"version": "0.3.4",
"split_keywords": [
"restructuredtext",
"markdown",
"myst"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7ba41c7eb2a910ae902f45cc7fdb1d214add12279a5edef3b070c98b1073c909",
"md5": "83d9c1834a67bbd35a2480d86e8a8fd4",
"sha256": "af52555f1a4d4946b75f100908a897784a585445440edaa0a77d9d6e3c3c992b"
},
"downloads": -1,
"filename": "rst_to_myst-0.3.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "83d9c1834a67bbd35a2480d86e8a8fd4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 36710,
"upload_time": "2023-01-16T23:29:27",
"upload_time_iso_8601": "2023-01-16T23:29:27.191911Z",
"url": "https://files.pythonhosted.org/packages/7b/a4/1c7eb2a910ae902f45cc7fdb1d214add12279a5edef3b070c98b1073c909/rst_to_myst-0.3.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e6bfd53ee34814a6790b847f3951f94468b10e453d0699f4f3691faa24b46591",
"md5": "9784449c8e2d131e7b336438a7361fb9",
"sha256": "4d944e1afcd12922a7b8e418558cafc1b5888fba0a2819268c0fd60c2df2f7ac"
},
"downloads": -1,
"filename": "rst-to-myst-0.3.4.tar.gz",
"has_sig": false,
"md5_digest": "9784449c8e2d131e7b336438a7361fb9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 37850,
"upload_time": "2023-01-16T23:29:28",
"upload_time_iso_8601": "2023-01-16T23:29:28.605791Z",
"url": "https://files.pythonhosted.org/packages/e6/bf/d53ee34814a6790b847f3951f94468b10e453d0699f4f3691faa24b46591/rst-to-myst-0.3.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-16 23:29:28",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "rst-to-myst"
}