Skip to content

Latest commit

 

History

History
83 lines (73 loc) · 3.32 KB

File metadata and controls

83 lines (73 loc) · 3.32 KB

Teapot — Status and Roadmap

Completed

Core Engine

  • Token, Scanner, Parser (recursive descent evaluator, no AST)
  • 42 built-in functions (math, string, cell refs, aggregates, utility)
  • 3D sparse HashMap-based sheet with lazy on-demand evaluation
  • Type-safe arithmetic with promotion rules matching C original

File I/O

  • Portable ASCII format (.tp) — load/save
  • Compressed format (.tpz) — load/save
  • CSV — load/save
  • XLSX — load/save (via calamine/rust_xlsxwriter)
  • ODS/XLS — load (via calamine)
  • HTML export
  • LaTeX export
  • ConTeXt export
  • Plain text export

Terminal UI (ratatui/crossterm)

  • Spreadsheet grid with column/row headers
  • Sheet tabs with navigation
  • Cell editing with formula pre-fill
  • vim-style navigation (hjkl, HJKL page, Home/End, PgUp/PgDn)
  • Command mode (: prefix)
  • Block operations: mark, copy, move, clear, sort, yank/paste
  • Insert/delete rows and columns
  • Column width adjustment (+/-)
  • Cell formatting: alignment, precision, bold, underline, lock, ignore
  • Block-scoped formatting (applies to marked block when set)
  • Undo/redo (50 levels)
  • Batch mode (stdin commands)
  • Help screen (?)

Modern TUI Features

  • Smart entry keys: = for formula, ' for text (auto-quotes), 0-9 for numbers
  • Full readline-style editing (Left/Right, Home/End, Ctrl+A/E/K/U/W/F/B, Delete)
  • Command history (Up/Down, max 100 entries)
  • Tab completion for commands
  • @ cell picker (highlight on sheet, insert reference)
  • Sheet navigation: [/] keys, Z picker popup, :sheet/:sheet-add/:sheet-del
  • Mirror block (:mirror-x/y/z)
  • Fill/tile block (:fill cols rows [layers])
  • Multi-axis sort (:sort-x, :sort-y, :sort-z)
  • Clocked cells — three-phase commit (C key, :clock, :clock-run)
  • Command palette (/ or F1) with fuzzy filtering
  • Search/replace with regex (n/N navigate, :search, :replace, y/n/a/q confirmation)
  • Cell reference and dependency highlighting (g/d/r keys, colored refs in status bar)
  • Label-based cell references — @("labelName"), :label, :labels picker
  • eval() function — re-evaluates a cell's formula (with recursion protection)
  • Export marked block only (all export commands respect mark range)
  • @/& partial coordinate support — @(), @(x), @(x,y), &(), &(x), &(x,y)
  • log(x, base) two-argument form
  • rnd() zero-argument random [0,1)
  • strftime() with chrono — format string + optional timestamp
  • Status bar: modified indicator (*), mark range display

Remaining Work

File Formats

  • XDR binary format (original native format) — load/save
  • SC (Spreadsheet Calculator) format — load
  • WK1 (Lotus 1-2-3) format — load

UI Polish

  • Mouse support (click to select cell, scroll)
  • Theming / color schemes
  • Resizable column widths by dragging
  • Status bar: show mark range, modified indicator
  • Configurable key bindings

Missing C Features

  • Internationalization (message catalogs) — deferred (C code has no actual translations)

Future Ideas

  • Undo descriptions (show what each undo step reverts)
  • Search/replace within cells
  • Conditional formatting
  • Charts (sparklines in terminal)
  • Lua/Rhai scripting extension
  • Web-based viewer