Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mdr

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdr

Read markdown files in the terminal in color

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

mdr

Markdown reader with color

Requirements

  • Node
  • npm (comes bundled with Node)

Installation

Install the mdr command globally

npm install -g mdr

Usage

mdr [file] [[-g github_repo | -b bitbucket_repo] [-B] | -h | -v] [-i] [-s]

The first parameter should be a file name or url. If not provided, this will default to README.md. github_repo and bitbucket_repo should be in the format user/rpo e.g. mrchimp/mdr.

Here are some things you can do:

mdr                            # Show README.md from current directory
mdr foo.md -i                  # Use dark-on-light style
mdr http://example.com/foo.md  # Show foo.md from a the web
mdr -g mrchimp/mdr             # Show README.md from Github repo
mdr foo.md -g bar/bar          # Show foo.md from Bitbucket repo

mdr -h for more help.

Config

Config files are found and parsed by rc. For example put the following content in $HOME/.mdrrc or $HOME/.mdr/config.

{
    "invert": "true"
}

See rc docs for more in-depth instructions.

Notes

Italic and strikethrough aren't widely supported so I've made them coloured as well. They will show as italic and struck through where possible.

Coverage

✔ = Implemented
✘ = Not implemented

  • ✔ Paragraphs / Line Breaks
  • ✔ Headers
  • ✔ Blockquotes
  • ✔ Unordered Lists
  • ✔ Lists
  • ✔ Code Blocks
  • ✔ Code
  • ✔ Horizontal Rules
  • ✔ Links
  • ✔ Emphasis
  • ✔ Strong
  • ✔ Images (outputs [$ALT_TEXT - $TITLE - $URL])
  • ✘ HTML
  • ✘ Nested Blockquotes
  • ✘ Ordered Lists (can't implement due to limitation in Marked)
  • ✘ Nested Lists

Things I might get around to

  • Improve pad() implementation
  • Syntax highlighting for code blocks
  • Make paginatable - output content to less -r or something? Why doesn't this work? Colours get lost.
  • Detect italic support?

Screenshot

MDR Screenshot

Keywords

FAQs

Package last updated on 07 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc