Conway-Markdown (conwaymd, CMD)
Project description
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}.
- Licensed under "MIT No Attribution" (MIT-0), see LICENSE.
For detailed documentation, see <https://conwaymd.github.io/>.
Installation
Conway-Markdown is published to PyPI as conwaymd:
$ pip3 install conwaymd
- If simply using as a command line tool, do
pipxinstead ofpip3to avoid having to set up a virtual environment. - If using Windows, do
pipinstead ofpip3.
Usage (command line)
$ 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-orconwaymdinstead ofcmdto avoid summoning Command Prompt. - Beware not to run any
.cmdfiles by accident; they might break your computer. God save!
Usage (scripting example)
Code:
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:
<!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.
idandclass) - 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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file conwaymd-5.1.0.tar.gz.
File metadata
- Download URL: conwaymd-5.1.0.tar.gz
- Upload date:
- Size: 30.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
655648b10f7315a5ed8f24aa2ba23d47efcb80123dd8a99a56ced416e94d4c97
|
|
| MD5 |
e5d8e92e0781a53b91e67f6a7c752c11
|
|
| BLAKE2b-256 |
26846f6de3fc117c4be162f6f06246611d3ca5ded1c628ce60a76e2e58a6e0dc
|
Provenance
The following attestation bundles were made for conwaymd-5.1.0.tar.gz:
Publisher:
publish.yml on conwaymd/conwaymd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
conwaymd-5.1.0.tar.gz -
Subject digest:
655648b10f7315a5ed8f24aa2ba23d47efcb80123dd8a99a56ced416e94d4c97 - Sigstore transparency entry: 794301723
- Sigstore integration time:
-
Permalink:
conwaymd/conwaymd@3462c3871df88cc38b1225b4b76a2d2368670896 -
Branch / Tag:
refs/tags/v5.1.0 - Owner: https://github.com/conwaymd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3462c3871df88cc38b1225b4b76a2d2368670896 -
Trigger Event:
push
-
Statement type:
File details
Details for the file conwaymd-5.1.0-py3-none-any.whl.
File metadata
- Download URL: conwaymd-5.1.0-py3-none-any.whl
- Upload date:
- Size: 34.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9808472d3a259a96bd1f11edb64c30241392bb4693a1a6e47c188921638be49e
|
|
| MD5 |
5c4e3642c5649616580a717fea9fa3ce
|
|
| BLAKE2b-256 |
11109a03793dcb9fb710c7069708e3c75ae62e067b60f0df020b7ea2df84c89a
|
Provenance
The following attestation bundles were made for conwaymd-5.1.0-py3-none-any.whl:
Publisher:
publish.yml on conwaymd/conwaymd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
conwaymd-5.1.0-py3-none-any.whl -
Subject digest:
9808472d3a259a96bd1f11edb64c30241392bb4693a1a6e47c188921638be49e - Sigstore transparency entry: 794301778
- Sigstore integration time:
-
Permalink:
conwaymd/conwaymd@3462c3871df88cc38b1225b4b76a2d2368670896 -
Branch / Tag:
refs/tags/v5.1.0 - Owner: https://github.com/conwaymd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3462c3871df88cc38b1225b4b76a2d2368670896 -
Trigger Event:
push
-
Statement type: