Skip to main content

Crate tokmd_model

Crate tokmd_model 

Source
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§

InMemoryRowInput
A logical in-memory file used to synthesize FileRows without the host filesystem.

Functions§

avg
Compute the average of lines over files, 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