Skip to main content

Markdown viewer widgets for Textual

Project description

Textual Markdown Browser

This project is an experiment to see how far I could take the idea of a "Markdown browser" in the terminal, using the Textual framework.

Markdown in the terminal is not unusual, Rich has a decent Markdown renderer, but its output is essentially static. Textual Markdown creates a more dynamic Markdown document you can interact with: there are working links, srollablr code fences, and tables.

Links must be relative only and on the filesystem for now. These could be made to load from the network for a more browser like experience. It is also relatively easy to intercept links and handle them programatically. Opening up custom hypertext like applications.

And finally, there is a TOC (Table Of Contents) extracted from the Markdown, which can be used to navigate the document.

Video

A short video of me playing with the demo Markdown.

https://user-images.githubusercontent.com/554369/208234316-be4e6626-c601-4dca-b8d1-59af9b4d08cd.mov

Screenshots

Screenshot 2022-12-17 at 08 41 58

Screenshot 2022-12-17 at 08 42 33

Screenshot 2022-12-17 at 08 42 38

Try it out

You can install textual-markdown from PyPI in the usual way:

pip install textual-markdown

Here's how you hopen a Markdown file:

python -m textual_markdown README.md

Disclaimer

At time of writing, there is less than a weeks work in this. Which means you may (likely) find bugs.

The future

Some (or all) of this repo will be rolled in to Textual. It may also become a project in its own right. If there is enough interest.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textual_markdown-0.1.1.tar.gz (7.4 kB view hashes)

Uploaded Source

Built Distribution

textual_markdown-0.1.1-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page