Giter Site home page Giter Site logo

mdr's Introduction

mdr

NPM version

Markdown reader with color

Replacement

I'm working on a replacement for this package, this time using the Rust language. It's much quicker to start up. Basic functionality is already there but I'm not quite done with it yet. I would like some feedback if you're interested.

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 -b bar/bar          # Show foo.md from Bitbucket repo
mdr -n mdr                     # Show readme from NPM package
mdr -g mrchimp/mdr -B dev      # Show README.md from the dev branch
                                 of a Github 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
  • Detect italic support?

Screenshot

MDR Screenshot

mdr's People

Contributors

mrchimp avatar

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.