conwaymd


Nameconwaymd JSON
Version 5.0.1 PyPI version JSON
download
home_pageNone
SummaryConway-Markdown (conwaymd, CMD)
upload_time2024-10-03 16:21:27
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords conway-markdown html5
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Conway-Markdown (conwaymd, CMD)

Conway-Markdown is:

- A replacement-driven markup language inspired by Markdown.
- A demonstration of the folly of throwing regex at a parsing problem.
- The result of someone joking that "the filenames would look like Windows executables from the 90s".
- Implemented in [Python 3.{whatever Debian stable is at}][python3].
- Licensed under "MIT No Attribution" (MIT-0), see [LICENSE].

For detailed documentation, see <<https://conwaymd.github.io/>>.

[python3]: https://packages.debian.org/stable/python3
[LICENSE]: LICENSE


## Installation

Conway-Markdown is [published to PyPI as `conwaymd`][pypi]:

```bash
$ pip3 install conwaymd
```

On Windows, use `pip` instead of `pip3`.

[pypi]: https://pypi.org/project/conwaymd/


## Usage (command line)

```bash
$ cmd [-h] [-v] [-a] [-x] [file.cmd ...]

Convert Conway-Markdown (CMD) to HTML.

positional arguments:
  file.cmd       name of CMD file to be converted (can be abbreviated as
                 `file` or `file.` for increased productivity)

options:
  -h, --help     show this help message and exit
  -v, --version  show program's version number and exit
  -a, --all      convert all CMD files under the working directory
  -x, --verbose  run in verbose mode (prints every replacement applied)
```

On Windows:
- Use the aliases `cmd-` or `conwaymd` instead of `cmd` to avoid summoning Command Prompt.
- **Beware not to run any `.cmd` files by accident; they might break your computer. God save!**


## Usage (scripting example)

Code:

```python
from conwaymd.core import cmd_to_html

cmd_content = '''
# Test
==
- This is a *near*-minimal test.
- Here be [__dragons__].
==
[__dragons__]: https://example.com/
'''

html_content = cmd_to_html(cmd_content, cmd_file_name='scripting-test.py')

print(html_content)
```

Output:

```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Title</title>
</head>
<body>
<h1>Test</h1>
<ul>
<li>
This is a <em>near</em>-minimal test.
</li>
<li>
Here be <a href="https://example.com/"><b>dragons</b></a>.
</li>
</ul>
</body>
</html>
```


## Features

- [Specify element attributes] (e.g. `id` and `class`)
- [Write arbitrary text outside code]
- [Use `<b>`, `<i>`, and `<cite>` elements], not just `<strong>` and `<em>`
- [Use `<div>` elements] without falling back to HTML
- [Define your own syntax] as you go

[Specify element attributes]:
  https://conwaymd.github.io/#cmd-attribute-specifications
[Write arbitrary text outside code]:
  https://conwaymd.github.io/#literals
[Use `<b>`, `<i>`, and `<cite>` elements]:
  https://conwaymd.github.io/#inline-semantics
[Use `<div>` elements]:
  https://conwaymd.github.io/#divisions
