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)

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.
create_export_data
create_lang_report
create_module_report
module_key
Compute a “module key” from an input path.
normalize_path
Normalize a path for portable output.
unique_parent_file_count