Skip to content

petertzy/markdown-reader

Repository files navigation

Markdown Reader

A clean and intuitive Markdown reader with real-time preview support, dark mode toggle, and drag-and-drop file opening. Compatible with macOS and Windows desktop environments.

Features

  • Real-time preview of Markdown rendered to HTML
  • Dark mode toggle
  • Drag-and-drop support for .md files (requires tkinterdnd2)
  • Built with pure Python and Tkinter — cross-platform
  • Can be bundled as a macOS app using py2app
  • Opens preview automatically and avoids multiple browser tabs for a smoother experience

Editor Overview

Image

Preview Overview

Image

Installation & Usage

1. Clone the repository

git clone https://github.com/petertzy/markdown-reader.git
cd markdown-reader

2. Create a virtual environment (recommended)

python -m venv venv
source venv/bin/activate  # macOS/Linux
# .\venv\Scripts\activate  # Windows (cmd/powershell)

3. Install dependencies

pip install -r requirements.txt

💡 If drag-and-drop doesn't work on macOS, consider using the tkinterDnD2 fork.


Running the Application

python app.py

How to Use

  • Open File: Choose .md file from the “File → Open File” menu
  • Drag-and-Drop: Drag .md files directly into the app window
  • Dark Mode: Toggle via “View → Toggle Dark Mode”
  • Preview: Automatically opens in your web browser, only one tab is opened per session

Packaging as a macOS App (Optional)

To bundle this app as a .app, install py2app and create a setup.py script:

Build the App

rm -rf build dist
python setup.py py2app

The generated app will be located in the dist/ folder. You can launch it by double-clicking. To use it like a regular app, move it to your Applications folder.


Exit the Virtual Environment

deactivate

Submit Changes to Git

git add .
git commit -m "Update"  # Replace "Update" with a meaningful commit message
git push

Technical Details

  • GUI: tkinter, tkinterdnd2
  • Markdown Engine: markdown2
  • HTML Preview: Dynamically generated HTML opened in the default browser
  • Supports drag-and-drop and live preview updates while avoiding multiple browser tabs

License

This project is licensed under a custom license:

  • All contributors have full rights to use, modify, distribute, and use this project for commercial or non-commercial purposes.
  • All other users may use and modify the code for non-commercial purposes only.
  • Commercial use by non-contributors is strictly prohibited without explicit written permission from the project creator.

Please contact the project owner to request commercial licensing.


Contributing

All contributions are welcome, including:

  • Bug reports
  • Feature suggestions
  • Pull requests
  • Documentation improvements

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages