https://github.com/hreikin/gen-pygments-css
Generate CSS stylesheets for each Pygments supported style.
https://github.com/hreikin/gen-pygments-css
css pygments pygments-css pygments-style python stylesheets
Last synced: about 2 months ago
JSON representation
Generate CSS stylesheets for each Pygments supported style.
- Host: GitHub
- URL: https://github.com/hreikin/gen-pygments-css
- Owner: hreikin
- License: mit
- Created: 2022-04-04T17:37:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-06T10:37:49.000Z (almost 4 years ago)
- Last Synced: 2025-08-26T03:49:35.873Z (6 months ago)
- Topics: css, pygments, pygments-css, pygments-style, python, stylesheets
- Language: CSS
- Homepage: https://hreikin.github.io/gen-pygments-css/
- Size: 660 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[![Commits][commit-shield]][commit-url]
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]

[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
Generate Pygments CSS
Generate CSS stylesheets for each Pygments supported style.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
## About The Project
Generate CSS stylesheets for each Pygments supported style.
- Github Link: [https://github.com/hreikin/gen-pygments-css](https://github.com/hreikin/gen-pygments-css)
- PyPi Link: [https://pypi.org/project/gen-pygments-css/](https://pypi.org/project/gen-pygments-css/)
- PDF Documentation: [https://hreikin.github.io/gen-pygments-css/pdf/gen-pygments-css-documentation-LATEST.pdf](https://hreikin.github.io/gen-pygments-css/pdf/gen-pygments-css-documentation-LATEST.pdf)
### Built With
- [Pygments](https://github.com/pygments/pygments)
- [Python](https://www.python.org/)
## Getting Started
### 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`:
```sh
pip install gen-pygments-css
```
#### Install From Source
Alternatively you can install from source by following the steps below:
1. Clone the repo:
```sh
git clone https://github.com/hreikin/gen-pygments-css.git
cd gen-pygments-css/
```
2. Create and source a Python virtual environment:
```sh
python3 -m venv .venv
source .venv/bin/activate
```
3. Install requirements with `pip`:
```sh
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.
```python
from gen_pygments_css.gen_pygments_css import gen_pygments_css
# 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 CSS selector defined.
gen_pygments_css(css_selector=".highlight")
# Call with a multiple arguments defined.
gen_pygments_css(css_selector=".highlight", styles_list=["monokai", "stata-dark"])
# Call with a relative custom css_dir.
gen_pygments_css(css_dir="assets/styles/")
# Call with an absolute custome css_dir.
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()
```
_For more examples, please refer to the [Documentation](https://hreikin.github.io/gen-pygments-css)_
## Roadmap
See the [open issues](https://github.com/hreikin/gen-pygments-css/issues) for a full list of proposed features (and known issues).
## Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## License
Distributed under the MIT License. See `LICENSE.txt` for more information.
## Contact
Github Link: [https://github.com/hreikin/gen-pygments-css](https://github.com/hreikin/gen-pygments-css)
PyPi Link: [https://pypi.org/project/gen-pygments-css/](https://pypi.org/project/gen-pygments-css/)
PDF Documentation: [https://hreikin.github.io/gen-pygments-css/pdf/gen-pygments-css-documentation-LATEST.pdf](https://hreikin.github.io/gen-pygments-css/pdf/gen-pygments-css-documentation-LATEST.pdf)
[contributors-shield]: https://img.shields.io/github/contributors/hreikin/gen-pygments-css.svg?style=for-the-badge
[contributors-url]: https://github.com/hreikin/gen-pygments-css/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/hreikin/gen-pygments-css.svg?style=for-the-badge
[forks-url]: https://github.com/hreikin/gen-pygments-css/network/members
[stars-shield]: https://img.shields.io/github/stars/hreikin/gen-pygments-css.svg?style=for-the-badge
[stars-url]: https://github.com/hreikin/gen-pygments-css/stargazers
[issues-shield]: https://img.shields.io/github/issues/hreikin/gen-pygments-css.svg?style=for-the-badge
[issues-url]: https://github.com/hreikin/gen-pygments-css/issues
[license-shield]: https://img.shields.io/github/license/hreikin/gen-pygments-css.svg?style=for-the-badge
[license-url]: https://github.com/hreikin/gen-pygments-css/blob/master/LICENSE.txt
[commit-shield]: https://img.shields.io/github/commit-activity/m/hreikin/gen-pygments-css?style=for-the-badge
[commit-url]: https://github.com/hreikin/gen-pygments-css/graphs/commit-activity