Generate color syntax highlighted PNG image from python source files.
Project description
pyliter is a Python 3 command-line tool that generates PNG files from python source.
Features
syntax highlighting
PNG files
preview mode
OpenGL rendering using pyglet
Install
$ pip install pyliter
$ pip install git+https://github.com/JnyJny/pyliter
Usage
$ pyliter --help
Usage: pyliter [OPTIONS] [INPUT_FILE]
Python syntax highlighting
Renders syntax-highlighted text to PNG file and optional previews the
render in a window before saving.
If the optional output path is omitted, preview is enabled.
Options:
-o, --output-file PATH Creates a PNG with the supplied path.
-l, --start-line INTEGER Line number to begin display. [default: 0]
-n, --line-count INTEGER Number of lines to display. [default: 10]
-N, --no-line-numbers Disable line numbers in output. [default: False]
-p, --preview Previews output in window. [default: False]
-t, --transparent Write output PNG with transparency. [default:
False]
-s, --style-name TEXT Style to apply to input file. [default: default]
-f, --font-name TEXT Font name. [default: courier]
-S, --font-size INTEGER Font size [default: 24]
-L, --list-styles List available styles and exits.
--version Show the version and exit.
--help Show this message and exit.
Example
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
pyliter-1.5.0.tar.gz
(21.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pyliter-1.5.0-py3-none-any.whl
(35.1 kB
view details)
File details
Details for the file pyliter-1.5.0.tar.gz.
File metadata
- Download URL: pyliter-1.5.0.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.5 Darwin/20.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
305916a78e628395cccfa98cf0d09eb9be0e6a0007c0024296811dd00236571a
|
|
| MD5 |
74526fa050f2156e3ef085bb2b72cb33
|
|
| BLAKE2b-256 |
691eda95f951591bfe6816de899ea2288331fa8cd3116ece143d03b32820c1cd
|
File details
Details for the file pyliter-1.5.0-py3-none-any.whl.
File metadata
- Download URL: pyliter-1.5.0-py3-none-any.whl
- Upload date:
- Size: 35.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.5 Darwin/20.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87e3d077caa32ee1b198a48d97ca040c76a1b096f5810e394666d3d0c37522cd
|
|
| MD5 |
c9d31cedfcd9e15ce2c47ccbd59aa19d
|
|
| BLAKE2b-256 |
5706148ae8b05737504edc0da231dd6c0006403e208b729654a995647b56dc74
|