mnemo - Quickstart
Start using mnemo, an elegant hybrid Markdown editor, by understanding its Python and Web-based architecture.
mnemo is a desktop application focused on productivity and typography. It combines the lightness of a web interface (built with Tailwind CSS) with the robustness of Python processing. Unlike heavy Electron-based editors, mnemo leverages the pywebview library.
Seamless Integration
Mnemo shares the native operating system's web engine (WebKit/GTK on Linux) while executing all the heavy lifting of Markdown conversion and direct PDF export within a lightweight Python process.
Requirements & Metadata
- License: MIT
- Environment:
uv(Fast Python Package Manager) - PDF Engine:
wkhtmltopdfvia pdfkit
Stack Composition
Hybrid Architecture (IPC)
The application is divided into two main processes communicating via IPC (Inter-Process Communication). The graphical interface (HTML/JS) captures input, and the backend (Python) handles rendering.
Frontend (JS)
CodeMirror + KaTeX
Backend (Python)
Api Class + Markdown
Features and Shortcuts
The script.js file implements global listeners to optimize workflow. The application is designed to be operated primarily via keyboard.
| Action | Description | Keys |
|---|---|---|
| Open Document | Invokes the native system file dialog via GTK. | Ctrl + O |
| Save Changes | Writes current content to local disk. | Ctrl + S |
| Export to PDF | Processes HTML and generates PDF via wkhtmltopdf. | Ctrl + P |
| Visual Focus: Preview | Switches focus to the formatted preview panel. | Ctrl + ← |
| Visual Focus: Editor | Switches focus to the raw source code panel. | Ctrl + → |
Installation via NPM/UV
Ensure you have Python 3.10+ configured on your system. Use the uv manager for ultra-fast dependency synchronization.
-
1
Prepare Local Dependencies
Install necessary system packages (e.g., Ubuntu/Debian).
sudo apt install wkhtmltopdf curl -LsSf https://astral.sh/uv/install.sh | sh -
2
Clone Repository
Get the code and let
uvcreate the isolated virtual environment based on `uv.lock`.git clone https://github.com/your-username/mnemo.git cd mnemo uv sync -
3
Cache Frontend Libraries
mnemo runs offline. Download CodeMirror, Tailwind, and KaTeX by running the dedicated script.
chmod +x scripts/download_front_libs.sh ./scripts/download_front_libs.sh
Structure and Files
The repository consists of build scripts, a lightweight web interface, and a backend bridging the OS to the webview engine.
Select an item
Click on a file or folder in the tree to the left to understand its role in the application context.