Skip to main content

Crate tokmd_format

Crate tokmd_format 

Source
Expand description

§tokmd-format

Tier 2 (Formatting)

This crate handles the rendering and serialization of tokmd receipts. It supports Markdown, TSV, JSON, JSONL, CSV, and CycloneDX formats.

§What belongs here

  • Serialization logic (JSON/CSV/CycloneDX)
  • Markdown and TSV table rendering
  • Output file writing
  • Redaction integration (via internal redact module)
  • ScanArgs integration (via internal scan_args module)
  • Analysis receipt rendering under analysis

§What does NOT belong here

  • Business logic (calculating stats)
  • CLI argument parsing
  • Analysis computation (use tokmd-analysis)

Re-exports§

pub use badge::badge_svg;
pub use export_tree::render_analysis_tree;
pub use export_tree::render_handoff_tree;
pub use redact::redact_path;
pub use redact::short_hash;
pub use scan_args::normalize_scan_input;
pub use scan_args::scan_args;

Modules§

analysis
Analysis receipt rendering.
badge
SVG badge rendering helpers.
export_tree
Deterministic tree renderers from ExportData.
redact
tokmd-format::redact
scan_args
Deterministic scan argument construction for receipt metadata.

Structs§

DiffRenderOptions

Enums§

DiffColorMode

Functions§

compute_diff_rows
Compute diff rows from two lang reports. Compute diff rows between two language reports.
compute_diff_totals
Compute totals from diff rows.
create_diff_receipt
Create a DiffReceipt for JSON output.
print_lang_report
Print a language report to stdout.
print_module_report
Print a module report to stdout.
render_diff_md
Render diff as Markdown table.
render_diff_md_with_options
Render diff as Markdown table with optional compact/color behavior.
write_export
write_export_jsonl_to_file
Write export data as JSONL to a file path.
write_lang_json_to_file
Write a lang report as JSON to a file path.
write_lang_report_to
Write a language report to a writer.
write_module_json_to_file
Write a module report as JSON to a file path.
write_module_report_to
Write a module report to a writer.