Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygments_ddot-0.1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

pygments_ddot-0.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file pygments_ddot-0.1.1.tar.gz.

File metadata

  • Download URL: pygments_ddot-0.1.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pygments_ddot-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7322dfb76ad488e8e5288f97e9c32e6de792fcdf55b1478f540e585646487d54
MD5 75b764d766d3f9de8cfa4bcec2d17ce1
BLAKE2b-256 faf6319752f2cf4003e531e3178cb2334446601a8f61b92ab130ca4cce12312e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygments_ddot-0.1.1.tar.gz:

Publisher: publish-pypi.yml on Calpano/ddot.it-syntax-tools

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

File details

Details for the file pygments_ddot-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pygments_ddot-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pygments_ddot-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4fd18f48101b55d54ea0c76bdbc4d179f8f61ee93efc33a6c79077346d473bcd
MD5 ed79217da91c7f4ed906eb45f576d1f9
BLAKE2b-256 d0b55ac1a5f27062ae9fb7c2a9f1e7310c31f9862b75d088140076fa44e2c500

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygments_ddot-0.1.1-py3-none-any.whl:

Publisher: publish-pypi.yml on Calpano/ddot.it-syntax-tools

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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

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