From 94ac6bbeccca6dcf41f4e84d3a71b437929f98df Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Tue, 6 Sep 2016 07:58:17 +0200 Subject: [PATCH] Generate the command list in mmh-intro(7) This implementation does handle the aliases of folder(1) and flist(1), but not the ones of show(1) and new(1). Hence the commands next(1), prev(1), fnext(1), fprev(1) and unseen(1) don't appear on the list. Adjusted some of the short descriptions based on the version in the manual command list. --- .gitignore | 1 + man/Makefile.in | 14 ++++++++++- man/flist.man1 | 2 +- man/gettitles.sh | 18 ++++++++++++++ man/mh-profile.man5 | 2 +- man/mhmail.man1 | 2 +- man/mhpgp.man1 | 2 +- man/mmh-intro.man7 | 67 +++++++-------------------------------------------- man/pick.man1 | 2 +- man/rcvpack.man1 | 2 +- man/refile.man1 | 2 +- man/whatnow2.man1 | 2 +- 12 files changed, 49 insertions(+), 67 deletions(-) create mode 100755 man/gettitles.sh diff --git a/.gitignore b/.gitignore index a0972bd..4b6687d 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ /man/*.8 /man/man.sed /man/mh-chart.man7 +/man/titles[1-8].temp /sbr/Makefile /sbr/*.o /sbr/dtimep.c diff --git a/man/Makefile.in b/man/Makefile.in index 9a27e82..adb0e89 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -76,10 +76,16 @@ all: $(MAN1) $(MAN5) $(MAN7) $(MAN8) mh-chart.man7: $(ALLPROGS) $(srcdir)/mh-chart-gen.sh $(ALLPROGS) >$@ +titles: + $(srcdir)/gettitles.sh 1 >titles1.temp + $(srcdir)/gettitles.sh 5 >titles5.temp + $(srcdir)/gettitles.sh 7 >titles7.temp + $(srcdir)/gettitles.sh 8 >titles8.temp + $(MAN1) $(MAN5) $(MAN7) $(MAN8): man.sed # create the sed file for building man pages -man.sed: Makefile +man.sed: Makefile titles @echo 's,%nmhwarning%,THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.,g' > $@ @echo 's,%nmhversion%,mmh-$(VERSION),g' >> $@ @echo 's,%nmhdate%,$(DATE),g' >> $@ @@ -105,6 +111,11 @@ man.sed: Makefile @echo ' s,%mhl_format%,,g' >> $@ @echo '/%mhl_reply%/r $(top_srcdir)/etc/mhl.reply' >> $@ @echo ' s,%mhl_reply%,,g' >> $@ + @echo '/^%titles1%$$/r titles1.temp' >> $@ + @echo '/^%titles5%$$/r titles5.temp' >> $@ + @echo '/^%titles7%$$/r titles7.temp' >> $@ + @echo '/^%titles8%$$/r titles8.temp' >> $@ + @echo '/^%titles[0-9]%$$/d' >> $@ # ========= INSTALL TARGETS ========= @@ -174,6 +185,7 @@ mostlyclean: clean: mostlyclean rm -f $(MAN1) $(MAN5) $(MAN7) $(MAN8) rm -f man.sed mh-chart.man7 + rm -f titles[0-9].temp distclean: clean rm -f Makefile diff --git a/man/flist.man1 b/man/flist.man1 index a2ba53a..b4ebc7d 100644 --- a/man/flist.man1 +++ b/man/flist.man1 @@ -3,7 +3,7 @@ .\" .TH FLIST %manext1% "%nmhdate%" MH.6.8 [%nmhversion%] .SH NAME -flist, flists \- list the number of messages in given sequence(s) +flist, flists \- list folders with messages in given sequence(s) .SH SYNOPSIS .HP 5 .na diff --git a/man/gettitles.sh b/man/gettitles.sh new file mode 100755 index 0000000..6585edd --- /dev/null +++ b/man/gettitles.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +gettitle() { + sed -n '/^.SH NAME/{n;p;q}' "$1" +} + +for i in *.man"$1" ; do + sed -n ' + /^.SH NAME/{ + n + s/^/^/ + s/\([^ ]*\) \\-/\1('"$1"')~^\\-/ + s/\([^ ]*\), \([^ ]*\)/\1('"$1"'),\n.br\n^ \2/ + p + q + } + ' "$i" +done diff --git a/man/mh-profile.man5 b/man/mh-profile.man5 index cd8e240..dd8196f 100644 --- a/man/mh-profile.man5 +++ b/man/mh-profile.man5 @@ -3,7 +3,7 @@ .\" .TH MH-PROFILE %manext5% "%nmhdate%" MH.6.8 [%nmhversion%] .SH NAME -mh-profile \- user profile customization for the mmh message handler +mh-profile \- user customization for the mmh message handler .SH DESCRIPTION Each user of .B mmh diff --git a/man/mhmail.man1 b/man/mhmail.man1 index 423ddd6..2de3fcb 100644 --- a/man/mhmail.man1 +++ b/man/mhmail.man1 @@ -3,7 +3,7 @@ .\" .TH MHMAIL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%] .SH NAME -mhmail \- send mail +mhmail \- send mail (mailx replacement) .SH SYNOPSIS .HP 5 .na diff --git a/man/mhpgp.man1 b/man/mhpgp.man1 index afc0c10..fc93723 100644 --- a/man/mhpgp.man1 +++ b/man/mhpgp.man1 @@ -3,7 +3,7 @@ .\" .TH MHPGP %manext1% "%nmhdate%" MH.6.8 [%nmhversion%] .SH NAME -mhpgp \- check PGP signatures and decrypt PGP messages using gnupg +mhpgp \- verify and decrypt a message with gnupg .SH SYNOPSIS .HP 5 .na diff --git a/man/mmh-intro.man7 b/man/mmh-intro.man7 index 3ee998e..9ae2c67 100644 --- a/man/mmh-intro.man7 +++ b/man/mmh-intro.man7 @@ -141,7 +141,8 @@ Commands which take a range of message numbers .PP .RS 5 .IP \fI\fR\-\fI\fR 15 -Indicates all messages in the range to , inclusive. The range must be nonempty. +Indicates all messages in the range to , inclusive. +The range must be nonempty. .IP \fI\fR:+\fIN\fR 15 .IP \fI\fR:\-\fIN\fR 15 Up to @@ -176,55 +177,10 @@ commands: .RS 5 .fc ^ ~ .nf -.ta 1.5i -^ali(1)~^\- list mail aliases -^anno(1)~^\- annotate messages -^burst(1)~^\- explode digests into messages -^comp(1)~^\- compose a message -^dist(1)~^\- redistribute a message to additional addresses -^flist(1)~^\- list folders with messages in given sequence(s) -^flists(1)~^\- list all folders with messages in given sequence(s) -^folder(1)~^\- set/list current folder/message -^folders(1)~^\- list all folders -^forw(1)~^\- forward messages -^inc(1)~^\- incorporate new mail -^mark(1)~^\- mark messages -^mhbuild(1)~^\- translate MIME composition draft -^mhl(1)~^\- produce formatted listings of mmh messages -^mhlist(1)~^\- list information about content of MIME messages -^mhmail(1)~^\- send mail (mailx replacement) -^mhparam(1)~^\- print mmh profile components -^mhpath(1)~^\- print full pathnames of mmh messages and folders -^mhpgp(1)~^\- verify and decrypt a message with gnupg -^mhsign(1)~^\- sign or encrypt a message with gnupg -^mhstore(1)~^\- store contents of MIME messages into files -^mmh(1)~^\- initialize the mmh environment -^mmhwrap(1)~^\- invoke mmh commands if they are not in $PATH -^next(1)~^\- show the next message -^packf(1)~^\- pack a folder into mbox format -^pick(1)~^\- select messages by content -^prev(1)~^\- show the previous message -^prompter(1)~^\- prompting editor front end -^rcvdist(1)~^\- asynchronously redistribute new mail -^rcvpack(1)~^\- asynchronously append a message to an mbox file -^rcvstore(1)~^\- asynchronously incorporate new mail -^refile(1)~^\- file messages in other folders -^repl(1)~^\- reply to a message -^rmf(1)~^\- remove folder -^rmm(1)~^\- remove messages -^scan(1)~^\- produce a one line per message scan listing -^send(1)~^\- send a message -^sendfiles(1)~^\- send multiple files and directories in MIME message -^show(1)~^\- display MIME messages -^slocal(1)~^\- asynchronously filter and deliver new mail -^sortm(1)~^\- sort messages -^whatnow(1)~^\- prompting front\-end for send -^whom(1)~^\- list recipients of a message +.ta 1.7i +%titles1% .sp -^ap(8)~^\- parse addresses 822\-style -^dp(8)~^\- parse dates 822\-style -^fmtdump(8)~^\- decode \fImmh\fP format files -^spost(8)~^\- deliver a message +%titles8% .fi .RE .PP @@ -233,21 +189,16 @@ The following man pages describe file formats and concepts: .RS 5 .fc ^ ~ .nf -.ta 1.5i -^mh\-alias(5)~^\- alias file for mmh message system -^mh\-format(5)~^\- format file for mmh message system -^mh\-mail(5)~^\- message format for mmh message system -^mh\-profile(5)~^\- user customization for mmh message system +.ta 1.7i +%titles5% .sp -^mmh(7)~^\- introduction to the mmh message system -^mh\-draft(7)~^\- draft folder facility -^mh\-sequence(7)~^\- sequence specification for mmh message system +%titles7% .RE .SH FILES .fc ^ ~ .nf -.ta \w'%etcdir%/ExtraBigFileName 'u +.ta \w'%etcdir%/FileName 'u ^%bindir%~^contains \fImmh\fR commands ^%etcdir%~^contains \fImmh\fR format files ^%libdir%~^contains \fImmh\fR library commands diff --git a/man/pick.man1 b/man/pick.man1 index 6f5a0ce..e93a0cd 100644 --- a/man/pick.man1 +++ b/man/pick.man1 @@ -3,7 +3,7 @@ .\" .TH PICK %manext1% "%nmhdate%" MH.6.8 [%nmhversion%] .SH NAME -pick \- search for messages by content +pick \- select messages by content .SH SYNOPSIS .HP 5 .na diff --git a/man/rcvpack.man1 b/man/rcvpack.man1 index e444709..288b90c 100644 --- a/man/rcvpack.man1 +++ b/man/rcvpack.man1 @@ -3,7 +3,7 @@ .\" .TH RCVPACK %manext1% "%nmhdate%" MH.6.8 [%nmhversion%] .SH NAME -rcvpack \- append message to mbox file +rcvpack \- asynchronously append message to mbox file .SH SYNOPSIS .HP 5 .na diff --git a/man/refile.man1 b/man/refile.man1 index b19b1c0..2909230 100644 --- a/man/refile.man1 +++ b/man/refile.man1 @@ -3,7 +3,7 @@ .\" .TH REFILE %manext1% "%nmhdate%" MH.6.8 [%nmhversion%] .SH NAME -refile \- file message in other folders +refile \- file messages in other folders .SH SYNOPSIS .HP 5 .na diff --git a/man/whatnow2.man1 b/man/whatnow2.man1 index a9e1a84..f66bfe7 100644 --- a/man/whatnow2.man1 +++ b/man/whatnow2.man1 @@ -3,7 +3,7 @@ .\" .TH WHATNOW %manext1% "%nmhdate%" MH.6.8 [%nmhversion%] .SH NAME -whatnow \- front-end for handling drafts +whatnow2 \- front-end for handling drafts .SH SYNOPSIS .HP 5 .na -- 1.7.10.4