Colored Cat is a syntax highlighter file reader.
Project description
Colored Cat
CCat officially supports Python 3.8+.
Main features
- Read and highlight text and code files
- Filter to display only selected lines
- Multiple highlight styles
- Save output at image (png/jpg) file using ansi2image lib.
Installation
pip3 install --upgrade pyccat
Help
ccat -h
positional arguments:
[filename] Filename
Options:
-s, --simple just colorize the file content
-nt, --no-tabulated do not show tab
--style [style name] pygments lib style name. (default: gruvbox-dark). See more at: https://pygments.org/styles/
-l [filter], --lines [filter] return only selected lines (ex1: 5:13 or ex2: 50: or ex3: :100)
-hl [filter], --highlight-lines [filter] highlight only selected lines (ex1: 5:13 or ex2: 50: or ex3: :100)
--output-img [filename] image output file.
-h, --help show help message and exit
-v Specify verbosity level (default: 0). Example: -v, -vv, -vvv
--version show current version
Executing
Regular linux cat
Read a file
ccat /tmp/teste.json
Read a file without table
ccat -nt /tmp/teste.json
Just highlight the file
ccat -s /tmp/teste.json
Display only some lines
ccat -l 18:37 teste.json
ccat -l 18:23,35:37 teste.json
Display only some lines and highlight specific lines
ccat -l 18:37 -hl 18:23,35:37 teste.json
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
pyccat-0.1.11.tar.gz
(24.7 kB
view details)
File details
Details for the file pyccat-0.1.11.tar.gz
.
File metadata
- Download URL: pyccat-0.1.11.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee9328a97c3fd32a5ee4595dadc27c55a2016bb16e3e7c36632216a1816a1085 |
|
MD5 | feeb348554a63f364b7d8a5754d1e720 |
|
BLAKE2b-256 | 1c7a0fecc5a39f29d25075a5cf1d7187e56a8e132de1b5b6dc7878268d9f0563 |