Provides improved Pygments lexers
Project description
# Introduction
This repository contains custom [Pygments](http://pygments.org/) lexers required to generate documentation for the Brightspot platform. It also contains Handlebars and Less files you can use for testing.
# Building Distribution Packages
## Preprequisites
* A Python virtual environment (a best practice).
* pip; see [Creating Virtual Environments](https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments)
## Procedure
1. Build the package: `python3 setup.py sdist bdist_wheel`
1. Install the package into the environment: `pip install `
# Installation
This installation procedure describes how to install the enhanced lexers into your existing Pygments package.
1. Ensure you have Pygments installed.
* `pip show Pygments` to verify
* `pip install Pygments` to install
1. Find where your python packages are installed:
`python -m site | grep site-packages`
For OS X users, the packages are probably installed in one of the following locations:
* venv-directory/lib/pythonX.X/site-packages/
* /Users/username/Library/Python/X.X/lib/python/site-packages/
* /Library/Python/X.X/site-packages/
1. Change to the directory you identified in step 2.
1. Change to `pygments/lexers/`.
1. Rename the files you are overwriting:
* `mv css.py css.py.old`
* `mv templates.py templates.py.old`
1. Change to a different directory, and clone or download this repository.
1. Copy the cloned files `css.py` and `templates.py` into the directory you identified in step 4.
# Testing
1. Update the file `templates.py` or `css.py`.
1. Run pygments locally using your updated file. This requires the `-l` and `-x` switches at the command line. Examples:
`pygmentize -l templates.py:HandlebarsLexer -x test1.hbs`
`pygmentize -l css.py:LessCssLexer -x test1.less`
`pygmentize -o trash.html -l css.py:LessCssLexer -x test1.less`
In the previous command samples, the option `-x` points to a test file. You can use the test files provided by this repository in the directory `test-files/`.
1. Commit the updated lexers.
1. Install the updated lexers in the directory `pygments/lexers/` you determined from the section "Installation," above.
# Contributing
Interested in creating or fixing a custom lexer? See Pygments' [Write your own lexer](http://pygments.org/docs/lexerdevelopment/).
This repository contains custom [Pygments](http://pygments.org/) lexers required to generate documentation for the Brightspot platform. It also contains Handlebars and Less files you can use for testing.
# Building Distribution Packages
## Preprequisites
* A Python virtual environment (a best practice).
* pip; see [Creating Virtual Environments](https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments)
## Procedure
1. Build the package: `python3 setup.py sdist bdist_wheel`
1. Install the package into the environment: `pip install `
# Installation
This installation procedure describes how to install the enhanced lexers into your existing Pygments package.
1. Ensure you have Pygments installed.
* `pip show Pygments` to verify
* `pip install Pygments` to install
1. Find where your python packages are installed:
`python -m site | grep site-packages`
For OS X users, the packages are probably installed in one of the following locations:
* venv-directory/lib/pythonX.X/site-packages/
* /Users/username/Library/Python/X.X/lib/python/site-packages/
* /Library/Python/X.X/site-packages/
1. Change to the directory you identified in step 2.
1. Change to `pygments/lexers/`.
1. Rename the files you are overwriting:
* `mv css.py css.py.old`
* `mv templates.py templates.py.old`
1. Change to a different directory, and clone or download this repository.
1. Copy the cloned files `css.py` and `templates.py` into the directory you identified in step 4.
# Testing
1. Update the file `templates.py` or `css.py`.
1. Run pygments locally using your updated file. This requires the `-l` and `-x` switches at the command line. Examples:
`pygmentize -l templates.py:HandlebarsLexer -x test1.hbs`
`pygmentize -l css.py:LessCssLexer -x test1.less`
`pygmentize -o trash.html -l css.py:LessCssLexer -x test1.less`
In the previous command samples, the option `-x` points to a test file. You can use the test files provided by this repository in the directory `test-files/`.
1. Commit the updated lexers.
1. Install the updated lexers in the directory `pygments/lexers/` you determined from the section "Installation," above.
# Contributing
Interested in creating or fixing a custom lexer? See Pygments' [Write your own lexer](http://pygments.org/docs/lexerdevelopment/).
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
Built Distribution
Close
Hashes for pygments-lexer-overrides-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ace628f70cae9d3312ff11ab286e2697cbdd0234368d4535bc3acad01e0f3beb |
|
MD5 | 57895ebf011c4329ce8f0ba010b32026 |
|
BLAKE2b-256 | 1ddee74a5ae0e4b81dabff64cfbef9e7cc7d6737eeee2e10b071351ab18498f9 |
Close
Hashes for pygments_lexer_overrides-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 633e91e94e750337dc1ed74382ac6d1659410f360b4fac065c352679115d2205 |
|
MD5 | fdb1d2d904b27bcb0e2c51d54d98346f |
|
BLAKE2b-256 | 0446b1118c799e6f4818e3def0d278c90c279169d794d9995413e41b3e8cbc83 |