Skip to main content

A CLI tool to generates human friendly visualizations for files.

Project description

vcat

Overview

vcat is a command-line (CLI) tool that generates human-friendly visualizations from any file's contents.

https://github.com/user-attachments/assets/f1836b5b-3664-4ef5-9d90-3d0e138e234b

Key Features

  • Automatic Visualization: Provide a file, and vcat writes a custom Python script on the fly to produce an HTML-based visualization.
  • Supports Any File Size: vcat works for visualizing files of any size.
  • Large File Handling: For files exceeding a configurable threshold, vcat can break down the content into chunks so the final visualization is still efficient and doesn't kill your browser.
  • Simple CLI: An intuitive command-line interface (vcat path/to/file.txt) that does all the heavy lifting for you.
  • Custom Styling: Cool custom styles 😎 (maybe).
  • Personalized Visualizations: Customize the visualization output with additional instructions using the --prompt parameter.

Installation

  1. Prerequisites:
    • Python 3.7+
    • An OpenAI API key (OPENAI_API_KEY must be set as an environment variable)
  2. Install with pip:
    pip install vcat
    

Usage

# Create the environment variable
export OPENAI_API_KEY=sk-****************

# Basic usage
vcat path/to/data.csv

# Reading only 100 lines
vcat path/to/data.csv --lines 100

# Reading only 5000 characters
vcat path/to/data.csv --chars 5000

# Customize the visualization with additional instructions
vcat path/to/data.csv --prompt "Use a dark theme and add search functionality"
  • After running, vcat will create and open an HTML file that visualizes your data.
  • Use the --prompt parameter to provide additional instructions for customizing the visualization (e.g., specific themes, features, or layout preferences).

Environment Variables

  • OPENAI_API_KEY: Must be set to a valid OpenAI API key.
  • VERBOSE (optional): Set to any value to see more detailed logs.

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

vcat-0.1.5.dev2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vcat-0.1.5.dev2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file vcat-0.1.5.dev2.tar.gz.

File metadata

  • Download URL: vcat-0.1.5.dev2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.19

File hashes

Hashes for vcat-0.1.5.dev2.tar.gz
Algorithm Hash digest
SHA256 a6a72595ba0a791ef827c53678a13fee63dcd1e2d932eb7b906d326875b361be
MD5 9fddb50e69560e388aa3719d9aaebd94
BLAKE2b-256 76991c1a71e0fb5250b6a8feaeeca855777da21ce14d61483df075195e7d025d

See more details on using hashes here.

File details

Details for the file vcat-0.1.5.dev2-py3-none-any.whl.

File metadata

  • Download URL: vcat-0.1.5.dev2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.19

File hashes

Hashes for vcat-0.1.5.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 2f55ae520dd8dc29a1528422ec8e03d852942c0c0a0fd7ad891f949a2dc4c3ca
MD5 cb4e51d434a7201c489be6ca17deddf2
BLAKE2b-256 bb1ee08154e22685829007f5aa61284e23242a71dbc381f0b4088807459a39dd

See more details on using hashes here.

Supported by

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