This project is a simple markdown to mdoc (for man pages) converter.
This file will convert a simple markdown file to use mdoc format. This will allow for easier man page creation.
This tool was built to help myself create man pages. I normally keep project notes, documentation in a simple markdown format. I use these notes in my readme's, documentation things, etc. while I am making large decisions about how my program should operate. This utility, I thought, would allow me to keep my notes in a simple markdown format until my project notes/design decisions are more complete and/or ready to be moved to a more formal format (mdoc).
For example, in the design phase of a project I will create a man-page-style-document where I write down my specifications (program arguments, inputs, flags, etc.) and using a simple text file allows me to make large decisions--cut/add--at will.
Example:
# NAME
projectname -- my project to simplify the world.
# SYNOPSIS
projectname mdfile mdocfile
# DESCRIPTION
A long project decription about the proect here.
# OPTIONS
-a
Append a file.
-B
Use backward searching patterns
...Will get converted to:
.Sh NAME
.Nm projectname
.Nd my project to simplify the world.
.Pp
.Sh SYNOPSIS
projectname mdfile mdocfile
.Pp
.Sh DESCRIPTION
A Long project description about the project here.
.Pp
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl a
Append a file.
.Pp
.It Fl B
Use backward searching patterns
...To clone a copy:
$ cd ~/<place>/<you>/<keep>/<your>/<code>
$ git clone git@git:john/md2mdoc.gitThis project uses MAKE to build, install and uninstall.
To build:
$ cd md2mdoc
$ makeTo install:
% doas make installTo uninstall:
% doas make uninstallI have also included a simple configure script which can be used to change the location for the install.
To change the install location you can use something like the following:
% ./configure --prefix=/home/john/bin- Commit each file as changes are made.
- Do not commit files in batch.
- Please prefix all commits with the file you are commiting.
- Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
- Created for my personal use.
- John Kaul