Coder Social home page Coder Social logo

readme-to-man-page's Introduction

npm

readme-to-man-page

Build Status Dependency Status

Turn Markdown README into a good-looking man page.

Bells and whistles on top of the excellent remark-man by @wooorm.

Example

var readme = fs.readFileSync('./README.md', 'utf8');
var pkg = require('./package');

readmeToManPage(readme, {
  name: pkg.name,
  version: pkg.version,
  description: pkg.description,
  section: 'npm',
  manual: 'Node Package Manager'
})
//=> '.TH "README-TO-MAN-PAGE" "npm" "July 2015" "0.1.2" "Node Package Manager"\n.SH "NAME"\n\\f...'

API

readmeToManPage(readme, [opts])

Returns man page as a string.

readme

Type: String

Readme text in Markdown.

Options

No option is required. But the more options are set, the more pleasing the output will be.

  • name — can be inferred from headings.
  • version
  • description
  • date — latest revision date, passed to Date constructor.
  • section — section code (e.g. 1).
  • manual — full section name (e.g. Linux Programmer's Manual).

Related

  • remark-man — compile Markdown to man pages with remark.
  • npm-man — open any package readme from npm as a man page.
  • man-pager — display a man page in the terminal programmatically.

Install

npm install readme-to-man-page

License

MIT

readme-to-man-page's People

Contributors

eush77 avatar

Stargazers

Kidman avatar Athan avatar timelyportfolio avatar Titus avatar

Watchers

timelyportfolio avatar James Cloos avatar  avatar

readme-to-man-page's Issues

Add support for skipping README sections

Hey, thanks for the tool, I use it to automate man page conversion from my README file.

The only issue that I am facing with it right now is that in my README I have some wide tables specifying the description of certain flags. When converted to a man page, they overflow in the terminal and the table layout looks extremely messed up.
If there was somehow an option to skip certain sections of the README so that I can only include the options section and not the tabular description, it will be really helpful.
Or better, if somehow markdown tables could be supported in such a manner that they respect terminal width, then that would be awesome.

Looking forward to your opinion on this.

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.