firecrown.fctools.docs_helpers ============================== .. py:module:: firecrown.fctools.docs_helpers .. autoapi-nested-parse:: Helper functions shared by documentation validation tools. Provides common functionality for file/directory validation, JSON loading, and rich console output for code_block_checker, symbol_reference_checker, and generate_symbol_map tools. Functions --------- .. autoapisummary:: firecrown.fctools.docs_helpers.load_json_file firecrown.fctools.docs_helpers.validate_directory_exists firecrown.fctools.docs_helpers.validate_file_exists firecrown.fctools.docs_helpers.print_success firecrown.fctools.docs_helpers.print_error Module Contents --------------- .. py:function:: load_json_file(file_path, error_prefix = 'JSON file') Load and parse a JSON file with error handling. :param file_path: Path to the JSON file :param error_prefix: Prefix for error messages :return: Parsed JSON as dictionary :raises typer.Exit: If file cannot be loaded or parsed .. py:function:: validate_directory_exists(directory, error_prefix = 'Directory') Validate that a directory exists. :param directory: Path to validate :param error_prefix: Prefix for error message :raises typer.Exit: If directory doesn't exist .. py:function:: validate_file_exists(file_path, error_prefix = 'File') Validate that a file exists. :param file_path: Path to validate :param error_prefix: Prefix for error message :raises typer.Exit: If file doesn't exist .. py:function:: print_success(message) Print a success message with green checkmark. :param message: Message to print .. py:function:: print_error(message) Print an error message in red. :param message: Error message to print