![]() |
Following is a shell script which will aid you in generating a Postscript (print-ready) document containing a concatenation of all of the man pages from HylaFAX. The syntax is: ./manualmaker [filename] If filename is not given, the Postscript is sent to stdout, so that you can direct it to... say... a printer. I'll be the first to admit that the font is small, that it doesn't make perfect use of the full page, and that Courier-Bold isn't a 100% perfectly fixed-width font. Well, I'll let one of you deal with that if it's a big enough issue for you. The MANWIDTH, MANPL, and pitch values were determined by working with it in MS Word, this Postscript development being a later occurance... so it's not perfectly aesthetic, but it's readable, and it gets the job done. It runs on RedHat Linux 7.0... no guarantees about anything else. Lee. ----------------------- #!/bin/sh # This is a script which can be used to generate a contiguous # Postscript-manual for HylaFAX containing all of the man pages # The layout of the HylaFAX man pages makes this a non-trivial # matter. # # This script requires HylaFAX and mpage to be installed. if [ -x /usr/sbin/textfmt ]; then TEXTFMT=/usr/sbin/textfmt; elif [ -x /usr/local/sbin/textfmt ]; then TEXTFMT=/usr/local/sbin/textfmt; else echo "Cannot locate textfmt. Assuming default path."; TEXTFMT=textfmt; fi MANPAGES="choptest \ cid \ config \ cqtest \ destctrls \ dialrules \ dialtest \ doneq \ fax2ps \ faxabort \ faxaddmodem \ faxadduser \ faxalter \ faxanswer \ faxconfig \ faxcover \ faxcron \ faxdeluser \ faxgetty \ faxinfo \ faxmail \ faxmodem \ faxq \ faxqclean \ faxquit \ faxrcvd \ faxrm \ faxsend \ faxsetup \ faxstat \ faxstate \ faxwatch \ hfaxd \ hosts.hfaxd \ hylafax-client \ hylafax-server \ info \ log \ mkcover \ notify \ pagermap \ pagesend \ pagesizes \ pdf2fax \ pollrcvd \ ps2fax \ recvq \ recvstats \ sendfax \ sendpage \ sendq \ sgi2fax \ shutdown \ status \ tagtest \ textfmt \ tiff2fax \ tiffcheck \ tsi \ tsitest \ typerules \ wedged \ xferfaxlog \ xferfaxstats" rm -rf manualmaker.tmp mkdir manualmaker.tmp export MANWIDTH=160 export MANPL=63 for manpage in $MANPAGES; do man $manpage | ul -T dumb > manualmaker.tmp/$manpage.man done for manpage in $MANPAGES; do $TEXTFMT -B -f "Courier-Bold" \ -Ml=1.25in,r=0.00in,t=0.05in,b=0.10in \ -p 8 -r -s na-let manualmaker.tmp/$manpage.man \ > manualmaker.tmp/$manpage.ps done if [ -n "$1" ]; then mpage -o -P- -1 -c manualmaker.tmp/*.ps > $1 else mpage -o -P- -1 -c manualmaker.tmp/*.ps - fi rm -rf manualmaker.tmp ----------------------- ____________________ HylaFAX(tm) Users Mailing List _______________________ To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null