[Define your own syntax]:
  https://conwaymd.github.io/#replacement-rule-syntax


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "conwaymd",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "conway-markdown, html5",
    "author": null,
    "author_email": "Conway <pypi.sheep257@passmail.net>",
    "download_url": "https://files.pythonhosted.org/packages/0a/c1/29a53bfd0ff21b34e0d0ada51ac79909683edf58f91db8da4cf5c1304cd3/conwaymd-5.0.1.tar.gz",
    "platform": null,
    "description": "# Conway-Markdown (conwaymd, CMD)\n\nConway-Markdown is:\n\n- A replacement-driven markup language inspired by Markdown.\n- A demonstration of the folly of throwing regex at a parsing problem.\n- The result of someone joking that \"the filenames would look like Windows executables from the 90s\".\n- Implemented in [Python 3.{whatever Debian stable is at}][python3].\n- Licensed under \"MIT No Attribution\" (MIT-0), see [LICENSE].\n\nFor detailed documentation, see <<https://conwaymd.github.io/>>.\n\n[python3]: https://packages.debian.org/stable/python3\n[LICENSE]: LICENSE\n\n\n## Installation\n\nConway-Markdown is [published to PyPI as `conwaymd`][pypi]:\n\n```bash\n$ pip3 install conwaymd\n```\n\nOn Windows, use `pip` instead of `pip3`.\n\n[pypi]: https://pypi.org/project/conwaymd/\n\n\n## Usage (command line)\n\n```bash\n$ cmd [-h] [-v] [-a] [-x] [file.cmd ...]\n\nConvert Conway-Markdown (CMD) to HTML.\n\npositional arguments:\n  file.cmd       name of CMD file to be converted (can be abbreviated as\n                 `file` or `file.` for increased productivity)\n\noptions:\n  -h, --help     show this help message and exit\n  -v, --version  show program's version number and exit\n  -a, --all      convert all CMD files under the working directory\n  -x, --verbose  run in verbose mode (prints every replacement applied)\n```\n\nOn Windows:\n- Use the aliases `cmd-` or `conwaymd` instead of `cmd` to avoid summoning Command Prompt.\n- **Beware not to run any `.cmd` files by accident; they might break your computer. God save!**\n\n\n## Usage (scripting example)\n\nCode:\n\n```python\nfrom conwaymd.core import cmd_to_html\n\ncmd_content = '''\n# Test\n==\n- This is a *near*-minimal test.\n- Here be [__dragons__].\n==\n[__dragons__]: https://example.com/\n'''\n\nhtml_content = cmd_to_html(cmd_content, cmd_file_name='scripting-test.py')\n\nprint(html_content)\n```\n\nOutput:\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Title</title>\n</head>\n<body>\n<h1>Test</h1>\n<ul>\n<li>\nThis is a <em>near</em>-minimal test.\n</li>\n<li>\nHere be <a href=\"https://example.com/\"><b>dragons</b></a>.\n</li>\n</ul>\n</body>\n</html>\n```\n\n\n## Features\n\n- [Specify element attributes] (e.g. `id` and `class`)\n- [Write arbitrary text outside code]\n- [Use `<b>`, `<i>`, and `<cite>` elements], not just `<strong>` and `<em>`\n- [Use `<div>` elements] without falling back to HTML\n- [Define your own syntax] as you go\n\n[Specify element attributes]:\n  https://conwaymd.github.io/#cmd-attribute-specifications\n[Write arbitrary text outside code]:\n  https://conwaymd.github.io/#literals\n[Use `<b>`, `<i>`, and `<cite>` elements]:\n  https://conwaymd.github.io/#inline-semantics\n[Use `<div>` elements]:\n  https://conwaymd.github.io/#divisions\n[Define your own syntax]:\n  https://conwaymd.github.io/#replacement-rule-syntax\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Conway-Markdown (conwaymd, CMD)",
    "version": "5.0.1",
    "project_urls": {
        "changelog": "https://github.com/conwaymd/conwaymd/blob/master/CHANGELOG.md",
        "homepage": "https://conwaymd.github.io/",
        "issues": "https://github.com/conwaymd/conwaymd/issues",
        "repository": "https://github.com/conwaymd/conwaymd"
    },
    "split_keywords": [
        "conway-markdown",
        " html5"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "849044d0e7c1fbfd3b2242ada3d90108c832758ff3c831d55b1640d76653f61b",
                "md5": "ae96bd15e0dc474a7709bf73befb802f",
                "sha256": "55211581d122532f7bcfdbe8e8531caea691c0781a4b9846a1f18b462c80a01d"
            },
            "downloads": -1,
            "filename": "conwaymd-5.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ae96bd15e0dc474a7709bf73befb802f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 31652,
            "upload_time": "2024-10-03T16:21:25",
            "upload_time_iso_8601": "2024-10-03T16:21:25.665315Z",
            "url": "https://files.pythonhosted.org/packages/84/90/44d0e7c1fbfd3b2242ada3d90108c832758ff3c831d55b1640d76653f61b/conwaymd-5.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ac129a53bfd0ff21b34e0d0ada51ac79909683edf58f91db8da4cf5c1304cd3",
                "md5": "58f31346f344be1e6ebd862f285153c2",
                "sha256": "dd065ff1e5ab6a7cd8e6623cc0cd07747f4a44804b53e6450c7fd11e4c878856"
            },
            "downloads": -1,
            "filename": "conwaymd-5.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "58f31346f344be1e6ebd862f285153c2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 28041,
            "upload_time": "2024-10-03T16:21:27",
            "upload_time_iso_8601": "2024-10-03T16:21:27.377659Z",
            "url": "https://files.pythonhosted.org/packages/0a/c1/29a53bfd0ff21b34e0d0ada51ac79909683edf58f91db8da4cf5c1304cd3/conwaymd-5.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-03 16:21:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "conwaymd",
    "github_project": "conwaymd",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "conwaymd"
}
        
Elapsed time: 0.43505s