Skip to content

Commit 4de81e0

Browse files
committed
Using txt2man to generate a new manpage
1 parent 410b541 commit 4de81e0

File tree

6 files changed

+112
-120
lines changed

6 files changed

+112
-120
lines changed

configure.ac

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ if test "${GXX}" = ""; then
3232
AC_MSG_ERROR([ERROR: we need a C++ compiler, like g++ or other])
3333
fi
3434
AC_PROG_LIBTOOL
35-
AC_CHECK_PROG(HAS_XMLTO, xmlto, yes, no)
36-
if test x"$HAS_XMLTO" == xno ; then
37-
AC_MSG_ERROR([You need xmlto to build the documentation])
38-
fi
3935

4036
# Check for host platform
4137
AC_CANONICAL_HOST

doc/Makefile.am

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Color Bandwidth Meter (CBM) - display in real time the network traffic speed
33
#
44
# Copyright 2005-2006 Aaron Isotton <aaron@isotton.com>
5+
# Copyright 2019 Joao Eriberto Mota Filho <eriberto@eriberto.pro.br>
56
#
67
# This program is free software; you can redistribute it and/or
78
# modify it under the terms of the GNU General Public License
@@ -19,7 +20,4 @@
1920
#
2021

2122
man1_MANS = cbm.1
22-
EXTRA_DIST = cbm.xml
23-
MOSTLYCLEANFILES = cbm.1
24-
cbm.1: cbm.xml
25-
xmlto man cbm.xml
23+
EXTRA_DIST = $(man_MANS)

doc/cbm.1

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
.\" Text automatically generated by txt2man
2+
.TH cbm 1 "09 Feb. 2019" "cbm-0.2" "display in real time the network traffic speed"
3+
.SH NAME
4+
\fBcbm \fP- display in real time the network traffic speed
5+
\fB
6+
.SH SYNOPSIS
7+
.nf
8+
.fam C
9+
\fBcbm\fP [\fB--help\fP] [\fB--version\fP]
10+
11+
.fam T
12+
.fi
13+
.fam T
14+
.fi
15+
.SH DESCRIPTION
16+
Color Bandwidth Meter (CBM) displays the current traffic on all network devices.
17+
.PP
18+
This program is so simple that it should be self-explanatory.
19+
.SH OPTIONS
20+
.TP
21+
.B
22+
\fB--help\fP
23+
Display some help and exit.
24+
.TP
25+
.B
26+
\fB--version\fP
27+
Display version information and exit.
28+
.SH INTERACTIVE CONTROL
29+
\fBcbm\fP can be controlled with the following keys:
30+
.TP
31+
.B
32+
Up/Down
33+
Select an interface to show details about.
34+
.TP
35+
.B
36+
q
37+
Exit from the program.
38+
.TP
39+
.B
40+
b
41+
Switch between bits per second and bytes per second.
42+
.TP
43+
.B
44+
+
45+
Increase the update delay by 100ms.
46+
.TP
47+
.B
48+
-
49+
Decrease the update delay by 100ms.
50+
.SH AUTHOR
51+
\fBcbm\fP was originally developed by Aaron Isotton <aaron@isotton.com>. You may use it under the
52+
terms of the GNU General Public License, version 2. The original website was
53+
http://www.isotton.com/utils/\fBcbm\fP/
54+
.PP
55+
Currently, source code and newer versions are available at
56+
https://github.com/resurrecting-open-source-projects/\fBcbm\fP
57+
.PP
58+
This manpage was written by Aaron Isotton and updated by Joao Eriberto Mota Filho.

doc/cbm.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
NAME
2+
cbm - display in real time the network traffic speed
3+
4+
SYNOPSIS
5+
cbm [--help] [--version]
6+
7+
DESCRIPTION
8+
Color Bandwidth Meter (CBM) displays the current traffic on all network devices.
9+
10+
This program is so simple that it should be self-explanatory.
11+
12+
OPTIONS
13+
--help Display some help and exit.
14+
15+
--version Display version information and exit.
16+
17+
INTERACTIVE CONTROL
18+
cbm can be controlled with the following keys:
19+
20+
Up/Down Select an interface to show details about.
21+
q Exit from the program.
22+
b Switch between bits per second and bytes per second.
23+
+ Increase the update delay by 100ms.
24+
- Decrease the update delay by 100ms.
25+
26+
AUTHOR
27+
cbm was originally developed by Aaron Isotton <aaron@isotton.com>. You may use it under the
28+
terms of the GNU General Public License, version 2. The original website was
29+
http://www.isotton.com/utils/cbm/
30+
31+
Currently, source code and newer versions are available at
32+
https://github.com/resurrecting-open-source-projects/cbm
33+
34+
This manpage was written by Aaron Isotton and updated by Joao Eriberto Mota Filho.

doc/cbm.xml

Lines changed: 0 additions & 112 deletions
This file was deleted.

doc/create-man.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# Copyright 2015-2019 Joao Eriberto Mota Filho <eriberto@eriberto.pro.br>
4+
# Create a manpage using txt2man command.
5+
#
6+
# This script can be used under BSD-3-Clause license.
7+
8+
TEST=$(txt2man -h 2> /dev/null)
9+
[ "$TEST" ] || { echo -e "\nYou need to install txt2man, from https://github.com/mvertes/txt2man.\n"; exit 1; }
10+
11+
T2M_DATE="09 Feb. 2019"
12+
T2M_NAME=cbm
13+
T2M_VERSION=0.2
14+
T2M_LEVEL=1
15+
T2M_DESC="display in real time the network traffic speed"
16+
17+
# Don't change the following line
18+
txt2man -d "$T2M_DATE" -t $T2M_NAME -r $T2M_NAME-$T2M_VERSION -s $T2M_LEVEL -v "$T2M_DESC" $T2M_NAME.txt > $T2M_NAME.$T2M_LEVEL

0 commit comments

Comments
 (0)