Skip to content

ikenai-lab/md-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MD Viewer

A lightweight, standalone Markdown viewer for Linux with a modern UI. Built with Python and pywebview.

Features

Core

  • Modern UI - Clean interface with glassmorphism effects and subtle gradients.
  • Dark/Light Themes - New Dark theme with Deep Dark (#222831) background and Teal (#76ABAE) accents.
  • Lightweight - Single binary executable (~65MB), low memory usage.
  • Native Rendering - Uses PyQt5/WebEngine and cmarkgfm for fast, accurate GFM rendering.

Navigation

  • Table of Contents - Auto-generated sidebar from h1/h2/h3 headers.
  • Smooth Scrolling - Animated scroll with easing when clicking TOC entries.
  • Scroll Spy - Active section highlighting in TOC as you scroll.

Content Support

  • Full GFM Support - Powered by cmarkgfm for 100% GitHub-compatible rendering.
  • Lenient Parsing - Lists can interrupt paragraphs (no blank line required), matching GFM behavior.
  • Syntax Highlighting - Monokai-themed code blocks via pygments.
  • Task Lists - Functional checkboxes for - [ ] and - [x].
  • Copy Buttons - Hover over code blocks or tables to copy content.
  • Media Support - Images (PNG, JPG, WebP, SVG, GIF) and Videos (MP4, WebM, OGG).
  • Relative Paths - Automatically resolves relative image/media paths.

Customization

  • Font Selector - Choose from your installed system fonts.
  • CLI & GUI - Open files from terminal or use the built-in file picker.

Installation

Prerequisites

  • Python 3.8+
  • pip and venv

Build & Install

# Clone and enter the directory
git clone <repo-url>
cd md_viewer

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r src/requirements.txt

# Build and install
./build_app.sh
./install.sh

Usage

Command Line

mdview README.md
mdview /path/to/document.md

Development

Running from Source

source venv/bin/activate
python src/main.py [filename.md]

Running Tests

source venv/bin/activate
python -m unittest discover tests

Project Structure

md_viewer/
├── src/
│   ├── main.py          # Main application entry
│   ├── gui/
│   │   ├── index.html   # UI structure
│   │   ├── style.css    # Modern styling
│   │   └── app.js       # Frontend logic
│   └── requirements.txt
├── tests/               # Test suite for rendering and logic
├── build_app.sh         # PyInstaller build script
├── install.sh           # Installation script
└── README.md

Dependencies

  • pywebview - Native webview wrapper
  • cmarkgfm - GitHub Flavored Markdown rendering
  • pygments - Syntax highlighting
  • PyQt5 - Qt backend for webview

Building

./build_app.sh

Output: dist/mdview

License

MIT License

About

A lightweight, standalone Markdown viewer for Linux with a modern UI. Built with Python and pywebview

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors