Use pandoc to generate the man page

This commit is contained in:
Alexander Kojevnikov 2013-08-08 09:21:20 -07:00
parent 254b4890c6
commit 9cb04c1797
5 changed files with 152 additions and 75 deletions

68
MANUAL.md Normal file
View File

@ -0,0 +1,68 @@
% SPEK(1) User's Guide | Version 0.8.2
%
% 2013-04-18
# NAME
Spek - Acoustic Spectrum Analyser
# SYNOPSIS
`spek` [*OPTION* *...*] \[*FILE*]
# DESCRIPTION
*Spek* generates a spectrogram for the input audio file.
# OPTIONS
`-h`, `--help`
: Output the help message then quit.
`-V`, `--version`
: Output version information then quit.
# KEYBINDINGS
## Notes
On OS X use the Command key instead of Ctrl.
## Menu
`Ctrl-O`
: Open a new file.
`Ctrl-S`
: Save the spectrogram as an image file.
`Ctrl-E`
: Show the preferences dialog.
`F1`
: Open online manual in the browser.
`Shift-F1`
: Show the about dialog.
## Spectrogram
`Ctrl-up`, `Ctrl-down`
: Change the lower limit of the dynamic range in dBFS.
`Ctrl-Shift-up`, `Ctrl-Shift-down`
: Change the upper limit of the dynamic range in dBFS.
# FILES
*~/.config/spek/preferences*
: The configuration file for *Spek*, stored in a simple INI format.
# AUTHORS
Alexander Kojevnikov <alexander@kojevnikov.com>. Other contributors are listed
in the LICENCE.md file distributed with the source code.
# DISTRIBUTION
The latest version of *Spek* may be downloaded from <http://spek.cc>.

View File

@ -8,6 +8,7 @@ SUBDIRS = \
EXTRA_DIST = \
INSTALL.md \
LICENCE.md \
MANUAL.md \
README.md \
intltool-extract.in \
intltool-merge.in \
@ -31,14 +32,15 @@ DISTCLEANFILES = \
.PHONY: man upload
man:
man man/spek.1 | man2html -title "Spek @VERSION@ manual" > web/man-@VERSION@.html
pandoc --standalone --to=man --output=man/spek.1 MANUAL.md
pandoc --standalone --to=html --output=web/man-@VERSION@.html MANUAL.md
sed -e 's#<I>\(http://[^<]*\)</I>#<I><a href="\1">\1</a></I>#g' -i '' web/man-@VERSION@.html
sed -e 's#<HEAD>#<HEAD>\
sed -e 's#<head>#<head>\
<style type="text/css">\
body {font-size: 11pt;}\
h1, h2 {font-weight: bold;}\
h1 {font-size: 16pt;}\
h2 {font-size: 12pt;}\
h1, h2, h3 {font-weight: bold;}\
h1 {font-size: 13pt;}\
h2, h3 {font-size: 12pt;}\
</style>#' -i '' web/man-@VERSION@.html
upload:

View File

@ -82,7 +82,6 @@ AC_CONFIG_FILES([
dist/osx/Info.plist
dist/win/spek.wxs
man/Makefile
man/spek.1
po/Makefile.in
src/Makefile
tests/Makefile

77
man/spek.1 Normal file
View File

@ -0,0 +1,77 @@
.TH SPEK 1 "2013\-04\-18" "User\[aq]s Guide" "Version 0.8.2"
.SH NAME
.PP
Spek \- Acoustic Spectrum Analyser
.SH SYNOPSIS
.PP
\f[C]spek\f[] [\f[I]OPTION\f[] \f[I]\&...\f[]] [\f[I]FILE\f[]]
.SH DESCRIPTION
.PP
\f[I]Spek\f[] generates a spectrogram for the input audio file.
.SH OPTIONS
.TP
.B \f[C]\-h\f[], \f[C]\-\-help\f[]
Output the help message then quit.
.RS
.RE
.TP
.B \f[C]\-V\f[], \f[C]\-\-version\f[]
Output version information then quit.
.RS
.RE
.SH KEYBINDINGS
.SS Notes
.PP
On OS X use the Command key instead of Ctrl.
.SS Menu
.TP
.B \f[C]Ctrl\-O\f[]
Open a new file.
.RS
.RE
.TP
.B \f[C]Ctrl\-S\f[]
Save the spectrogram as an image file.
.RS
.RE
.TP
.B \f[C]Ctrl\-E\f[]
Show the preferences dialog.
.RS
.RE
.TP
.B \f[C]F1\f[]
Open online manual in the browser.
.RS
.RE
.TP
.B \f[C]Shift\-F1\f[]
Show the about dialog.
.RS
.RE
.SS Spectrogram
.TP
.B \f[C]Ctrl\-up\f[], \f[C]Ctrl\-down\f[]
Change the lower limit of the dynamic range in dBFS.
.RS
.RE
.TP
.B \f[C]Ctrl\-Shift\-up\f[], \f[C]Ctrl\-Shift\-down\f[]
Change the upper limit of the dynamic range in dBFS.
.RS
.RE
.SH FILES
.TP
.B \f[I]~/.config/spek/preferences\f[]
The configuration file for \f[I]Spek\f[], stored in a simple INI format.
.RS
.RE
.SH AUTHORS
.PP
Alexander Kojevnikov <alexander@kojevnikov.com>.
Other contributors are listed in the LICENCE.md file distributed with
the source code.
.SH DISTRIBUTION
.PP
The latest version of \f[I]Spek\f[] may be downloaded from
<http://spek.cc>.

View File

@ -1,69 +0,0 @@
.\" Copyright (C) 2011-2013 Alexander Kojevnikov <alexander@kojevnikov.com>
.\"
.\" Spek is free software: you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation, either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" Spek is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Spek. If not, see <http://www.gnu.org/licenses/>.
.\"
.TH SPEK "1" "2013-02-24" "Spek @VERSION@" ""
.SH NAME
Spek \- Acoustic Spectrum Analyser
.SH SYNOPSIS
.B spek
[OPTION...] [FILE]
.SH DESCRIPTION
.B Spek
generates a spectrogram for the input audio file.
.SH OPTIONS
.TP
.BR \-h , " --help"
Output the help message then quit.
.TP
.BR \-V , " --version"
Output version information then quit.
.SH KEYBINDINGS
.SS Notes
On OS X use the Command key instead of Ctrl.
.SS Menu
.TP
.B Ctrl-O
Open a new file.
.TP
.B Ctrl-S
Save the spectrogram as an image file.
.TP
.B Ctrl-E
Show the preferences dialog.
.TP
.B F1
Open online manual in the browser.
.TP
.B Shift-F1
Show the about dialog.
.SS Spectrogram
.TP
.BR Ctrl-up , " Ctrl-down"
Change the lower limit of the dynamic range in dBFS.
.TP
.BR Ctrl-Shift-up , " Ctrl-Shift-down"
Change the upper limit of the dynamic range in dBFS.
.SH FILES
.TP
.I ~/.config/spek/preferences
The configuration file for Spek, stored in a simple INI format.
.SH AUTHORS
Alexander Kojevnikov <alexander@kojevnikov.com>. Other contributors are listed
in the LICENCE.md file distributed with the source code.
.SH DISTRIBUTION
The latest version of
.B Spek
may be downloaded from
.IR http://spek\-project.org .