Metadata-Version: 2.5
Name: mdedit
Version: 0.1.0
Summary: A terminal Markdown viewer and editor built with Textual
Project-URL: Homepage, https://github.com/matplo/mdedit
Project-URL: Repository, https://github.com/matplo/mdedit
Author-email: matplo <ploskon@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: editor,markdown,terminal,textual,tui
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Terminals
Classifier: Topic :: Text Editors
Requires-Python: >=3.10
Requires-Dist: rich>=13.7
Requires-Dist: textual[syntax]<9,>=8.2
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: textual-dev; extra == 'dev'
Description-Content-Type: text/markdown

# mdedit

A terminal Markdown viewer and editor, built with
[Textual](https://github.com/Textualize/textual) and
[Rich](https://github.com/Textualize/rich).

Open a `.md` file to a fully rendered view (headings, tables, code blocks,
lists, block quotes...) and press a single key to toggle into a
syntax-highlighted source editor for the same file — then toggle back to see
your changes rendered.

## Install

```bash
pip install git+https://github.com/matplo/mdedit
```

## Usage

```bash
mdedit path/to/file.md   # open (or create) a file
mdedit                   # start with a prompt to open/create a file
```

### Key bindings

| Key      | Action                          |
|----------|----------------------------------|
| `ctrl+t` | Toggle between view and edit mode |
| `ctrl+s` | Save                              |
| `ctrl+r` | Reload from disk                  |
| `ctrl+q` | Quit (prompts if unsaved changes) |

> **Note:** if `ctrl+s` doesn't seem to do anything in your terminal, it may
> be intercepted by terminal flow control (XON/XOFF). Run `stty -ixon` in
> your shell first, or use the Save option from the command palette
> (`ctrl+p`).

## Development

```bash
pip install -e ".[dev]"
pytest
ruff check .
ruff format --check .
```

### Releasing to PyPI

Releases publish automatically via GitHub Actions using
[trusted publishing](https://docs.pypi.org/trusted-publishers/) (no API
token stored anywhere). To cut a release:

1. Bump `__version__` in `src/mdedit/__init__.py`, commit it.
2. Tag and push: `git tag vX.Y.Z && git push origin vX.Y.Z`
3. The `Publish to PyPI` workflow builds the sdist/wheel and uploads them.

## Roadmap

v1 is intentionally scoped to a single-file, toggle-based view/edit
experience. Not yet included (candidates for a future version):

- Always-rendered, true WYSIWYG editing (edit directly on rendered text,
  no separate source view)
- Split-pane side-by-side edit + preview
- Browser-style navigation history, bookmarks, remote/URL loading
- Multiple open files / tabs

## License

MIT
