Generate CSS stylesheets for each Pygments supported style.
Project description
Generate Pygments CSS Stylesheets
About The Project
Generate CSS stylesheets for each Pygments supported style.
- Github Link: https://github.com/hreikin/gen-pygments-css
- PyPi Link: https://pypi.org/project/gen-pygments-css/
- PDF Documentation: https://hreikin.github.io/gen-pygments-css/pdf/gen-pygments-css-documentation-LATEST.pdf
Built With
Installation
To get a local copy up and running choose one of the below install instructions and follow the steps provided.
Install With PIP
The simplest way to install gen-pygments-css
is to use pip
:
pip install gen-pygments-css
Install From Source
Alternatively you can install from source by following the steps below:
- Clone the repo:
git clone https://github.com/hreikin/gen-pygments-css.git cd gen-pygments-css/
- Create and source a Python virtual environment:
python3 -m venv .venv source .venv/bin/activate
- Install requirements with
pip
:pip install -r requirements.txt
Usage
CSS stylesheets for all Pygments
styles are output into a created css/
directory by default, this can be overridden.
# Called with no arguments.
gen_pygments_css()
# Called with a string passed into the styles_list.
gen_pygments_css(styles_list="monokai")
# Called with a list of strings passed into the styles_list.
gen_pygments_css(styles_list=["monokai", "stata-dark"])
# Call with a custom css_dir, can be relative or absolute.
gen_pygments_css(css_dir="assets/styles/")
gen_pygments_css(css_dir="/home/user/project/assets/styles/")
# Call the function and create a list of strings containing the paths of all
# stylesheets.
my_list = gen_pygments_css()
# Call with a CSS selector defined.
gen_pygments_css(css_selector=".highlight")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gen-pygments-css-0.0.1.tar.gz
(6.6 kB
view hashes)
Built Distribution
Close
Hashes for gen_pygments_css-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 564dbbf01c4a96bf9dac93cc34790d0ee556dbeb3df0e898c3a677db2c37d779 |
|
MD5 | 55e54b4f5fd8350be7973d7c16c7669f |
|
BLAKE2b-256 | f2652165e876069f4b95cb4c733d489dff0d1e9015aa3df8c8a4f7bd9b7887c0 |