[HN Gopher] Glow: Render Markdown on the CLI ___________________________________________________________________ Glow: Render Markdown on the CLI Author : behnamoh Score : 56 points Date : 2022-12-09 19:53 UTC (3 hours ago) (HTM) web link (github.com) (TXT) w3m dump (github.com) | kickingvegas wrote: | "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. | naikrovek wrote: | render any markdown you like, charm cloud or not. | | you don't have to use their cloud, but they have one if you | want to, and I'm sure it works nice with their stuff. | kickingvegas wrote: | OTOH, I can already use pygmentize + less (via a .lessfilter) | to render Markdown in the terminal. | https://pygments.org/docs/cmdline/ | dimator wrote: | 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. | | less --version | | less 608 (PCRE2 regular expressions) | 7362398724 wrote: | are you using `less -r` to pass through raw ansi code? | | it also looks like it has a `-p` option for a pager | | > CLI output can be displayed in your preferred pager with the | -p flag. This defaults to the ANSI-aware less -r if $PAGER is | not explicitly set. | dimator wrote: | yes, was using `less -r` | | but `glow -p file.md` is working great! thanks | booi wrote: | 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. | pxc wrote: | I think what I like in a UI _tends_ to be common in TUIs, but | what I enjoy in a UI isn 't necessarily attached to any of the | categories you mention. | | What do you feel is uniquely appealing about UIs in those | different categories that has your excitement pinging between | them? | rpastuszak wrote: | Here's the snippet I'm using: markdown () { | pandoc $1 | lynx -stdin } | | usage: $ markdown README.md | | 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. | xcdzvyn wrote: | But it doesn't have pizzazz! :-) | IanCal wrote: | 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. | version_five wrote: | 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)? | 1-more wrote: | 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. | petepete wrote: | GitHub's command line tool does a pretty good job of this, it | does emoji too. | 1-more wrote: | 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. ___________________________________________________________________ (page generated 2022-12-09 23:00 UTC)