CSS Syntax Highlighting Generator (written in python). Uses Pygments to generate HTML/CSS code for the syntax highlighting of a code block. Colorschemes can be defined in the script. Accidently written with ChatGPT :\
This repository has been archived on 2024-05-23. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2024-05-21 22:57:59 -05:00
LICENSE Initial commit 2024-05-06 18:57:18 +02:00
Print Classes.py Font weights 2024-05-21 22:42:31 -05:00
README.md Add 2 newlines in one spot to break up indirectly related sentences. 2024-05-21 22:57:59 -05:00
Syntax Highlighting.py Font weights 2024-05-21 22:42:31 -05:00

C-Sy-G

CSS Syntax Highlighting Generator (written in python).

Uses Pygments to generate HTML/CSS code for the syntax highlighting of a code block.

Colorschemes can be defined in the script.

Accidently written with ChatGPT :\

Instructions

In Syntax\ Highlighting.py, insert your code segments in the code_snippets dictionary. The format is

"language": "code",
"language": "code"

This can be repeated for different languages and code snippets.

The colorscheme can be generated by executing Print Classes.py to generate the class_colors, and class_weights dictionaries. The colors are based on the currently enabled Pygments colorscheme.

python3 Print\ Classes.py

Put the generated dictionaries in Syntax\ Highlighting.py.

There are examples already in the program, it should be self-explanitory.

Then run the program Syntax\ Highlighting.py

python3 Syntax\ Highlighting.py

The generated HTML code will contain class definitions at the top. The formatted text will be at the bottom.

The code will be put in the highlighted_code dir.

If you have any issues, please report them.