Socket
Book a DemoInstallSign in
Socket

@elementbound/mdview

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

@elementbound/mdview

View markdown files from your terminal!

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

mdview

View Markdown files in your terminal!

mdview

Features

  • Open Markdown files in your terminal
  • Follow links between the files
  • Unknown files are presented as-is
  • Render images as ASCII grayscales
  • Configure via environment variables

Requirements

  • node.js
  • lynx
  • imagemagick
    • Only needed for image rendering, can be turned off. See configuration

Install

Install lynx and imagemagick with your package manager of choice. For example:

sudo apt install lynx imagemagick

Install mdview from Github, using npm:

npm install -g https://github.com/elementbound/mdview.git

Usage

Open any markdown file with mdview:

mdview README.md

Documentation

This package provides two components - mdview and mdserve.

mdserve is a HTTP server that renders markdown documents as HTML. It includes image conversion logic as well, so images show up in some way.

mdview launches mdserve when needed, and opens the given document in lynx.

Endpoints

URLDescription
/render/{path}Render the file under path as HTML
/pingReturns pong if the server is up
/pidReturns the server's process ID

NOTE: The server only accepts requests from the local machine.

Configuration

The server can be configured via environment variables. Which also means that you can plop your variables in your .bashrc or similar.

For reference, see .env.defaults

Keywords

markdown

FAQs

Package last updated on 06 Oct 2019

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