Skip to main content

yabg_pygments_adapter

This simple app wraps Pygments and pygments_better_html and provides a JSON stdin/stdout interface for them.

This is used by YetAntotherBlogGenerator (YABG) to generate code listings.

License: 3-clause BSD.

Usage

Pipe a JSON list of objects into stdin, receive a JSON list of objects on stdout. The objects look like this:

class Request(typing.TypedDict):
    guid: str
    path: str | None
    language: str | None
    source: str


class Response(typing.TypedDict):
    guid: str
    path: str | None
    success: bool
    html: str

The guid is used to identify requests and match them up with responses. If language is not provided, then path will be used to guess it, and if neither is present, Pygments will guess based on the source code.

Metadata

Release files for yabg_pygments_adapter 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yabg_pygments_adapter 0.1.1
File Size Uploaded
yabg_pygments_adapter-0.1.1.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yabg_pygments_adapter 0.1.1
File Interpreter ABI Platform
yabg_pygments_adapter-0.1.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 10.6 kB

Release files / yabg_pygments_adapter-0.1.1.tar.gz

Download URL yabg_pygments_adapter-0.1.1.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ab59cb287a4841bac3cdfe150d3a19c0c418dc9cf5c3d2cb50999078dafb0b63
BLAKE2b-256 checksum
How to use checksums
6416466c6af9dda5b5b11e44e02ec75315d8ae3edadc44a2a291b420d42dccc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Release files / yabg_pygments_adapter-0.1.1-py2.py3-none-any.whl

Download URL yabg_pygments_adapter-0.1.1-py2.py3-none-any.whl
Size 5.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d71da808253171c52fc13114b20c77e3184f71f13c2b90227c010bb3335a45ed
BLAKE2b-256 checksum
How to use checksums
6f31ba8fbcfb3b503a947d99183ab2ddc8e3c1a3db6535291e4749927b4ee9f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page