Expand description
§tokmd-model
Tier 1 (Logic)
This crate contains the core business logic for aggregating and transforming code statistics.
It handles the conversion from raw Tokei scan results into tokmd receipts.
§What belongs here
- Aggregation logic (rolling up stats to modules/languages)
- Deterministic sorting and filtering
- Path normalization rules
- Receipt generation logic
§What does NOT belong here
- CLI argument parsing
- Output formatting (printing to stdout/file)
- Tokei interaction (use tokmd-scan)
Structs§
- InMemory
RowInput - A logical in-memory file used to synthesize
FileRows without the host filesystem.
Functions§
- avg
- Compute the average of
linesoverfiles, rounding to nearest integer. - collect_
file_ rows - Collect per-file contributions, optionally including embedded language reports.
- collect_
in_ memory_ file_ rows - Collect
FileRows directly from ordered in-memory inputs. - create_
export_ data - create_
export_ data_ from_ rows - create_
lang_ report - create_
lang_ report_ from_ rows - create_
module_ report - create_
module_ report_ from_ rows - module_
key - Compute a “module key” from an input path.
- normalize_
path - Normalize a path for portable output.
- unique_
parent_ file_ count - unique_
parent_ file_ count_ from_ rows