Module updater

Module updater 

Source
Expand description

Automatic ID assignment, in-place category CSV updater, and merged table generator for Document Characters (Dcs) and Formats.

Structs§

MergedGenerationStats
Summary statistics for merged CSV generation.
TableUpdateStats
Summary statistics for category table ID assignment and synchronization.

Constants§

FORMAT_REGION_START
PREEXISTING_CONTIGUOUS_DC_MAX
Highest preexisting Short Document Character ID allocated before script block allocation (Dc 1928 "End WASM program").
PREEXISTING_CONTIGUOUS_FORMAT_MAX
Highest preexisting Format Short ID allocated before script block allocation (f655 "Add global graph system block most recent").
SHORT_DC_REGION_START
UNIFIED_SCHEMA_HEADER
Canonical 19-column unified CSV schema header shared by all generated tables.

Functions§

assign_and_update_dc_categories
Scans and automatically assigns Short and Global Dc IDs in Document Character category CSV files (src/formats/dcdata/data-src/categories/*.csv).
assign_and_update_format_categories
Scans and automatically assigns Short and Global Dc IDs in Formats category CSV files (src/formats/dcdata/data-src/categories/formats/*.csv).
check_category_csvs_need_no_id_updates
Verifies in memory (without modifying files on disk) that all Document Character and Format category CSV files already have assigned and consistent IDs.
find_repository_root
Discovers the root directory of the ctoolbox repository.
find_repository_root_from
Discovers the root directory of the ctoolbox repository starting from a path.
generate_dc_code
Generates the contents of dc.generated.rs from the system graph in graph_dir.
generate_dc_file
Generates src/formats/dcdata/dc.generated.rs if its contents have changed.
generate_format_id_code
Generates the contents of format_id.generated.rs from the system graph in graph_dir.
generate_format_id_file
Generates src/utilities/format_id.generated.rs if its contents have changed.
generate_merged_csvs
Generates merged DcList.generated.csv, formats.generated.csv, unicode.generated.csv, and all.generated.csv files sharing a common schema, sorted strictly ascending by Dc ID.
is_empty_row
Checks whether an entire row consists solely of empty cells.
is_unassigned_id
Checks whether a raw cell string represents an unassigned ID placeholder.
parse_format_shorthand
Parses a format ID shorthand string, accepting either f<digits> or bare <digits>.
parse_unicode_shorthand
Parses a Unicode shorthand string (u[0-9a-f]+).
read_csv_file
Reads a CSV file returning the header row and data rows.
validate_category_allocations
Validates reservations and proposed assignments in both namespaces without writing files, including duplicate IDs, script ownership, and region bounds.
write_csv_file
Writes a header row and data rows to a CSV file using standard RFC4180 formatting, skipping the disk write if the file already contains identical bytes.