~sqwishy/python-syntect-meme

python bindings for syntect but not really cause there are only two things in it

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~sqwishy/python-syntect-meme
read/write
git@git.sr.ht:~sqwishy/python-syntect-meme

You can also use your local clone with git send-email.

I wanted to use syntect from docutils to syntax highlight in reStructuredText documents instead of pygments. So these are some Python bindings to syntect.

But, I changed my mind because I'm not happy of the quality of syntect's output and or built-in syntax catalogue. So this is abandoned for now.

See also syntect, https://github.com/trishume/syntect/

I was installing it with pip but maturin works too last I checked. I don't know anything about maturin or setuptools_rust so maybe I hecked something up idk.

The package name is furret; different from the version control repository.

There are a couple examples in the examples/ directory.

To run examples/furret_code_block.py, for instance:

python -m venv /tmp/thing
. /tmp/thing/bin/activate.fish  # if using the fish shell
pip install .
pip install docutils  # for furret_code_block.py
python examples/furret_code_block.py > /tmp/furret.html

That example outputs html so you can pipe it into a file and view it with a web browser or even pipe it into w3m -T text/html and view it in your terminal but I don't think w3m can render css so none of the highlighting shows up so don't do that actually.

Maybe tested against docutils 0.17 and 0.18 and Python 3.10.