Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kylef/pygments-apiblueprint
An API Blueprint Lexer for Pygments
https://github.com/kylef/pygments-apiblueprint
api-blueprint
Last synced: 10 days ago
JSON representation
An API Blueprint Lexer for Pygments
- Host: GitHub
- URL: https://github.com/kylef/pygments-apiblueprint
- Owner: kylef
- License: bsd-3-clause
- Created: 2017-05-09T19:01:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-09T22:22:15.000Z (almost 5 years ago)
- Last Synced: 2024-12-23T07:40:14.034Z (19 days ago)
- Topics: api-blueprint
- Language: Python
- Homepage:
- Size: 97.7 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Pygments API Blueprint
## Installation
```shell
$ pip install pygments-apiblueprint
```## Usage
Once installed, the Pygments API Blueprint lexer is instantly available to
Pygments.```python
from pygments import highlight
from pygments.formatters import HtmlFormatter
from pygments_apiblueprint import APIBlueprintLexersource = '''
# GET /+ Response 200 (application/json)
+ Attributes
+ name: `pygments-apiblueprint`
'''lexer = APIBlueprintLexer()
formatter = HtmlFormatter(linenos='table', cssclass='highlight')
result = highlight(source, lexer, formatter)print(result)
```## Example
![](pygments_apiblueprint.png)