Skip to main content

Pygments adapter for Yet Another Blog Generator.

Project description

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.

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

yabg_pygments_adapter-0.1.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

yabg_pygments_adapter-0.1.1-py2.py3-none-any.whl (5.3 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: yabg_pygments_adapter-0.1.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.5

File hashes

Hashes for yabg_pygments_adapter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ab59cb287a4841bac3cdfe150d3a19c0c418dc9cf5c3d2cb50999078dafb0b63
MD5 7a45a182213a55f175d06c1a29f9a548
BLAKE2b-256 6416466c6af9dda5b5b11e44e02ec75315d8ae3edadc44a2a291b420d42dccc9

See more details on using hashes here.

File details

Details for the file yabg_pygments_adapter-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for yabg_pygments_adapter-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d71da808253171c52fc13114b20c77e3184f71f13c2b90227c010bb3335a45ed
MD5 b08510cf021838dda602c1b586f7fb4d
BLAKE2b-256 6f31ba8fbcfb3b503a947d99183ab2ddc8e3c1a3db6535291e4749927b4ee9f0

See more details on using hashes here.

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