Metadata-Version: 2.4
Name: marka
Version: 1.0.0
Summary: Lightweight GTK4/libadwaita Markdown viewer and editor for Linux
Author: Hemanth
License-Expression: MIT
Project-URL: Homepage, https://github.com/HemanthGangula/marka
Project-URL: Bug Tracker, https://github.com/HemanthGangula/marka/issues
Project-URL: Source Code, https://github.com/HemanthGangula/marka
Keywords: markdown,gtk4,gnome,editor,viewer,libadwaita
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: X11 Applications :: GTK
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Text Editors
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Markdown<4.0,>=3.5
Requires-Dist: pygments>=2.17
Dynamic: license-file

# Marka

A lightweight, native Linux Markdown viewer and editor built with GTK4 and libadwaita.
Renders Markdown in real time with GitHub-style typography, syntax-highlighted code blocks
via Pygments, and automatic light/dark theme support.

```
[Editor pane]  |  [Live preview pane]
               |
# Hello World  |  <h1>Hello World</h1> (rendered)
               |
**bold** text  |  <b>bold</b> text (rendered)
```

## Features

- Live split-pane preview with GitHub-style CSS
- Syntax highlighting via GtkSourceView 5 (plain-text fallback included)
- Full CommonMark support: tables, task lists, footnotes, fenced code, strikethrough
- Find in document (Ctrl+F)
- Zoom preview (Ctrl+= / Ctrl+-)
- Print preview (Ctrl+P)
- Export rendered document to HTML
- Drag-and-drop file opening
- Recent files history
- Persistent window geometry and last-opened file across sessions
- Respects system light/dark theme via libadwaita

## Installation

### pip (recommended for developers)

```bash
pip install marka
marka
```

### Ubuntu / Debian (PPA)

```bash
sudo add-apt-repository ppa:HemanthGangula/marka
sudo apt update
sudo apt install marka
```

### Flatpak

```bash
flatpak install flathub io.github.HemanthGangula.Marka
flatpak run io.github.HemanthGangula.Marka
```

### Snap

```bash
sudo snap install marka
marka
```

### Manual / from source

```bash
git clone https://github.com/HemanthGangula/marka.git
cd marka

# Install system dependencies (Ubuntu 24.04 Noble)
sudo apt install python3-gi gir1.2-gtk-4.0 gir1.2-adw-1 \
                 gir1.2-webkit-6.0 gir1.2-gtksource-5

# Install Python dependencies
pip install -r requirements.txt

# Run directly
python3 main.py

# Or install via pip in editable mode
pip install -e .
marka
```

## System Requirements

| Component | Minimum |
|-----------|---------|
| Python | 3.10 or later |
| GTK | 4.6 or later (4.10 recommended) |
| libadwaita | 1.x |
| WebKitGTK | 6.0 |
| GtkSourceView | 5 (optional, for editor syntax highlighting) |
| OS | Linux (X11 or Wayland) |

## Keyboard Shortcuts

| Shortcut | Action |
|----------|--------|
| Ctrl+N | New file |
| Ctrl+O | Open file |
| Ctrl+S | Save |
| Ctrl+Shift+S | Save As |
| Ctrl+W | Close window |
| Ctrl+F | Find in preview |
| Ctrl+= | Zoom in preview |
| Ctrl+- | Zoom out preview |
| Ctrl+0 | Reset zoom |
| Ctrl+P | Print |
| Ctrl+Shift+E | Export to HTML |
| F11 | Toggle fullscreen |

## Running Tests

```bash
python3 -m unittest discover -s tests -v
```

## Contributing

Bug reports and pull requests are welcome at
https://github.com/HemanthGangula/marka

Please open an issue before submitting large changes.

## License

MIT License. Copyright (c) 2026 Hemanth.
See the [LICENSE](LICENSE) file for full text.
