graph LR
CLI_Entry_Point["CLI Entry Point"]
Configuration_Theme_Loader["Configuration & Theme Loader"]
File_Watcher["File Watcher"]
Markdown_Content_Processor["Markdown Content Processor"]
Syntax_Highlighting_Processor["Syntax Highlighting Processor"]
Terminal_ANSI_Formatter["Terminal ANSI Formatter"]
CLI_Entry_Point -- "initiates" --> Configuration_Theme_Loader
CLI_Entry_Point -- "directs" --> Markdown_Content_Processor
CLI_Entry_Point -- "triggers" --> File_Watcher
File_Watcher -- "notifies" --> Markdown_Content_Processor
Configuration_Theme_Loader -- "supplies settings to" --> Markdown_Content_Processor
Configuration_Theme_Loader -- "provides themes to" --> Syntax_Highlighting_Processor
Configuration_Theme_Loader -- "provides themes to" --> Terminal_ANSI_Formatter
Markdown_Content_Processor -- "delegates code blocks to" --> Syntax_Highlighting_Processor
Syntax_Highlighting_Processor -- "returns highlighted code to" --> Markdown_Content_Processor
Markdown_Content_Processor -- "passes processed content to" --> Terminal_ANSI_Formatter
click CLI_Entry_Point href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/terminal_markdown_viewer/CLI_Entry_Point.md" "Details"
The terminal_markdown_viewer project is structured as a pipeline-driven CLI tool for rendering markdown. Its architecture emphasizes a clear flow from user input to terminal output. The CLI Entry Point serves as the initial orchestrator, handling arguments and deciding whether to perform a single render or activate the File Watcher for continuous updates. Markdown content is then ingested by the Markdown Content Processor, which acts as the central rendering engine. This engine integrates with the Configuration & Theme Loader for styling, and offloads syntax highlighting to the Syntax Highlighting Processor. The final, formatted output is then handled by the Terminal ANSI Formatter, which prepares the content for display in the terminal, ensuring a visually rich and responsive user experience. This modular design allows for clear separation of concerns, making the project maintainable and extensible.
CLI Entry Point [Expand]
Handles command-line arguments, initiates rendering or monitoring, and manages overall application flow.
Related Classes/Methods:
Manages application settings and loads visual themes, influencing how markdown is rendered and displayed.
Related Classes/Methods:
mdv/markdownviewer.py:load_configmdv/markdownviewer.py:load_thememdv/markdownviewer.py:set_background
Monitors specified files or directories for changes, triggering re-rendering of markdown content for live updates.
Related Classes/Methods:
Reads markdown content from various sources, parses it, and orchestrates the rendering pipeline, including handling extensions and preparing content for terminal display.
Related Classes/Methods:
mdv/markdownviewer.py:read_mdmdv/markdownviewer.py:mainmdv/markdownviewer.py:extendMarkdownmdv/markdownviewer.py:AnsiPrintExtension
Applies syntax highlighting to code blocks within the markdown content using external libraries like Pygments.
Related Classes/Methods:
Responsible for applying final ANSI escape codes and formatting for display in the terminal, including colors, borders, and text presentation.
Related Classes/Methods: