Skip to main content

Heino Reader

CI PyPI Python versions License: MIT Qt for Python

A fast document viewer for markdown files, built with PySide6.

Heino Reader is named after Heino – Heinz Georg Kramm, a German singer who turned his blond mane, black sunglasses and "Blau blüht der Enzian" into a decades-long fixture of German television. Known for constantly reinventing himself, he even covered Rammstein songs. Consider it an homage: dark glasses on, no fuss, just the text.

Heino Reader renders markdown read-only: markdown-it-py (CommonMark plus tables) converts it to HTML, Pygments highlights code blocks, and Qt's rich text engine paints the result with a stylesheet theme. A QtWebEngine backend is available as an opt-in: it is the better but slower renderer with full HTML/CSS fidelity (see Two preview backends). It can be started with a file path, so it can be bound to the .md extension in file managers like Dolphin.

Features

  • CommonMark rendering with a GitHub-style theme: headings, nested lists, tables, block quotes, inline and fenced code with Pygments syntax colors. The theme is a plain stylesheet: src/HeinoReader/preview.css
  • Code blocks and quotes are framed with a border, a background and real inner padding; blocks keep their distance to the text above and below
  • Two preview backends, switchable at runtime (View → Web Engine Preview) or via --renderer qt|web (default qt). The qt backend uses QTextEdit, starts instantly and is limited by Qt's small CSS subset. QtWebEngine is the better but slower renderer: tables, borders and backgrounds follow the CSS exactly, but it has to start Chromium and needs a bigger install. It ships in the optional web extra (pip install "heino-reader[web]", PySide6-Addons from https://pypi.org/project/PySide6-Addons/), because pyside6-addons costs 439 MB installed
  • Fast start: only what is needed is loaded. The Qt preview starts without Chromium, and the whole editor stack (source pane, syntax highlighter, line-number gutter) is created on the first click on Edit mode
  • The start screen shows the app icon and a short guide: open, edit, zoom, remote images and the WebEngine switch
  • Top toolbar with button-style icons: text_decrease and text_increase scale the font size, edit toggles edit mode, exit_to_app closes the window, plus a zoom level indicator (e.g. 130%) that is always visible in the right corner
  • Content is inset and the text column is capped at 760 px and centred, so it never touches the window edges and lines stay readable
  • Standard menu bar: File → Open… / Save / Save As… / Close, View → …, Help → About; saving is enabled in edit mode only
  • Edit mode toggle: splits the window with the markdown source on the left and a live preview on the right (like Ghostwriter); clicking the button again returns to the default preview-only view. Entering edit mode widens the window up to 1200 px (clamped to the usable screen width, so it never grows beyond the display) and leaving it restores the previous size and position
  • Markdown formatting in edit mode: a second toolbar row (bold, italic, underline, strikethrough, inline code, heading dropdown, block quote, bullet and numbered list) appears only while editing; every command also has a keyboard shortcut
  • Insert elements from dialogs: Link (Ctrl+K) wraps the selection in [label](url), Image (Ctrl+Shift+I) picks a file via a chooser and stores it relative to the document, Table (Ctrl+Shift+T) asks for rows and columns and inserts a ready-made skeleton with the first header cell selected
  • The source pane is a real code editor: markdown syntax highlighting, Tab / Shift+Tab indent whole lines, and Enter continues at the text's indentation (so quotes, lists and indented blocks stay aligned); a block quote bar marks lines that start with >
  • Line numbers are optional: View → Line Numbers attaches a gutter on demand; the editor works fine without it
  • Links open with the system default application (xdg-open)
  • Live reload when the opened file changes on disk
  • Relative image and link paths resolve against the markdown file's directory (code blocks stay untouched)
  • Images scale down to the available width (aspect ratio preserved) and refit when the window is resized, so wide images never break the layout
  • Remote images (http(s)) are downloaded asynchronously and cached; View → Load Remote Images turns the network access off, and any image that is disabled or fails to load shows a visible placeholder
  • Drag & drop a markdown file onto the window
  • Only markdown/text files are opened: an image, archive or any other binary dropped on the window is refused with a message instead of being loaded as text (same check for the Open dialog, the command line and a file larger than 10 MB)

Keyboard shortcuts

Viewing:

Shortcut Action
Ctrl++ / Ctrl+- Zoom in / out
Ctrl+0 Reset zoom to 100 %
Ctrl+Q Quit
Ctrl+O Open a file
Ctrl+S Save (edit mode)
Ctrl+Shift+S Save as… (edit mode)
Ctrl+W Close the file

Formatting (edit mode only):

Shortcut Action Markdown
Ctrl+B Bold **…**
Ctrl+I Italic *…*
Ctrl+U Underline <u>…</u>
Ctrl+Shift+X Strikethrough ~~…~~
Ctrl+E Inline code `…`
Ctrl+1 … Ctrl+6 Heading level 1–6 # … ######
Ctrl+Shift+0 Plain paragraph (clears the heading)
Ctrl+Shift+Q Block quote >
Ctrl+Shift+L Bullet list -
Ctrl+Shift+N Numbered list 1.

Insert (edit mode only, each opens a dialog):

Shortcut Action Result
Ctrl+K Link… [label](url)
Ctrl+Shift+I Image… ![alt](path)
Ctrl+Shift+T Table… ready-made table skeleton

Every formatting command is a toggle: applying it to text that already carries the marker removes it again, and each command is a single undo step.

Icons

Toolbar icons are bundled Material Symbols Outlined SVGs (icons/*.svg, Apache License 2.0, © Google) and are rendered with the palette text color, so they stay readable in light and dark themes. If a file is missing, the app falls back to the desktop theme icons.

Two preview backends

Qt text renderer (default) Web Engine preview (optional)
Engine QTextDocument QtWebEngine (Chromium)
Start instant, no Chromium process slower, starts Chromium
HTML/CSS small subset: borders and padding only on table cells, block backgrounds repeat per line full fidelity
Install size pyside6-essentials, ~260 MB plus pyside6-addons, ~440 MB more

The Web Engine preview is the better but slower renderer: switch it on in View → Web Engine Preview or start with --renderer web. It needs the optional PySide6-Addons package:

pip install "heino-reader[web]"

Without it the menu entry stays greyed out, the app falls back to the Qt renderer and says so on stderr — no crash, no hidden download.

Usage

uv run heino-reader path/to/notes.md
uv run heino-reader --renderer web path/to/notes.md   # needs the web extra

uv run python -m HeinoReader path/to/notes.md works as well (the Python package name cannot contain a hyphen). No argument opens the viewer with a short guide.

Install locally (XDG)

Both scripts install into the XDG home and need no root rights. They put the launcher in ~/.local/bin, the desktop entry in $XDG_DATA_HOME/applications and the icon in the XDG icon theme.

With uv (isolated tool environment, no manual virtualenv):

scripts/install-uv.sh              # Qt renderer only, ~260 MB installed
scripts/install-uv.sh --web        # plus QtWebEngine, ~700 MB installed

Without uv (private virtualenv under $XDG_DATA_HOME/heino-reader/venv):

scripts/install.sh                 # Qt renderer only, ~260 MB installed
scripts/install.sh --web           # plus QtWebEngine, ~700 MB installed

The default install stays small on purpose. The app needs only Qt's base modules, which ship in pyside6-essentials (QtCore, QtGui, QtWidgets, QtSvg, QtNetwork). The Web Engine preview needs pyside6-addons, and that package is 439 MB installed — 195 MB of it is libQt6WebEngineCore.so alone. So --web is an explicit choice; without it View → Web Engine Preview is greyed out and the app falls back to the Qt renderer with a note on stderr.

Both scripts also accept --uninstall. Afterwards heino-reader is available on your PATH (when ~/.local/bin is), and you can associate .md files in Dolphin: right-click → Open With → Other Application → Heino Reader, optionally as the default.

Development

Dependencies are managed with uv:

uv sync                        # create .venv and install PySide6 + Heino Reader
uv run heino-reader file.md     # run from the synced environment
uv run python -m pytest        # run the test suite

The app depends on pyside6-essentials only. QtWebEngine lives in pyside6-addons and is exposed as the optional extra web (pip install "heino-reader[web]"), so the plugin is imported on demand only. The dev dependency group pulls in pyside6-addons so the test suite can exercise both backends; the test suite sets the headless Chromium flags itself.

PySide6 is pinned to <6.12: 6.12.0 has a refcount crash in Qt's syntax highlighter that triggers on scrolling, independent of this code. To check whether a newer version still has it, run:

uv run python scripts/check_pyside6_crash.py

Project layout

src/HeinoReader/      the package
  __init__.py           entry point (main) and public re-exports
  window.py             the viewer window: menus, toolbars, edit mode
  icons.py              toolbar icons (Material SVGs, theme fallbacks)
  __main__.py           enables python -m HeinoReader
  preview.css           the preview theme (edit freely)
  render.py             markdown to HTML, path helpers
  webview.py            QtWebEngine preview backend (opt-in, lazy import)
  qtview.py             QTextEdit preview backend (default)
  layout.py             text column geometry
  images.py             remote image loading for the Qt backend
  files.py              file validation (no binary/oversized files)
  settings.py           persistent settings in the XDG config directory
  utils.py              small shared helpers
  editor/               the source markdown editor subsystem
    __init__.py           public API of the subpackage
    source_edit.py        plain-text editor, Tab indent, quote bar
    highlighter.py        markdown syntax highlighting
    line_numbers.py       optional line-number gutter (View menu)
    formatting.py         GUI-free formatting operations on a cursor
    dialogs.py            insert dialogs (link, image, table)
  icons/                bundled Material Symbols SVGs
tests/                pytest + pytest-qt suite
scripts/              install scripts and the PySide6 crash check
main.py               entry point for PyInstaller builds

The editor/ subpackage is self-contained: it imports only Qt and its own sibling modules, never the top-level package, so there are no circular imports. __init__.py re-exports the editor pieces; the editor widget itself is only built when edit mode is opened.

Naming

  • Heino Reader — the product name, with a space: prose, README, UI text, window title, About dialog, Name= in the desktop entry.
  • heino-reader — machine names that cannot hold spaces or capitals: the repository, the PyPI project, the console script, the .desktop file name, the XDG directories (~/.config/heino-reader), the icon name and StartupWMClass.
  • HeinoReader — the Python package and import name only, because a hyphen is not legal in an identifier.
  • HEINO_READER_CONFIG_DIR — the environment variable.

License

MIT, see LICENSE. Copyright (c) 2026 SpotlightOn.

Metadata

Release files for heino-reader 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for heino-reader 0.2.1
File Size Uploaded Provenance Actions
heino_reader-0.2.1.tar.gz 76.3 kB Without provenance Details for heino_reader-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for heino-reader 0.2.1
File Interpreter ABI Platform Actions
heino_reader-0.2.1-py3-none-any.whl Python 3 none any Details for heino_reader-0.2.1-py3-none-any.whl

Total release size: 130.7 kB

Release files / heino_reader-0.2.1.tar.gz

Download URL heino_reader-0.2.1.tar.gz
Size 76.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c82f18b5b754a2ec1cba3cdad8cdec042a837fd586a2883d5ac1070de9caae9b
BLAKE2b-256 checksum
How to use checksums
3ccfcb4816d4d9bb2b6c632020a2b699f3c77114f26ba44c3572d7754cf6a56f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / heino_reader-0.2.1-py3-none-any.whl

Download URL heino_reader-0.2.1-py3-none-any.whl
Size 54.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
389076f182d64ded2bed3c1ca19efd347b4b6bbed1cb080974743d33e0d3a619
BLAKE2b-256 checksum
How to use checksums
55efee53c9c7a9e670ad523d0ad54f2bd8d28551fdfdaedbed1538e6fd8c0f0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for heino-reader 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page