Skip to main content

Colored Cat is a syntax highlighter file reader.

Project description

Colored Cat

Build Build Downloads Supported Versions Contributors PyPI version License: GPL-3.0

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 cat

Read a file

ccat /tmp/teste.json

Sample 001

Read a file without table

ccat -nt /tmp/teste.json

Sample 002

Just highlight the file

ccat -s /tmp/teste.json

Sample 003

Display only some lines

ccat -l 18:37 teste.json

Sample 004

ccat -l 18:23,35:37 teste.json

Sample 004

Display only some lines and highlight specific lines

ccat -l 18:37 -hl 18:23,35:37 teste.json

Sample 004

Project details


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.12.tar.gz (24.7 kB view details)

Uploaded Source

File details

Details for the file pyccat-0.1.12.tar.gz.

File metadata

  • Download URL: pyccat-0.1.12.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

Hashes for pyccat-0.1.12.tar.gz
Algorithm Hash digest
SHA256 45b4577f1717af903d81a0eebc310e7ec7016b21dcf5d5048cca5fb220faea47
MD5 99e4d2c67c8955acb7c3f41288f78377
BLAKE2b-256 4349b42283dc5bf6fae22e1ae57eb549fc40a4e188bdf30e36432e74dc023e9c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page