pngmetagrep
PNG tEXt metadata extractor — NDJSON output for jq pipelines.
Extracts tEXt chunks from PNG files and outputs one JSON object per line (NDJSON). No image decoding — reads only binary chunk headers for speed.
Use Cases
- VDSL — search/aggregate
vdslrecipe chunks embedded by the VDSL image generation platform - ComfyUI — extract
prompt/workflowchunks - General — any arbitrary tEXt keyword
Install
Pre-built binary (recommended)
|
Platforms: x86_64-linux, aarch64-linux, x86_64-macos, aarch64-macos
From source
Usage
# Extract all tEXt chunks from PNGs under a directory
# Specify chunk keywords (repeatable)
# Regex filter on JSON output
# Case-insensitive filter
# Print matching file paths only (no JSON)
# Limit parallel threads
# Pipe to jq
|
Options
| Flag | Description |
|---|---|
--chunk <KEY> |
tEXt keyword to extract (repeatable, default: all) |
-e <REGEX> |
Regex filter applied to serialized JSON output |
-i |
Case-insensitive matching for -e |
-l |
Print matching file paths only (no JSON) |
-j <N> |
Number of parallel threads (default: CPU count) |
Output Format
Single chunk whose value is a JSON object — path is merged flat:
Multiple chunks or non-object values — nested by keyword:
Crate Structure
| Crate | Role |
|---|---|
pngmetagrep-core |
PNG tEXt chunk extraction library (std only, no image decoding) |
pngmetagrep (CLI) |
Parallel CLI built on clap + rayon + walkdir |
Release
Pre-built binaries are distributed via cargo-dist. Tag push (v*.*.*) triggers GitHub Actions to build and publish to Releases.
License
MIT