I'm trying to create some man pages...actually tutorials in man page format.
The reason behind is, most of the time i work in CLI mode. i also use gui when i want to browse internet/youtube, watch movies or listen to music. Worse than that is, since most of my tutorials/notes that i have created are in Microsoft OneNote format, so not only i have to keep X11, but also in VirtualBox "Win-7 => Office 2010" virtual machine. This has become really frustrating.. work in tty...press <ctrl><alt><f1> and goto GUI...open VirtualBox...open Windows OS...open OneNote...Hit again <ctrl><alt><f2>.. and continue..etc. Not only i'm unable to leave behind Windows OS and x11, but i'm also wasting a lot of time for just switching from this to that and again from that to this...
I solved most of my problems by switching to some of cli applications.
Split terminal => tmux
Browser => links2 -g
Video => cvlc
Music => cmus
Bittorrent => transmission-remote
But i am struck with my notes. so i thought to convert my tutorials and notes in man page format so it will be native to linux and also easy to use as its in man page format. So started my adventure... after learning how to create man pages, i started to create them. NOT SO EASY as i had thought earlier... its so confusing.
After spending first 2-3 hours, I barely managed to complete half the page. Attached is the ScreenShot of incomplete man page. Following is the code for that.
.TH md-manpage 88 "19 October 2013" "CentOS 6.4" "Create Man Pages"
How To Create Man Pages.
How do I create a man page for my shell under Linux / UNIX operating systems?
.SH DEFAULT MAN PAGE LOCATION
The system stores its man pages at \fI/usr/share/man/\fR directory. For example, the directory
\fI/usr/share/man/man1\fR stores man pages for user shell commands. You can view it by typing
the following command:
\fB$ ls -x /usr/share/man/man1\fR
ab.1.gz abrt-action-analyze-backtrace.1.gz abrt-action-analyze-c.1.gz
abrt-action-analyze-python.1.gz abrt-action-generate-backtrace.1.gz abrt-action-generate-core-backtrace.1.gz
abrt-action-save-package-data.1.gz abrt-action-trim-files.1.gz abrt-cli.1.gz
abrt-install-ccpp-hook.1.gz abrt-server.1.gz ac.1.gz
aclocal.1.gz aconnect.1.gz acroread.1.gz
CUSTOM MAN PAGE LOCATION
It is recommended that you store your own man pages in \fI/usr/local/man\fR directory.
You can set man search path in \fB/etc/man.config\fR file:
.B MANPATH /usr/local/man
.SH SOME IMPORTANT MACROS
The options are as follows:
.B \.TH <name> <section> <date> <os> <title>
Title Heading; specify product name, man page section, date, os, and title.
ex: \fB\.TH md-manpage 88 "19 October 2013" "CentOS 6.4" "Create Man Pages"\fR
.B -SH "<text>"
Section Heading; if no blanks in text, quotes are not needed.
ex: \fB\.SH "TITLE"\fR
...If this is what i have to bare with, for just half a page, then its nightmare when i think of what i have to do for my rest of - around 50-60 tuturials and hundreds of notes.
So my question - has anybody dealt with creating many man pages...easily? Then, how to do it? There is no WYSIWYG editor for man pages, as for as i know. i also tried txt2man, but it still needs formatting.
Any help will be much appreciated.