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.

Analyze all three user data files using the same merge reports returned by the public loaders.

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 active user files and exit.

Creates hash files for user/user-colors.json, user/user-filaments.json, and user/user-synonyms.json if they exist, plus discoverable user palettes. Copyable example files are excluded.

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.validate_user_files(json_dir=None)[source]

Validate all active user data files through their production loaders.

Return type:

bool

Parameters:

json_dir (str | None)

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 (Namespace) – Parsed command-line arguments from argparse

Returns:

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

Return type:

bool