https://github.com/refi64/mrkd
Write man pages using Markdown, and convert them to Roff or HTML
https://github.com/refi64/mrkd
Last synced: about 1 year ago
JSON representation
Write man pages using Markdown, and convert them to Roff or HTML
- Host: GitHub
- URL: https://github.com/refi64/mrkd
- Owner: refi64
- License: bsd-2-clause
- Created: 2018-03-10T22:03:16.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2022-07-29T23:21:34.000Z (almost 4 years ago)
- Last Synced: 2025-03-16T01:41:26.778Z (over 1 year ago)
- Language: Python
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mrkd
Write man pages using Markdown, and convert them to Roff or HTML.
## Installation
```
$ pip install mrkd
```
## Usage
```
$ mrkd my-file.1.md my-file.1
```
Syntax is `mrkd [options...] input-file output-file`. The name and section number will
automatically be derived from the input file, though you can override them using
`-name my-name` and `-section my-section`, respectively.
Change the format to HTML using `-format html`:
```
$ mrkd my-file.1.md -format html my-file.1.html
```
You can override the HTML template (see `template.html` for an example) using `-template`.
In order to setup HTML links, you can set up an index file like so:
```ini
[Index]
my-page(1)=my-page.1.html
```
Then, when you do the following in your Markdown files:
```
something something (see my-page(1))
```
mrkd will automatically pick up the link and connect it via the index file. Pass it via
the `-index` argument:
```
$ mrkd -f html -index index.ini my-file.1.md my-file.1.html
```
See the `test` directory for an example.