Is there a Markdown text mode viewer?
Is there a Markdown (.md files) text mode viewer for linux?
I see that there are some with windows, graphical, but I want one that will inherit my terminal colors with the features that these files may have. (= |
what do you want?
syntax highlighting for markdown? i think all IDEs have that. a preview of the html? make yourself a script (*). why in text mode? the whole point of markdown is that it is readable as-is, in text mode. (*) Code:
#!/bin/bash |
Syntax highlighting: good, but I (should) have it already with Vim.
HTML preview: not really. If the point of MD is "readable as is", that would narrow down what I want/imagined to: be able to use its links to other .md files automatically; seeing the formatting instead of the "source code" is nice, but not really necessary (where I have seen it, like *some bold text*). I imagine something similar to what the 'info' command does for documentation, which is browseable (to say the least). Text mode: because I like it, because it should be enough for this. =) |
This thread started because I stumbled in some documentation using Markdown: www.conversejs.org, and felt its format (with Vim, which is usually very good at highlighting several formats) a little clumsy. This documentation does not have cross-file links, but I know that Markdown may have, that is why I mentioned it.
|
Quote:
Quote:
what other .md files? you want clickable links? try my script. or do you want only "half-way" formatting? use a textmode browser with my script. or something else entirely? :scratch: |
But how do I use your script?
Is it "[name of its file] <md filename>" ? And I have a few doubts in it, made here as comments: Code:
#!/bin/bash I imagine that with these questions I will be able to answer your previous post (to this one) and try something (probably after doing something). |
Quote:
Code:
scriptname file.md |
Quote:
Code:
15:42:03 me@there:~ |
^ you're trolling me, right?
|
No, I am not. That is the output that your script has in my computer, right now.
I read your script, trying to understand it, and made a few questions in my post above. You ignored them, which offended me a little. I did what you pointed, and that is the result. I hope someone else will answer the questions I have made. |
:sigh:
ok, you obviously need markdown to parse markdown to html, so just Code:
apt-get install markdown then you need a command line for a browser of your choice to open a local html file. most browsers, you just use "browser file.html". dillo is a graphical browser, but extremely lightweight. i understand you have a wish for doing things non-gui, so just replace dillo with e.g. w3m or links or whatevs. and yes, use /tmp for the queen's sake. |
Thank you, ondoho. I think this post is useful for more people with these confirmations. I added a few comments and formatting and ended with this script:
Code:
#!/bin/bash |
Is /dev/shm cleared at every boot, like /tmp is?
|
Quote:
on your machine: Code:
mount https://lmddgtfy.net/?q=Is%20%2Fdev%...0like%20%2Ftmp |
Quote:
Is /dev/shm cleared at every boot, like /tmp is? /tmp files are deleted automatically when my system reboots, and I do not know if /dev/shm would too. |
Quote:
just try it, type "mount" in a terminal, press enter, and see what you see for /dev/shm and /tmp. enough spoonfeeding. |
I did the mount command, found shm there... but what? Here:
Code:
$ mount Quote:
|
pandoc can convert from markdown to txt and send the output to the console, can't it?
|
|
^ that is a lot of code to view something that is designed to be human-readable anyhow.
|
All times are GMT -5. The time now is 10:20 AM. |