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.0.tar.gz (5.2 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.0-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.0.tar.gz.

File metadata

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

File hashes

Hashes for yabg_pygments_adapter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b180d5209cc8fa3867c68169d9e644cdd155c35be6bf0a54530938839727121f
MD5 a832097afd58533445185648d787d96b
BLAKE2b-256 fd863be02f585418ef261cd43b4a42fd7646925319f786702f70f2b79cc48635

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for yabg_pygments_adapter-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 76d1882cfcdf385b2d893bad8645b525506a0d63f62674b1cb112dd108690dc2
MD5 2125b3425893ddbf77510bc9d9b788c6
BLAKE2b-256 76e03e721d2093b93d84120e38259133fc9c4ef07a8bd4324da9124a8651d24c

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