System Architecture

graph TB subgraph "User Interface Layer" CLI[CLI Interfacecli.py] Wrapper[Bash Wrappercapcat] PythonWrapper[Python Wrapperrun_capcat.py] end subgraph "Application Layer" Main[Main Applicationcapcat.py] Config[Configurationcore.config] ErrorHandler[Error Handlingcore.error_handling] Progress[Progress Trackingcore.progress] end subgraph "Source Management" SourceFactory[Source Factorycore.source_system.source_factory] SourceRegistry[Source Registrycore.source_system.source_registry] BaseSource[Base Sourcecore.source_system.base_source] subgraph "Source Types" ConfigDriven[Config-Driven SourcesYAML-based] CustomSources[Custom SourcesPython-based] end end subgraph "Processing Pipeline" ArticleFetcher[Article Fetchercore.article_fetcher] MediaProcessor[Media Processorcore.unified_media_processor] ContentFormatter[Content Formattercore.formatter] HTMLGenerator[HTML Generatorhtmlgen/] end subgraph "Core Services" SessionPool[Session Poolcore.session_pool] ImageProcessor[Image Processorcore.image_processor] Downloader[Media Downloadercore.downloader] Utils[Utilitiescore.utils] end subgraph "Output Layer" FileSystem[File System] MarkdownFiles[Markdown Files] MediaFiles[Media Files] HTMLFiles[HTML Files] Logging[Log Files] end %% User interactions CLI --> Main Wrapper --> Main PythonWrapper --> Main %% Application flow Main --> Config Main --> ErrorHandler Main --> Progress Main --> SourceFactory %% Source management SourceFactory --> SourceRegistry SourceRegistry --> BaseSource BaseSource --> ConfigDriven BaseSource --> CustomSources %% Processing flow SourceFactory --> ArticleFetcher ArticleFetcher --> MediaProcessor MediaProcessor --> ContentFormatter ContentFormatter --> HTMLGenerator %% Core services ArticleFetcher --> SessionPool MediaProcessor --> ImageProcessor MediaProcessor --> Downloader ArticleFetcher --> Utils MediaProcessor --> Utils %% Output ContentFormatter --> MarkdownFiles MediaProcessor --> MediaFiles HTMLGenerator --> HTMLFiles ErrorHandler --> Logging Progress --> Logging %% Styling classDef uiLayer fill:#e1f5fe classDef appLayer fill:#f3e5f5 classDef sourceLayer fill:#e8f5e8 classDef processLayer fill:#fff3e0 classDef serviceLayer fill:#fce4ec classDef outputLayer fill:#f1f8e9 class CLI,Wrapper,PythonWrapper uiLayer class Main,Config,ErrorHandler,Progress appLayer class SourceFactory,SourceRegistry,BaseSource,ConfigDriven,CustomSources sourceLayer class ArticleFetcher,MediaProcessor,ContentFormatter,HTMLGenerator processLayer class SessionPool,ImageProcessor,Downloader,Utils serviceLayer class FileSystem,MarkdownFiles,MediaFiles,HTMLFiles,Logging outputLayer

Use the free software Draw.io to clearly visualize the mermaid diagrams.

Copy the mermaid code and from the drop-down menu select: Arrange → Insert → Advanced → Mermaid.

Component Relationships

  • UI Layer

    Entry points for user interaction
  • Application Layer

    Core application logic and coordination
  • Source Management

    Modular source system with auto-discovery
  • Processing Pipeline

    Article content processing workflow
  • Core Services

    Shared utilities and services
  • Output Layer

    File system operations and data persistence