Metadata-Version: 2.4
Name: flint-markdown-viewer
Version: 0.1.2
Summary: Flint: A premium terminal-based Markdown viewer with interactive tables, high-res images, and Obsidian-style callouts.
Author: Pratik Munot <munotpratik2009@gmail.com>
License: MIT License
        
        Copyright (c) 2025 pmunot
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/pratik-m/flint
Project-URL: Repository, https://github.com/pratik-m/flint
Project-URL: Issues, https://github.com/pratik-m/flint/issues
Keywords: markdown,tui,textual,viewer,mermaid,obsidian,flint
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Classifier: Topic :: Text Processing :: Markup :: Markdown
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mermaid-py>=0.8.1
Requires-Dist: pillow>=10.4.0
Requires-Dist: platformdirs>=4.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: term-image>=0.7.2
Requires-Dist: textual>=0.86.0
Requires-Dist: textual-image[textual]>=0.8.4
Dynamic: license-file

# 🔥 Flint: The Premium Markdown Viewer

Flint is a premium, terminal-based Markdown viewer built with [Textual](https://textual.textualize.io/). Designed for speed, aesthetics, and a seamless Obsidian-like experience in your terminal.

## 📸 Screenshots

![Screenshot 1](screenshots/screenshot1.png)
_Flint with default Obsidian style_

![Screenshot 2](screenshots/screenshot2.png)
_Retro style theme showcase_

![Screenshot 3](screenshots/screenshot3.png)
_Cyberpunk style theme showcase_

![Screenshot 4](screenshots/screenshot4.png)
_Interactive tables rendered as native Textual DataTable widgets_

![Screenshot 5](screenshots/screenshot5.png)
_High-resolution image rendering with Terminal Graphics Protocol_

![Screenshot 6](screenshots/screenshot6.png)
_Mermaid diagram rendered natively in the terminal_

![Screenshot 7](screenshots/screenshot7.png)
_Obsidian-style callouts with automatic icons_

## ✨ Features

- **📊 Interactive Tables**: Markdown tables are rendered as interactive `DataTable` widgets with row selection, hover effects, and smooth scrolling.
- **🖼️ High-Res Images**: Crystal clear image rendering using the Terminal Graphics Protocol (TGP).
- **🧜 Mermaid Diagrams**: Full support for Mermaid diagrams (flowcharts, sequence diagrams, etc.) rendered directly in the terminal.
- **📝 Obsidian-Style Callouts**: Support for `> [!INFO]` and `> **Type**` callouts with automatic icons and distinct styling.
- **🎨 Visual Styles & Themes**: Multiple built-in styles (**Obsidian**, **Cyberpunk**, **Retro**, **Blueprint**, **Minimal**) and color themes (**Gruvbox**, **Nord**, **Dracula**, etc.).
- **⌨️ Vim-like Navigation**: Navigate with `j/k`, `gg/G`, `Ctrl+U/D` for smooth scrolling.

## 🚀 Installation

### Using `pip`

```bash
pip install flint-markdown-viewer
```

### Using `pipx` (Recommended for CLI tools)

```bash
pipx install flint-markdown-viewer
```

### Using `uv` (Fastest)

```bash
# One-time run
uvx --from flint-markdown-viewer flint your-file.md

# Or install globally
uv tool install flint-markdown-viewer
```

## 📖 Usage

Simply run `flint` followed by the path to your Markdown file:

```bash
flint your-file.md
```

### Key Bindings

| Key                 | Action                                      |
| ------------------- | ------------------------------------------- |
| `q`                 | Quit                                        |
| `j` / `k`           | Scroll Down / Up                            |
| `g` / `G`           | Scroll to Top / Bottom                      |
| `Ctrl+U` / `Ctrl+D` | Scroll Half Page Up / Down                  |
| `Ctrl+P`            | Open Command Palette (Switch Styles/Themes) |

## 🛠️ Configuration

The app follows XDG standards:

- **Config Directory**: `~/.config/textual-md-viewer/`
- **Cache Directory**: `~/.cache/textual-md-viewer/` (images and Mermaid diagrams)

### Styles vs Themes

Flint has a two-layer visual customization system:

**Themes** (Color Schemes): Control the color palette of the app. Examples: `gruvbox`, `nord`, `dracula`, `catppuccin`. These are built into Textual and affect the overall color scheme across the entire interface.

**Styles** (Layout & Formatting): Control the visual layout, spacing, borders, typography, and overall aesthetic. Examples: `Obsidian`, `Minimal`, `Blueprint`, `Retro`, `Cyberpunk`. These are custom TCSS files in `flint/styles/` that define how Markdown elements are displayed.

You can mix and match any theme with any style. Access both via the Command Palette (`Ctrl+P`).

## ⚠️ Known Issues

- **Initial Render**: On first launch, you may need to trigger a mouse move or key press for the content to render properly. This is a known Textual framework issue with async rendering.
- **Style Switching**: Switching between styles may occasionally require reloading the document to fully apply changes.

## 📝 Changelog

See [CHANGELOG.md](CHANGELOG.md) for version history and release notes.

## 🤝 Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

## 📄 License

MIT License. See [LICENSE](LICENSE) for details.

