Instructions
This commit is contained in:
parent
d0435f985e
commit
e7dd392ff9
1 changed files with 22 additions and 1 deletions
23
README.md
23
README.md
|
@ -6,4 +6,25 @@ Uses Pygments to generate HTML/CSS code for the syntax highlighting of a code bl
|
|||
|
||||
Colorschemes can be defined in the script.
|
||||
|
||||
Accidently written with ChatGPT :\
|
||||
Accidently written with ChatGPT :\
|
||||
|
||||
# Instructions
|
||||
|
||||
In `Syntax\ Highlighting.py`, insert your code segments in the `code_snippets` dictionary. The format is
|
||||
```py
|
||||
"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.
|
||||
|
||||
Put the generated dictionaries in `Syntax\ Highlighting.py`.
|
||||
|
||||
There are examples already in the program, it should be self-explanitory.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
|
Reference in a new issue