Python-Markdown extension for gnurlies — Questache and Attaché inline AI collaboration syntax
Project description
gnurlies — Python-Markdown extension
A Python-Markdown extension that parses questache and attaché syntax — inline calls-to-action for human–AI document collaboration.
For background on the convention, see the gnurlies whitepaper.
Install
pip install gnurlies
Usage
import markdown
from gnurlies import GnurliesExtension
md = markdown.Markdown(extensions=[GnurliesExtension()])
result = md.convert('The {? glue, bridge, handshake ?} between layers.')
Or by name:
md = markdown.Markdown(extensions=['gnurlies'])
The extension adds two inline element types to the parse tree:
| Element | Attributes | Meaning |
|---|---|---|
<questache> |
hints — comma-separated hint string |
Ask for names or verbiage |
<attache> |
action, hints |
Request a concrete insertion |
Questache
The {? glue, bridge, handshake ?} between the canvas layer and the stroke model
is resolved at render time.
Produces <questache hints="glue,bridge,handshake">...</questache> in the element tree.
Attaché
See [here]({! insert: image of Garfield being lazy !}) for a vivid illustration.
Produces <attache action="insert" hints="image of Garfield being lazy">...</attache>.
Escaping
Prefix with a backslash to emit literal text:
\{? this will not be parsed ?}
\{! neither will this !}
Gnurlies inside fenced code blocks are never parsed.
Block suppression
<!-- gnurlies-off -->
{? ignored ?} and {! also ignored !}
<!-- gnurlies-on -->
Post-processing
The extension emits raw XML elements. To act on them — rendering suggestions, fulfilling attachés, stripping markers — register a Treeprocessor that walks the element tree and handles questache and attache tags.
Requirements
- Python 3.9+
- Markdown >= 3.0
License
MIT
Project details
Release history Release notifications | RSS feed
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 gnurlies-0.1.0.tar.gz.
File metadata
- Download URL: gnurlies-0.1.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbf32975565c936051e679cfea3f744d2a1f0c4d0be9c26777d372220cab1015
|
|
| MD5 |
0196de432bcbf0755c8d14653931f346
|
|
| BLAKE2b-256 |
8917ef289d017c2aee9ff932f9aae1387c92609c86b7524d55449607bb003b61
|
File details
Details for the file gnurlies-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gnurlies-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf0ca463cd39549cdd3af551ab1e21f38d452b5717286c96d3203f6cdd7ddcd3
|
|
| MD5 |
b2d92edb51db5c153a22534b6ae72cf8
|
|
| BLAKE2b-256 |
26a7baf640aa393270148a00bcf689e61d73fa9cb964487e5ec6dcab7438f715
|