Skip to main content

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 pipx instead of pip3 to avoid having to set up a virtual environment.
  • If using Windows, do pip instead of pip3.

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- 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:

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

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

conwaymd-6.0.0.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

conwaymd-6.0.0-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file conwaymd-6.0.0.tar.gz.

File metadata

  • Download URL: conwaymd-6.0.0.tar.gz
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for conwaymd-6.0.0.tar.gz
Algorithm Hash digest
SHA256 d512096bdf5bb0fd22087729ccfed6cd4a8b98fe275e8f4f137e5f4836455307
MD5 33ebde56241892563af6ec0a86405a0c
BLAKE2b-256 88f872a3de3b00986aecc459807204beb74ceea312aadde812179dc71c38cd39

See more details on using hashes here.

Provenance

The following attestation bundles were made for conwaymd-6.0.0.tar.gz:

Publisher: publish.yml on conwaymd/conwaymd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conwaymd-6.0.0-py3-none-any.whl.

File metadata

  • Download URL: conwaymd-6.0.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

Hashes for conwaymd-6.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f3fb1544a387b51020852391c2bb05505594de1d1a28cd6c0b69aa320594926
MD5 da0bf4f71bdd569701d2a23b46fe7657
BLAKE2b-256 12b6ec433e3ad2738b3d576c8320817845af099457a1a78f584a280f60e0ae3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for conwaymd-6.0.0-py3-none-any.whl:

Publisher: publish.yml on conwaymd/conwaymd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page