Repository navigation
Releases: scpg/grepxcel
Releases · scpg/grepxcel
Release list
grepxcel 0.4.1
Fixed
not-null/not-emptyround-trip fidelity —FieldDefnow storesrequired_token
(the original parser token) so the web wizard no longer silently rewritesnot-emptyfields
asnot-nullwhen a pattern is saved after preload.- Single source of truth for token sets —
VALID_MODE_TOKENS/VALID_CONSTRAINT_TOKENS
exported frompattern_parser.pyand imported bywizard_core.py; local duplicate
frozensets in_col_a_extra_to_partseliminated. var:(default)guard — the pattern writer now strips(default)fromvar:col-A
cells, symmetric with the existinglbl:(default)guard.- Stale
lbl:(default)fixture —01_simple_invoice_data_pattern-from-web.csvhad
8 rows written with the oldlbl:(default)syntax thatPatternParserrejects; fixed to
lbl:. - Silent test skip —
test_pattern_tester.pyreferenced a non-existent fixture filename,
causing 10 tests to silently skip; corrected.
Improved
- AI-debug logging in web-wizard session log — three new structured event types make
session logs machine-readable for bug analysis and architecture tracing:PRELOAD_FIELD— one entry per cell loaded from a pattern file (role, name, type,
match pattern, col_a_extra modifiers).SCHEMA_SUMMARY— emitted immediately before each SAVE; reportslbl=N var=N total=N
and a modifier distribution (not-null×3 trim-whitespace×1 …).- Session log header updated to document all event types.
- Unrecognized-token warning —
_col_a_extra_to_partsnow emits alogging.WARNING
when it encounters tokens not in the parser's valid sets, naming the offending tokens and
the complete valid token lists.
grepxcel 0.4.0
Features
assert:rules — declare cross-field validation expressions directly in the pattern
file. Evaluated after each extraction; a failed assertion logs aWARNINGalongside the
field-level issues. Syntax: column A =assert:, column B = expression, column C =
optional message. Expressions support arithmetic, comparisons, boolean operators, and
numeric coercion from Excel string values. Uses a safe AST evaluator — noeval/exec.
Example:assert: | total == net + vat | totals must balance.grepxcel watch(pip install 'grepxcel[watch]') — persistent directory monitor that
runs extraction automatically as new.xlsxfiles arrive. Uses platform-native file-system
events (inotify / FSEvents / ReadDirectoryChangesW). Supports--recursive,-o output/,
and--on-error stop. Results are newline-delimited JSON to stdout or written to the output
directory. Skips Excel temp files (~$*.xlsx). Ctrl+C to stop.grepxcel test— pattern reliability test suite. Rungrepxcel test -p pattern.xlsx samples/against a directory of representative files to get a pass/warn/fail breakdown per
field. Field reliability scores (47/47 ████) help identify brittle anchors before
going to production.flat_tables/--no-source—extract(…, flat_tables=True)and
grepxcel extract --no-sourcecollapse the[{"_source": …, "data": […]}]per-instance
wrappers from nested output into flat[row, …]lists, making the result easier to pass
directly to pandas or similar pipelines.- Visual audit sheet —
--format xlsxoutput now includes a_Auditsheet that
colour-codes every extracted cell in the source data: green for matched fields, amber for
warnings, red for errors. Makes QA of large reports practical without scripting. - Web wizard: range selection & mini-table editor — Shift+Click and Shift+Arrow now
batch-classify a rectangular range in one operation. The mini-table editor lets you assign
column roles (Label / Variable / Ignore), types, and match expressions for an entire table
in a single modal, with preloaded footer row detection. - Web wizard: in-grid badge system — every cell now shows a compact two-strip badge
indicating its classification (L/V/I/C) and, for table cells, its positional role
(T-HEAD header / footer, T-DATA row) and anchor marker (▶/◀). Badges reserve fixed
width so the cell values stay aligned across rows. - Web wizard: cascade CLEAR — clearing a cell that anchors a mini-table propagates
the clear to all dependent column-role cells automatically, preventing orphaned state. - Web wizard: SKIP_EMPTY_ROW preload —
SKIP_EMPTY_ROW:Nrows in an existing
pattern are now correctly restored when the wizard preloads a pattern file. - Web wizard: Header(C) removed — the combined
Header(C)classification (header +
CONFIG) has been removed; classify headers and CONFIG rows separately.
Changed
--format legacydeprecated — using--format legacynow emits aDeprecationWarning
(Python API) and a visible⚠ DEPRECATEDmessage on stderr (CLI). The legacy format leaks
internallbl:keys and_source/_anchormetadata; migrate to--format nested
(the default).- TUI wizard removed — the Textual-based TUI (
grepxcel wizard) has been removed; use
grepxcel web-wizardinstead.
Documentation
- Merged cells guide — new
## Merged cellssection indocs/pattern-file.mdcovers
top-left cell reading, labels and values spanning merged ranges, tables with merged headers,
andgrepxcel lintmerged-cell reporting. - Web wizard guide — new
docs/web-wizard-guide.mdwith install, interface overview,
cell classification keys, keyboard shortcuts, saving, regex presets, merged cells, and
troubleshooting. - CLI reference —
--no-sourceflag added to extract flags table;legacyoutput format
marked⚠️ Deprecated. - README — pre-built binaries section (download table, macOS/Windows first-run notes);
flat_tables=TruePython API example;--no-sourcein Output formats; merged cells link.
CI / Infrastructure
- Pre-built binaries — PyInstaller-based release pipeline builds single-file executables
for Linux, macOS, and Windows on every version tag push and attaches them (with SHA-256
checksums) to the GitHub Release. Requirespip install 'grepxcel[build]'. Uses
PyInstaller ≥ 6.10 (fixes CVE-2025-59042).
grepxcel 0.3.1
Changed
- PyPI listing overhaul — improved short description, added PyPI/Python/license/downloads
badges, added "Capabilities at a glance" feature bullet list for faster scanning by humans
and AI agents, added "What's new in v0.3.0" section with CHANGELOG link - Reduced dead whitespace — removed 10 of 11
---horizontal-rule dividers from
README (each rendered as ~70 px of blank space on PyPI) - Metadata — upgraded
Development Statusclassifier from4 - Betato
5 - Production/Stable; added Python 3.15 classifier; addedEnvironment :: Console,
Intended Audience :: Science/Research,Topic :: Scientific/Engineering :: Information Analysis,Topic :: Utilities,Typing :: Typedclassifiers; expanded keywords with
automation,invoice,structured-data,data-pipeline,mcp,ai-agent, and others
grepxcel 0.3.0
grepxcel 0.2.0
Features
extract_df()— DataFrame API returning one frame per table key plus a
_scalarsframe. Works with pandas or polars (pip install 'grepxcel[pandas]'
/'grepxcel[polars]'), auto-detected at runtime. Per-tableheader/footer
fields (e.g. subtotals) are exposed as{key}__header/{key}__footerframes.--format csv— flat CSV output for single-table patterns. Table data rows
become CSV rows; scalars are denormalized as repeated columns. Refused (exit 2)
for multi-table patterns.--format xlsx— colored Excel report for human review: scalar fields, then
each table top-down with headers, alternating data rows, and footers. Requires
-o; never overwrites a source file.
Security
- Formula/CSV injection neutralization (CWE-1236) — cell values written to
--format csv/xlsxthat begin with=,+,-,@, tab, or carriage
return are emitted as literal text, so an untrusted source file cannot inject an
executable formula into the output a human opens. - Drafter prompt hardening — cell values embedded in the
draftanalyser's
LLM prompt are collapsed to a single line, stripped of control characters, and
length-bounded, resisting prompt injection from malicious spreadsheet content.
Changed
--format csv/xlsxreject--all-sheets(exit 2) — a flat file cannot
represent multiple sheets; use--sheetor--format nested.- Internal: consolidated the nested-dict flattener into
utils.flatten_nested.
grepxcel 0.1.1
Features
--strictmode —grepxcel extract --strictexits with code 2 if any
field has extraction issues (validation mismatch, missing anchor, empty value).
Lists the affected field names on stderr. Use in pipelines to catch incomplete
extractions that would otherwise exit 0 or 1 silently.quickstartcommand —grepxcel quickstartprints a guided tutorial in
your terminal: what grepxcel does, how to create your first pattern, and how
to run your first extraction. No files created or modified.
Documentation
- README rewritten — shorter, friendlier, focused on non-technical users.
Full CLI reference moved todocs/cli-reference.md. docs/cli-reference.md— comprehensive reference for all CLI commands,
flags, backends, and logging model (moved from README).- Removed absolute correctness claims ("never silently wrong") — replaced with
honest language about the tool's design intent and pattern-dependent quality. - All README links now absolute GitHub URLs so they resolve on PyPI.
grepxcel 0.1.0
Initial public release.
Features
- Pattern-based extraction — define a pattern file (
.xlsxor.csv) once,
extract structured JSON from any similarly-laid-out.xlsxfile. - Batch directory extraction —
grepxcel extract -p pat.xlsx data_dir/
expands directories to their.xlsxfiles automatically. Add-r/
--recursiveto recurse into subdirectories. Excel temp files (~$*.xlsx)
are skipped. Empty directories produce a clear error message. sbomcommand — generates a CycloneDX 1.6 Software Bill of Materials
listing grepxcel and every transitive dependency with PURLs, SPDX license
identifiers, and SHA-256 hashes from pip's RECORD files. Uses only stdlib
(importlib.metadata) — no external tool required. Output is accepted by
Dependency-Track, Grype, and other SBOM consumers. The SBOM is also
attached as a release artifact on GitHub Releases.generate-examplescommand — creates 4 ready-to-run example sets
(pattern + data xlsx + README) in a local directory so new users can try
grepxcel immediately without needing their own Excel files.- MCP server (
grepxcel mcp) — expose grepxcel as a Model Context Protocol
server so AI agents can call extract, validate-pattern, lint, schema, docs,
doctor, and generate-examples directly. Stdio transport. Install with
pip install 'grepxcel[mcp]'. mcp-configcommand — prints the MCP server config block for your AI agent
(Claude Code, Claude Desktop, Cursor). Detects the installed command path.lbl.matchmode —lbl:fields now default to literal string matching
instead of full regex. Labels likeTerm (months):orBreaks\n(minutes)
work without regex escaping.- Global config:
config: | lbl.match | literal(default) /glob/regexp - Per-field override:
lbl:literal,lbl:glob,lbl:regexpin column A globmode: shell wildcards (*= any text including newlines,?= one char)regexpmode: opt-in for the previous full Pythonre.searchbehaviourvalidate-patternwarns when albl:value looks like a regex but mode is
literalorglob(e.g.\(,\.,(?)- Verbose
validate-pattern -vnow showslbl.matchin config and per-field
[mode]tags for explicit overrides
- Global config:
- Cell addressing
cell:B5-> absolutecell:next-> sequential, next non empty in direction orderseek:-> repositioningdir:-> direction switching (LR / TD).
- Table matching — repeating mini-tables with:
HEADERDATA-> mini-table data rowsDATA:1->1rowDATA:*-> any number of rowsDATA:{n,m}->ntomrows
FOOTERSPLITTERSKIP_IF
grepxcel.extract()Python API — one-call facade with support for:sheet=,all_sheets=Trueoutput_format=
draftcommand — generates a starter pattern using one of following options:- local GGUF model -> offline, the models will be downloaded.
- GitHub Models -> for those still having it,
stand GitHub changelog 2026-06-16 - Claude API ->
validate-pattern— validates pattern files without extracting.schema— generates a JSON Schema (draft 2020-12) from a pattern file.lint— inspects an Excel file for potential issues before extraction.doctor— preflight check for dependencies, API keys, model cache, proxy/TLS.docs— writes a colour-codedpattern-reference.xlsx.- Structured logging —
--log-format jsonwrites NDJSON with an allow-list
of safe keys only (no extracted cell values, ever). Non-reversible value
fingerprint (value_len+value_sha8) aids diagnostics. Summary event with
extraction statistics (counts + field names). --meta— opt-in_metablock in extracted JSON (run_id, stats, safe
issues) for pipeline auto-verification.pattern.version— optionalconfig: | pattern.version | Nfor
forward-compatibility; absent defaults to 1.- Corporate proxy support (experimental) —
truststore,--ca-bundle/
GREPXCEL_CA_BUNDLEfor TLS-inspection proxies. - Scoped
.env— project-local and~/.config/grepxcel/.envcredential
discovery;--strict-envrefuses out-of-project.envfiles. generate-skill— emits a skill doc (--target claudeoragents-md)
for AI-agent integration.
Changed
- structlog integration — NDJSON file output now uses a structlog processor
chain (allow-list filter → JSONRenderer) instead of manual dict building +
json.dumps. The output format is unchanged; this is an internal refactor
that makes the structured-log pipeline extensible for future output targets
(OTLP, Datadog, etc.).structlog>=24.1is now a core dependency.
Security
- MCP path sandboxing — all MCP server tools validate that file paths
resolve within the server's working directory. Absolute paths pointing
elsewhere,..traversal, and symlink escapes are rejected with a clear
error. Prevents an AI agent (or a prompt-injected one) from reading or
writing files outside the intended project directory. - Fail-closed XXE protection (defusedxml asserted at import).
- ZIP-bomb guard measures real decompressed size (stream, not metadata).
- AST-based ReDoS detection + hard per-match regex timeout.
- SSRF/file-read guards on server URLs (
http(s)only). - Scoped
.envdiscovery (stops at project root). - All GitHub Actions pinned to immutable commit SHAs.
- Cached-model sha256 integrity verification on every run.
- Structured JSON logs never contain extracted cell values (allow-list
construction, not redaction).