Skip to content

Latest commit

 

History

History
101 lines (57 loc) · 5.67 KB

File metadata and controls

101 lines (57 loc) · 5.67 KB
graph LR
    CLI_Orchestrator["CLI Orchestrator"]
    Input_Parser["Input Parser"]
    Configuration_Manager["Configuration Manager"]
    Markdown_Processing_Dispatcher["Markdown Processing Dispatcher"]
    File_Monitoring_Service["File Monitoring Service"]
    Output_Formatter["Output Formatter"]
    Help_Information_Provider["Help & Information Provider"]
    Environment_Initializer["Environment Initializer"]
    CLI_Orchestrator -- "calls" --> Input_Parser
    CLI_Orchestrator -- "invokes" --> Configuration_Manager
    CLI_Orchestrator -- "initializes" --> Environment_Initializer
    CLI_Orchestrator -- "dispatches control to" --> Markdown_Processing_Dispatcher
    CLI_Orchestrator -- "activates" --> File_Monitoring_Service
    CLI_Orchestrator -- "triggers" --> Help_Information_Provider
    Markdown_Processing_Dispatcher -- "passes processed content to" --> Output_Formatter
    File_Monitoring_Service -- "triggers" --> Markdown_Processing_Dispatcher
Loading

CodeBoardingDemoContact

Details

The mdv (terminal markdown viewer) project is structured around a clear separation of concerns, with a central CLI Orchestrator managing the application's lifecycle and delegating specific tasks to specialized components. The core functionality revolves around processing markdown content for terminal display, supported by input parsing, configuration management, and optional file monitoring.

CLI Orchestrator

The primary entry point and central coordinator for the command-line application. It manages the overall application flow, orchestrates argument parsing, loads configurations, and dispatches control to core functionalities (e.g., markdown processing, file monitoring) based on user input.

Related Classes/Methods:

Input Parser

Dedicated to extracting and interpreting command-line arguments and environment variables. It processes raw input into a structured format, providing a clear and consistent configuration object to the CLI Orchestrator for subsequent decision-making and application flow control.

Related Classes/Methods:

Configuration Manager

Handles loading, parsing, and managing application configurations from various sources (e.g., default settings, user-defined files, environment variables). It provides a unified configuration object to other components.

Related Classes/Methods:

Markdown Processing Dispatcher

Acts as a high-level dispatcher for the core markdown rendering pipeline. It receives parsed input and configuration from the CLI Orchestrator and initiates the sequence of markdown parsing, syntax highlighting, and theming, ultimately utilizing the Output Formatter.

Related Classes/Methods: None

File Monitoring Service

Provides functionality to monitor specified files or directories for changes, triggering the markdown processing pipeline upon detection. This component enables the "live preview" feature.

Related Classes/Methods:

Output Formatter

Responsible for taking the processed markdown content (highlighted and themed) and formatting it for display in the terminal. It handles the final presentation layer.

Related Classes/Methods:

Help & Information Provider

Manages and displays help messages, version information, and lists available themes to the user via the command line.

Related Classes/Methods:

Environment Initializer

Performs initial setup tasks related to the application's environment, such as fixing default encoding for Python 2 compatibility.

Related Classes/Methods: