Linux man手册编写

Linux man手册

安装man手册

源码安装

参考:linux下man手册的安装和使用

源码从这里下载

源码中有一份makefile文件,这个正是我想学习到的最终方案之一。

 

使用 “Um”创建和维护你自己的 man 手册

参考:如何创建和维护你自己的 man 手册 | Linux 中国

Linuxbrew:一个用于 Linux 和 MacOS 的通用包管理器。

1.On Ubuntu,Install Linuxbrew:

sudo apt-get update && sudo apt-get install build-essential curl git python-setuptools ruby
sudo apt install linuxbrew-wrapper

2.Once you installed the prerequisites, run the following command to install Linuxbrew.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"

使用sudo apt install linuxbrew-wrapper安装失败,此路暂时不同,错误日志【第三周】

安装Um utility

brew install sinclairtarget/wst/um

在制作man手册之前,需要为Um启用bash补全。


linux下自定义命令的man手册编写

参考链接

1.进入man目录

cd /usr/share/man/man1

2.以命令名建立文件

vi ees.1 
'\" t
.\"     Title: ees
.\"    Author: Huijie Qiao
.\" Generator: 
.\"      Date: 01/25/2019
.\"    Manual: EES Manual
.\"    Source: EES 1.0.0
.\"  Language: English
.\"'\" t
.\"     Title: ees
.\"    Author: Huijie Qiao
.\" Generator: 
.\"      Date: 01/25/2019
.\"    Manual: EES Manual
.\"    Source: EES 1.0.0
.\"  Language: English
.\"
.TH "EES" "1" "01/25/2019" "EES 1\&.0\&.0" "EES Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ees \- EcoEvo Simulator
.SH "DESCRIPTION"
.sp
The EcoEvo Simulator (EES) is a cellular automaton algorithm that can be used to simulate patterns of distribution, speciation, and extinction for virtual species in response to dynamic climate on various spatial and temporal scales. The framework builds on a model first introduced by Qiao et al (2016) in the American Naturalist.
.SH "PARAMETERS"
.sp
1\. configure's base folder, which the application can load the configuration for species and scenario.
.sp
2\. scenario configuration. A JSON format configuration file to set up the parameter of the scenario
.sp
3\. species configuration. A JSON format configuration file to set up the parameter of the species in the simulation.
.sp
4\. result folder. A path to save the result
.sp
5\. memory limit (in MB). A number to set up the maximum memory allocate to the application
.sp
6\. is overwrite. An ZERO value means skip the simulation if the result folder exists and NONE-ZERO value means run the simulation no matter that the folder exists or not.
.sp
7\. with detail. An ZERO value means output the details of the simulation or not.
.SH "EXAMPLE"
.sp
&(APP) /home/lihaoliang/EES_Test scenario.seed_1\.dispersal_good\.nb_medium /home/lihaoliang/EES_Test/Results 64000 1 1
.SH "EES"
.sp
The source code is shared via a subversion repository\. Anyone can download and play with the simulation via svn://mmweb.animal.net.cn/nb_icesheet/trunk
.TH "EES" "1" "01/25/2019" "EES 1\&.0\&.0" "EES Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ees \- EcoEvo Simulator
.SH "DESCRIPTION"
.sp
The EcoEvo Simulator (EES) is a cellular automaton algorithm that can be used to simulate patterns of distribution, speciation, and extinction for virtual species in response to dynamic climate on various spatial and temporal scales. The framework builds on a model first introduced by Qiao et al (2016) in the American Naturalist.
.SH "PARAMETERS"
.sp
1\. configure's base folder, which the application can load the configuration for species and scenario.
.sp
2\. scenario configuration. A JSON format configuration file to set up the parameter of the scenario
.sp
3\. species configuration. A JSON format configuration file to set up the parameter of the species in the simulation.
.sp
4\. result folder. A path to save the result
.sp
5\. memory limit (in MB). A number to set up the maximum memory allocate to the application
.sp
6\. is overwrite. An ZERO value means skip the simulation if the result folder exists and NONE-ZERO value means run the simulation no matter that the folder exists or not.
.sp
7\. with detail. An ZERO value means output the details of the simulation or not.
.SH "EXAMPLE"
.sp
&(APP) /home/lihaoliang/EES_Test scenario.seed_1\.dispersal_good\.nb_medium /home/lihaoliang/EES_Test/Results 64000 1 1
.SH "EES"
.sp
The source code is shared via a subversion repository\. Anyone can download and play with the simulation via svn://mmweb.animal.net.cn/nb_icesheet/trunk

3.生成压缩文件

gzip ees.1

4.使用man指令

man ess

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值