On Fri, Jan 08, 2016 at 12:31:34AM +0200, Adrian Grigore wrote: > On Thu, Jan 7, 2016 at 8:56 PM, Greg Reagle <[email protected]> wrote: > > I find it a real pain to work with things like man page source and markdown > > source and so forth because of the extra steps of making the output/object > > format. > > I have yet to find a solution for markdown. I would really prefer > something with w3m.
To be a *little* bit automated, you can combine the build command and the viewing, and execute 'make Readme.html && w3m Readme.html' if using a Makefile; or 'mkd2html Readme.md && w3m Readme.html' if not using a Makefile; or because w3m can be a filter, 'markdown Readme.md | w3m -T text/html'. The above still leaves a lot to be desired though. To be a little bit more automated, you can use the entr command to automatically watch the file for changes like this: echo Readme.md | entr sh -c 'make Readme.html && w3m Readme.html' or echo Readme.md | entr sh -c 'mkd2html Readme.md && w3m Readme.html' or echo Readme.md | entr sh -c 'markdown Readme.md | w3m -T text/html' Still not ideal, because you have to quit from w3m manually. If you use -dump with w3m you don't have to quit, but you lose formatting and other goodies.
