Coder Social home page Coder Social logo

mdless's Introduction

mdless

mdless is a utility that provides a formatted and highlighted view of Markdown files in Terminal.

I often use iTerm2 in visor mode, so qlmanage -p is annoying. I still wanted a way to view Markdown files quickly and without cruft.

mdless screenshot

Features

  • Built in pager functionality with pipe capability, less replacement for Markdown files
  • Format tables
  • Colorize Markdown syntax for most elements
  • Normalize spacing and link formatting
  • Display footnotes after each paragraph
  • Inline image display (local, optionally remote) if using iTerm2 2.9+
  • Syntax highlighting when pygmentize is available
  • List headlines in document
  • Display section of the document via headline search

Installation

gem install mdless

Usage

mdless [options] path or cat [path] | mdless

The pager used is determined by system configuration in this order of preference:

  • $GIT_PAGER
  • $PAGER
  • git config --get-all core.pager
  • less
  • more
  • cat
  • pager

Options

-s, --section=TITLE              Output only a headline-based section of 
                                 the input
-w, --width=COLUMNS              Column width to format for (default terminal width)
-p, --[no-]pager                 Formatted output to pager (default on)
-P                               Disable pager (same as --no-pager)
-c, --[no-]color                 Colorize output (default on)
-l, --list                       List headers in document and exit
-i, --images=TYPE                Include [local|remote (both)] images in 
                                 output (requires imgcat and iTerm2, 
                                 default NONE)
-I, --all-images                 Include local and remote images in output 
-h, --help                       Display this screen
-v, --version                    Display version number

mdless's People

Contributors

ttscoff avatar rfdonnelly avatar

Watchers

James Cloos avatar  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.