4

I'm developing a ruby gem, and part of it is a CLI which is installed on the user's system. Is there a way to create a man page for this executable and package it with the gem to be installed?

turnerba
  • 145
  • 1
  • 4
  • Do you particularly want it in man? There are other more popular formats. – sawa Aug 23 '14 at 04:41
  • 1
    I think so. I'm used to being able to type 'man ' and get docs for pretty much any command. Curious, why would I want to use another format? @sawa – turnerba Aug 23 '14 at 04:45

1 Answers1

3

You would write a manpage for a Ruby executable the same way that you would write a manpage for any other program: write it in some markup language and translate to ROFF or just write it directly in ROFF. There is no way to install manpages from RubyGems (what would it do with that on Windows, for example?) but if you want to ship a manpage, you are presumably on some Unix system anyway, pretty much all of which have package management systems that can take care of that for you. So, for Debian or Debian-derived systems, you would distribute it as a .deb, for RedHat, SuSE or derivatives thereof, you would use an .rpm and so on.

Jörg W Mittag
  • 363,080
  • 75
  • 446
  • 653
  • Thanks! I was a little unsure of how it works, that makes sense now. I'm on OS X but I can see about distributing it though some package managers. – turnerba Aug 23 '14 at 17:57