How cycle0/markdown-image-processor works
Project type and purpose
• This is a single‐process, desktop application built in C# using WPF on .NET 6.0.
• Its sole purpose is to scan a folder of Markdown files, fetch remote images into a local “assets” directory, update image links, and report progress/logs via a modern UI.
File structure
• App.xaml / App.xaml.cs & MainWindow.xaml / MainWindow.xaml.cs
→ WPF application entry point and main window UI definitions.
• MarkdownImageProcessor.csproj
→ .NET 6.0 project file declaring dependencies and build targets.
• MarkdownImageProcessor.cs (likely contains core image‐processing logic)
• README.md, LICENSE, .gitignore, app.manifest
→ Documentation, license, source control ignore rules, and Windows manifest.
README for additional insights
• Confirms a WPF UI that displays real-time progress and detailed logs.
• Core features: directory selection, network download of images, path rewriting, local logging.
• Uses only local processing—no external services except HTTP GET for images.
a. Main components:
• UI Layer (WPF):
– MainWindow (View)
– ViewModel / Controller (event handlers, commands)
• Business Logic Layer (Core Processor):
– Markdown Parser & Scanner
– Network Downloader
– Path Updater
– Logger
• File System:
– Input Folder (Markdown files)
– Assets Folder (downloaded images)
– Log File(s)
• .NET Runtime
b. Relationships & interactions:
1. User interacts with WPF UI → triggers “Process” command in ViewModel.
2. ViewModel calls Core Processor API.
3. Processor reads each Markdown file from Input Folder.
4. For each remote image URL → Network Downloader issues HTTP GET → saves to Assets Folder.
5. Path Updater rewrites Markdown to reference local file.
6. Logger writes progress to UI (via data binding) and to disk.
7. Upon completion, UI displays summary.
c. Architectural patterns / design principles:
– MVVM (Model‐View‐ViewModel) for UI separation.
– Single responsibility for parser, network, I/O, and logging modules.
– Event‐driven or callback updates to UI for progress.
– Clear layering: UI ←→ ViewModel ←→ Core Processor ←→ I/O & Network.
d. Key technologies / frameworks:
– .NET 6.0 & C#
– WPF (UI/XAML)
– HttpClient (network)
– System.IO (file system)
– Powershell scripts (build & release automation)