Skip to main content

Crate text_mirror

Crate text_mirror 

Source
Expand description

Converts binary and rich files into plain text and builds a replica text-mirror tree beside a provenance manifest.

The manifest schema text-mirror/manifest@1 is the public interface. The manifest module holds its serde types. See docs/DESIGN.md for the architecture.

In-process converters cover text, Office and OpenDocument documents, and spreadsheets. Text-layer PDF and the media adapters run behind the sandbox runner in a jailed worker. A format no converter claims, or one whose adapter engine is not pinned yet, is inventoried by detect and recorded as unsupported, so the manifest always reports the true denominator.

Re-exports§

pub use runner::protocol::bodies as runner_bodies;

Modules§

bundle
Bundle packaging, verification, and merging.
convert
The converter boundary and the plain text passthrough.
detect
Format detection. Magic bytes first, extension as tiebreak.
hash
Streaming BLAKE3 file hashing and the dedup index.
manifest
Serde types for the manifest schema text-mirror/manifest@1, the append-only JSONL writer, and the shard reader.
mirror
Mirror path mapping and atomic writes.
pipeline
The end-to-end pipeline behind the CLI verbs.
report
JSON summary types the CLI verbs emit.
runner
The sandboxed subprocess runner behind every subprocess adapter.
segments
The <source>.segments.jsonl file beside each converted artifact.
walk
Deterministic traversal of a division root.

Enums§

Error
Errors returned by this library.

Type Aliases§

Result
The result type used across this library.