color_tools.cli_commands.reporting

Reporting and diagnostic utilities for user data and overrides.

Functions for generating override reports and managing hash files for user data integrity.

color_tools.cli_commands.reporting.show_override_report(json_dir=None)[source]

Show detailed report of user overrides and exit.

Analyzes user-colors.json and user-filaments.json to show what core data is being overridden, including conflicts by name and RGB values.

Parameters:

json_dir (str | None) – Optional directory containing JSON files. If None, uses package default.

Return type:

None

color_tools.cli_commands.reporting.generate_user_hashes(json_dir=None)[source]

Generate .sha256 files for all user data files and exit.

Creates hash files for user/user-colors.json, user/user-filaments.json, and user/user-synonyms.json if they exist.

Parameters:

json_dir (str | None) – Optional directory containing data files. If None, uses package default.

Return type:

None

color_tools.cli_commands.reporting.get_available_palettes(json_path=None)[source]

Get list of available palette names from both core and user palettes with color counts.

Parameters:

json_path (Path | str | None) – Optional custom data directory. If None, uses package default.

Return type:

list[tuple[str, int]]

Returns:

Sorted list of tuples (palette_name, color_count). If a palette fails to load, color_count will be -1.

color_tools.cli_commands.reporting.handle_verification_flags(args)[source]

Handle all verification flags and early-exit conditions.

Returns True if the program should exit after verification, False otherwise.

Parameters:

args – Parsed command-line arguments from argparse

Returns:

True if program should exit (verification-only mode or early exit flag)

Return type:

bool