5 ms·
Show HN: Textual Markdown – a Markdown “browser” in the terminal
Hi HN,
This is a TUI app which displays interactive Markdown documents. Interactive in the sense that you can scroll code fences / tables / and click links. There's a Table of Contents extracted from the MD, and a very rudimentary browser like forward + back.
I'm thinking it could be the starting point for a variety of hypertext like applications in the terminal.
Very much a work in progress.
- NuSkooler 4y agoI'd love to see this living in the Obsidian.md space. If I could work on my documents in the terminal on some machines while in graphical OS's on others... why yes please.
- quaintdev 4y agoAt what point does the terminal stops being terminal and becomes a GTK window? I guess now we can make full fledged GUIs within modern terminals.
- nmstoker 4y agoYes, so long as the pieces are made from whole characters and align with a character grid. ie you can't vary text size being a few tricks with unicode or figlet and you can't have a popup positioned on a pixel basis. But these aren't essential for a load of basic functionality.
- nmstoker 4y agoIt looks great. I happen to like the styling you choose for the different elements (eg H1, H2 headers etc) but is it fairly straight forward to adjust that styling with Textual CSS? From a quick peek in the widgets.py file it looks like there's a DEFAULT _CSS value set in a lot of them, so maybe there's a way to adjust via that?
- willm 4y agoYeah, you could extend the app class, and provide your own CSS to customize just about anything.
- jack-bodine 4y agoDoes anyone know what MacOS terminal is being used in the demo video and screenshots?
- gm678 4y agoSomewhat relevant previous discussion: "We should have markdown rendered websites": https://news.ycombinator.com/item?id=33548134 https://news.ycombinator.com/item?id=33548134 I think a major pro of browsers serving content in a limited markup language (with Gopher being the extreme example) is that a variety of applications can realistically work with rendering them, without having to offload everything to a web browser. I've been wanting to write a simple markdown renderer so that I can view my notes/todo in a nicer form without having to generate a PDF or open by browser, so I'm very excited to take a look at this codebase later.
- dvas 4y agoLikewise, I have been using Zettelkasten method for my own notes written in markdown on the terminal. Which are then later searched/consumed/linked via search tools like ripgrep and viewed in the terminal. These notes contain diagram code like plantUML/graphviz and mermaid. I have been resorting to also rendering them in ascii to still gain value out of them if viewed from the terminal only. This should complete my setup where diagrams/math rendering and all code could be rendered together. Thanks for sharing!
- giantrobot 4y agoA better solution is just committing to simple HTML which is already supported in browsers. You get all of the free functionality of modern HTML with zero extra work. Markdown lacks the ability to support arbitrary names anchors so it's difficult to provide links to a portion of a document that isn't a heading. It also has no ability to build HTML forms so you don't have any interactivity. It's also extremely limited for embedding media. An application (remote, localhost, or whatever) can spit out HTML5 and get a lot of free functionality with an unmodified browser. HTML5 forms support input types so you get some free input validation. It supports displaying multiple types of media. Browsers also have a lot of accessibility features just built in and available with the appropriate markup. No JavaScript required. Basic HTML is very functional all by itself. Any application wanting to use functionality beyond reading just plain text will run into Markdown's limitations. If most of what people actually want to do is blocked by Markdown's limitations no one will use it which makes the effort a bit pointless.
- leephillips 4y agoNice project. You can also do pandoc -i Readme.md | w3m -T text/html if you need web links, etc., to work. Or if you just want cool, colorful markdown rendering in the terminal, and some management of MD files, but without link following or other interaction, there is glow: https://github.com/charmbracelet/glow https://github.com/charmbracelet/glow
- mysterydip 4y agoI like markdown but wanted a way to look at it in a termial. This looks to fit the bill perfectly, thanks!
- thenthenthen 4y agoOff topic: Wow clicking the video renders a sort of modal window after which my ios 15.5 is completely stuck, can only turn my screen off…and it won’t turn on again… after until 3 seconds. The modal is then closed and can use my device again.
- dceddia 4y agoThat happened to me too, super strange because it looked like the native Safari video player and a plain old embedded mp4 so I don’t know what was going on there.
- TuringTest 4y agoMarkdown supports images, so .md files may have them. What does it show when it finds an image? Does it show the image caption, or the full image link?
- hackerman123469 4y agoASCII ART
- christophilus 4y agoGood terminals support images, so I’d hope this would, too.
- radarsat1 4y agoReminds me of "info" https://linux.die.net/man/1/info https://linux.die.net/man/1/info
- version_five 4y agoThere was another tool mentioned last week in this space: Glow: Render Markdown on the CLI - https://news.ycombinator.com/item?id=33925741 https://news.ycombinator.com/item?id=33925741 As I mentioned at the time, I normally just use Vim to look at markdown in the terminal - the point of markdown is that it's supposed to be easy to read as text, all the more so with syntax highlighting On my wishlist for a tool like this is inline images in the terminal for terminal emulators that support it, eg iterm2
- jerry_tk 4y agoAnd your wish is granted: https://github.com/swsnr/mdcat https://github.com/swsnr/mdcat mdcat can render images in iTerm2, Kiitty or WezTerm It has a few quirks but great piece of software nonetheless.
- version_five 4y agoThanks a lot for sharing, I had not seen this before!
- wan_ala 4y agoThanks for making this! I have been wanting to see something like this but too lazy to make on myself lol.