pygments-ddot
Pygments lexer for ddot.it — a minimal text format for typed knowledge graphs.
Install
pip install pygments-ddot
The package registers itself via the pygments.lexers entry point, so
both pygmentize and any tool that uses pygments.lexers.get_lexer_by_name
will pick up ddot automatically.
Use
From the command line
pygmentize -l ddot -f html sample.ddot > sample.html
pygmentize -l ddot -f terminal sample.ddot
From Python
from pygments import highlight
from pygments.lexers import get_lexer_by_name
from pygments.formatters import HtmlFormatter
code = open("sample.ddot").read()
lexer = get_lexer_by_name("ddot")
print(highlight(code, lexer, HtmlFormatter()))
Aliases registered: ddot.it, ddot, ddotit. File pattern: *.ddot.
Token mapping
The lexer emits Pygments tokens chosen to map cleanly onto the canonical
token vocabulary at
ddot.it/test-data/tokens.md.
| Pygments token | Canonical name |
|---|---|
Name.Class |
subject |
Name.Function |
relation |
Literal.String.Symbol |
object |
Operator |
operator |
Keyword.Pseudo |
command |
Comment.Preproc |
meta-delim |
Comment.Special.Operator |
meta-operator |
Comment.Special.Relation |
meta-relation |
Comment.Special.Object |
meta-object |
Comment.Multiline |
meta-text |
Comment.Single |
disabled |
Conformance
The lexer is verified against the cross-implementation golden corpus —
identical to the TextMate, Shiki, and Rouge ports. See
tools/conformance-pygments.py.
License
MIT
Metadata
Release files for pygments-ddot 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pygments_ddot-0.1.1.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pygments_ddot-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / pygments_ddot-0.1.1.tar.gz
| Download URL | pygments_ddot-0.1.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7322dfb76ad488e8e5288f97e9c32e6de792fcdf55b1478f540e585646487d54
|
|
BLAKE2b-256 checksum How to use checksums |
faf6319752f2cf4003e531e3178cb2334446601a8f61b92ab130ca4cce12312e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 9, 2026.
Transparency logRelease files / pygments_ddot-0.1.1-py3-none-any.whl
| Download URL | pygments_ddot-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fd18f48101b55d54ea0c76bdbc4d179f8f61ee93efc33a6c79077346d473bcd
|
|
BLAKE2b-256 checksum How to use checksums |
d0b55ac1a5f27062ae9fb7c2a9f1e7310c31f9862b75d088140076fa44e2c500
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 9, 2026.
Transparency log