Skip to main content

View Office files in the terminal

Project description

officecat 🐱

A CLI tool to view Office files in the terminal. Think cat but for .docx, .pptx, .xlsx, .csv, and .tsv files.

Every supported format is converted to markdown internally, then rendered through a single unified pipeline.

Installation

pip install officecat

Or install from source:

git clone https://github.com/mubbie/officecat.git
cd officecat
pip install -e .

Usage

officecat report.docx              # colored formatted output (default)
officecat budget.xlsx              # spreadsheet as markdown table
officecat slides.pptx              # presentation content
officecat data.csv                 # CSV and TSV
officecat report.docx --tui        # interactive full-screen viewer
officecat budget.xlsx | head       # plain text (auto-detected pipe)
officecat slides.pptx --json       # JSON output

Output Modes

  • Rich (default): Colored, formatted output to stdout. Works with less -R.
  • TUI (--tui): Full-screen interactive viewer with scrolling.
  • Plain (auto when piped, or --plain): Raw markdown for piping to grep, head, awk.
  • JSON (--json): {"source": "...", "markdown": "..."} for scripting.

Options

Flag Short Description
--tui -t Interactive full-screen viewer
--plain -p Raw markdown text, no colors
--json -j JSON output
--head N -n N Show first N lines
--sheet S -s S Select sheet by name or 1-based index (xlsx only)
--slide N Show only slide N (pptx only)
--headers N -h N Promote row N as headers (xlsx/csv, default: 1, 0 to disable)
--all -a Disable the default 500-row cap

TUI Key Bindings

Key Action
q Quit
Up / Down Scroll
PgUp / PgDn Page scroll
Home / End Jump to top/bottom

Examples

# Quick view of a document
officecat report.docx

# Browse interactively
officecat report.docx --tui

# Specific sheet
officecat budget.xlsx --sheet "Q4 Summary"

# Specific slide
officecat deck.pptx --slide 3

# First 10 lines
officecat budget.xlsx --head 10

# JSON output
officecat report.docx --json | jq '.markdown'

# Pipe to grep
officecat data.xlsx --plain | grep "revenue"

Supported Formats

  • Word (.docx): headings, paragraphs, lists, tables in document order
  • PowerPoint (.pptx): slides, shapes, images, speaker notes, hidden slides
  • Excel (.xlsx): all sheets, row cap, header promotion
  • CSV (.csv): auto-delimited
  • TSV (.tsv): tab-delimited

Legacy binary formats (.doc, .ppt, .xls) show a conversion hint.

Known Limitations

  • All content is rendered as markdown. Spreadsheet tables are markdown tables, not interactive grids.
  • DOCX list detection is style-name-based and may miss custom list styles.
  • PPTX grouped shapes and embedded tables show as placeholders.
  • PPTX charts and SmartArt are not extracted.
  • XLSX formulas show cached/computed values, not formula strings.
  • Large spreadsheets are capped at 500 rows by default. Use --all to show everything.
  • TUI enforces a 1000-line cap with --all for performance. Use --plain for full output.
  • No decryption of password-protected files.
  • Legacy binary formats (.doc, .ppt, .xls) are not supported.

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

officecat-0.1.0.tar.gz (140.4 kB view details)

Uploaded Source

Built Distribution

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

officecat-0.1.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file officecat-0.1.0.tar.gz.

File metadata

  • Download URL: officecat-0.1.0.tar.gz
  • Upload date:
  • Size: 140.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for officecat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a3f4bee6230e70765454bc8e57d5eef48ef2fd8efad1f496bd153fa1c668fe1f
MD5 8669a5e18965e7ea10df91b6cac40f7d
BLAKE2b-256 3105c539540d5f95cc5727eb41d6b2b1d528475454e08e3a49f0d631f94b88c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for officecat-0.1.0.tar.gz:

Publisher: release.yml on mubbie/officecat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file officecat-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: officecat-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for officecat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e304c3b9a19f06d103c9e9e8bc43808bd67046ad5f5d68d6f92e16db640043e3
MD5 1833c29656bb5b529cb789b134499968
BLAKE2b-256 4744862a91d93c0ea8b76a8d629c1054e3877ba8c3f32d75fb53d9e01f71e9ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for officecat-0.1.0-py3-none-any.whl:

Publisher: release.yml on mubbie/officecat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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