Skip to main content

View Office files in the terminal

Project description

officecat 🐱

PyPI CI

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.2.0.tar.gz (142.0 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.2.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for officecat-0.2.0.tar.gz
Algorithm Hash digest
SHA256 64f2bbf89765dac910be0badcd368b4c60575d6f341679ae06c77fad63dd8bb8
MD5 3596bc240929635bf7dbea9caed38caf
BLAKE2b-256 ee92a06a5b41bf6b837ddfe759d5a655e290525c226177ef44184136ec16dffd

See more details on using hashes here.

Provenance

The following attestation bundles were made for officecat-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: officecat-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac21b7593f6267340ce221e5ff9a3f4b85455b7f89566c5b1162fab908504dd7
MD5 b0c25131c2524772990297084d0a8b05
BLAKE2b-256 7dd3bdc37f6139bfcc6ca2aee251c7a80a41e2c38691f65ffa25f56c278d0b0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for officecat-0.2.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