1

GitHub - willmcgugan/textual-markdown

 1 year ago
source link: https://github.com/willmcgugan/textual-markdown
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Textual Markdown Browser

This project is an experimental "Markdown browser" for the terminal, built with Textual.

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, code fences with scrollbars, and tables.

Links must be relative 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.

Screen.Recording.2022-12-17.at.08.49.48.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 open a Markdown file:

python -m textual_markdown README.md

Disclaimer

At time of writing, there is less than a week's 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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK