* mu: document mu script command

This commit is contained in:
djcb
2012-10-22 23:13:45 +03:00
parent 77c72d684b
commit 1cd5af399d
4 changed files with 92 additions and 57 deletions

View File

@ -28,7 +28,7 @@ dist_man_MANS = \
mu-mkdir.1 \
mu-remove.1 \
mu-server.1 \
mu-stats.1 \
mu-script.1 \
mu-verify.1 \
mu-view.1 \
mu.1 \

83
man/mu-script.1 Normal file
View File

@ -0,0 +1,83 @@
.TH MU SCRIPT 1 "October 2012" "User Manuals"
.SH NAME
mu script\- run a mu script
.SH SYNOPSIS
.B mu script [options] [--script=<script>] [<pattern>] [-- [script-options]]
.SH DESCRIPTION
\fBmu script\fR is the \fBmu\fR command to list available \fBmu\fR scripts,
and run them. The scripts are implemented in the Guile programming language,
and thus only work if your \fBmu\fR is built with support for Guile. In
addition, many scripts require you to have \fBgnuplot\fR installed.
Without any parameters, \fBmu script\fR lists the available scripts. If you
provide a pattern (regular expression), only the scripts whose name or
one-line description match this pattern, are listed. See the examples below.
\fBmu\fR ships with a number of scripts.
.SH OPTIONS
.TP
\fB\-\-script=\fR\fI<script>\fR
run the given script.
\fB\-\-verbose\fR,\fB\-v\fR
when listing the available scripts, show the long descriptions.
\fB\-\-\fR
all options on the right side of the \fB\-\-\fR are passed to the script.
.SH EXAMPLES
List all available scripts (one-line descriptions):
.nf
$ mu script
.fi
List all available scripts matching \fImonth\fR (long descriptions):
.nf
$ mu script -v month
.fi
Run the \fImsgs-per-month\fR script, and pass it the \fI--textonly\fR
parameter:
.nf
$ mu script --script=msgs-per-month -- --textonly
.fi
.SH RETURN VALUE
\fBmu script\fR returns 0 when all went well, and returns some non-zero error
code when this is not the case.
.SH FILES
You can make your own Scheme scripts accessible throught \fBmu script\fR by
putting them in \fI<muhome>/scripts\fR (which is typically
\fI~/.mu/scripts\fR). It is a good idea to document it using some special
comments in the source code:
.nf
;; INFO: this is my script -- one-line description
;; INFO: (longer description)
;; INFO: --option1=<foo> (describe option1)
;; INFO: etc.
.fi
.SH BUGS
Please report bugs if you find them:
.BR http://code.google.com/p/mu0/issues/list
.SH AUTHOR
Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
.SH "SEE ALSO"
.BR mu(1)

View File

@ -1,51 +0,0 @@
.TH MU VERIFY 1 "October 2012" "User Manuals"
.SH NAME
mu stats\- run statistic on the mu database
.SH SYNOPSIS
.B mu stats [options] [--stat=<statistic>] [<query>]
.SH DESCRIPTION
\fBmu stats\fR is the \fBmu\fR command to get statistics from the \fBmu\fR
database. The statistics are implement in the Guile programming language, and
thus only work if your \fBmu\fR is built with support for Guile. In addition,
you need to have \fBgnuplot\fR installed.
\fBmu stats\fR supports a number of different statistics; running \fBmu
stats\fR without any options, lists the available statistics.
.SH OPTIONS
.TP
\fB\-\-stat=\fR\fI<statistic>\fR
show the results for the given statistic
\fB\-\-textonly\fR
show the statistics in text-only format, even if the environment is
capable of graphics.
\fB\-\-muhome\fR
causes \fBmu\fR to use an alternative directory to
store and read its database and logs. By default, \fI~/.mu\fR is used.
.SH RETURN VALUE
\fBmu stats\fR returns 0 when all went well, and returns some non-zero error
code when this is not the case.
.SH BUGS
Please report bugs if you find them:
.BR http://code.google.com/p/mu0/issues/list
.SH AUTHOR
Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
.SH "SEE ALSO"
.BR mu(1)