Code Monkey home page Code Monkey logo

vmd's Introduction

Terminal Markdown Viewer

Render markdown in a terminal! Why? Because although Markdown is still readable as-is, if you use Markdown a lot, it's nice to have something to render it with the proper formatting - with bold text and emphasis, etc.

An example:

A screenshot displaying an example Markdown document, rendered using vmd

Installation

Requires Python 3. Install via pip:

$ sudo pip3 install vmd

Note that some features of the render use Unicode (such as for link indicies), so for now terminals that don't support Unicode (or aren't configured to use Unicode and you don't want to change it, which is fair enough) may experience a few issues. If this is a problem, raise an issue or create a pull request.

Usage

$ vmd file.md

Or via standard in:

$ generate-markdown | vmd --stdin

With less:

$ vmd file.md | less -rc

vmd's People

Contributors

charlespascoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

richarson

vmd's Issues

More speed please

First of all thank you, this is my renderer of choice!

I use it in my TUI file manager but it's a tad slow compared to lowdown so it's used only when I ask for a better preview and I'd rather have a better preview all the time.

I see that you haven't touched this for a while but please do, I'm telling about it to anyone who asks me about a good renderer.

Great Stuff

classy code base, kudos!

Tell me when happy then I link people over to here, from mdv.

Cheers,
Gunther

Images print an error

Instead of printing the placeholder or nothing, it prints a error message.

example.md:

![](http://via.placeholder.com/300)

output:

$ vmd example.md                                                                     
Unhandled tag type 'img' found in document > p


Option to not number lines of blocks

 1 ┃ function validateForm() {
 2 ┃
 3 ┃   let x = document.forms["myForm"]["fname"].value;
 4 ┃

but sometimes I have generated blocks that already include line

Fail to render netsted links

Ninja-IDE's readme also has a nested link that vmd fails to render properly:

[![Ninja-IDE Videos and Screencasts](http://img.youtube.com/vi/xShpNY5w-64/0.jpg)](https://www.youtube.com/channel/UCPopm5397ozfsS8FOSSOWGQ "Ninja-IDE Videos and Screencasts")

It looks like this:

   1.6 Videos

       ¹
     ¹ https://www.youtube.com/channel/UCPopm5397ozfsS8FOSSOWGQ

If I remove the nesting:

[Ninja-IDE Videos and Screencasts](http://img.youtube.com/vi/xShpNY5w-64/0.jpg)(https://www.youtube.com/channel/UCPopm5397ozfsS8FOSSOWGQ "Ninja-IDE Videos and Screencasts")

Then it looks like this:

   1.6 Videos

       Ninja-IDE Videos and Screencasts¹(https://www.youtube.com/channel/UCPopm5397ozfsS8FOSSOWGQ "Ninja-IDE Videos and Screencasts")
     ¹ http://img.youtube.com/vi/xShpNY5w-64/0.jpg

Option to set wrap limit on blocks

As you can see in the screenshot there's plenty of space but vmd wrapped the text

screenshot_2023-06-06_13-03-59

An option to not wrap at all would be best.

I pre-process the MD file and transform the blocks, I'd like my processing to not be overridden by wrapping

Markdown==2.6.8 dependency?

Hello,

I had Markdown 2.6.6 and vmd (without installing) seemed to work just fine.

Now I updated to Markdown 2.6.11 and vmd continued to work just fine.

Is there a reason to require precisely 2.6.8?

I'm going to make a pull request to require 'Markdown>=2.6.8, <3' instead, so at least this issue gets some visibility.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.