I don't often use pandoc or lynx so might check out glow instead, but I thought some of you might find this approach simpler in case you already have these tools installed.
Hey, you reminded me, I once experimented with pandoc's conversion script- you can write a lua script that handles the different markdown styles - to just output escape sequences for different colors or bold/italics depending on the header level, so that you could just translate the markdown into something prettier in your shell.
Your approach is more sensible, I had fun playing with the lua script though. Pandoc will spit out a reference script that formats the output as html so it it pretty easy to work off of
Rendering markdown in the terminal[1] was also recently added to the Logfile Navigator (https://lnav.org). It was partially inspired by Glow. There are some extra features in lnav's implementation, like a breadcrumb bar so that you can jump to different sections of the document.
(You might question why a log file viewer needs markdown support... It's used mainly to make the builtin help text look nicer. But, it can also be used in other places, like adding comments to log messages and generating reports. It's even used to implement an interactive tutorial[2].)
"Glow works with the Charm Cloud to allow you to store any markdown files in your own private collection." So are we to presume that Charm Cloud is always going to be an intermediary between the user and their private collection? Seems like a vulnerable position place to be when using sensitive info captured in Markdown.
Interesting, I'm a bit concerned about pushing arbitrary things to a third party on just pressing s though. I know there's talk of encryption but still, that's a much bigger thing than just rendering markdown.
Vim already does a lot of this between syntax highlighting and the fact that markdown is designed to be readable as text. I think it's an interesting space though.
One thing that would be cool is image support for terminals that support them.
I'm also curious (tangentially) if there are any terminals that support different fonts and sizes (at the same time)?
I have a very nice tool for checking out the GitHub pull requests I'm assigned to review that uses this to preview the description. Way nicer than anything else I tried in that it can do emojis (not sure if they're encoded as shortcodes or what), tables, etc.
I use that to get the markdown in the list of PRs assigned to me, then I use fzf (fuzzy finder) to choose between them with Glow for the previewing. I think I tried previewing the PR with GH and because it would fetch each PR description anew it wasn't good for arrowing between the PRs like I wanted.
I'd love to see how the markup is actually rendered. The README has an animated gif, but it goes by so fast that I really can't see how anything is rendered. Screenshots would be fine for this purpose, why the bling?
Glow does too much. I don't care about using their cloud, a new pager, or a TUI for that matter. Just render Markdown and let me view it with my pager of choice.
I recently tried it. The CLI works great, but there is one super basic feature missing in the TUI that makes me not want to use it and that is search inside a document. There is already a FR on Github, but it got no attention so far.
I feel like I’ve boomeranged from loving CLI/TUI interfaces to native UI to web/html interfaces, back to native UI and then now I’m all about the TUI/CLI again with musikcube.
on mac, pointing to one file doesn't page the output. I can't get the output paged using `less`, it loses all the formatting and color. starting the TUI (no args) and then choosing the file works fine, however.