[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK-APPS: Automatic manual page links
--Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Folks, Doubtless some of you have access CGI man -> HTML converters. The FreeBSD project has one at http://www.freebsd.org/cgi/man.cgi. Norm's stylesheets map markup like <citerefentry><refentrytitle>ls</><manvolnum>1</></> to=20 ls(1) in the output. I've just knocked up the following two functions in a customisation for Norm's stylesheets which turn these in to links to the man -> HTML gateway, and I thought they might be useful. ;; Given the name of the manual page, and it's section number, ;; return a string giving the URL to the man -> HTML converter. ;; ;; Modify this as necessary for your gateway. (define ($mancgi-href$ refentrytitle manvolnum) (string-append "http://www.freebsd.org/cgi/man.cgi?" refentrytitle "(" manvolnum ")")) ;; Generate links to the man -> HTML converter for each man page ;; reference. ;; ;; You shouldn't need to modify this. (element citerefentry (let* ((refentrytitle (select-elements (children (current-node)) (normalize "refentrytitle"= ))) (manvolnum (select-elements (children (current-node)) (normalize "manvolnum"))) (href ($mancgi-href$ (data refentrytitle) (data manvolnum)))) (make element gi: "A" attributes: (list (list "HREF" href)) (process-children)))) N --=20 Internet connection, $19.95 a month. Computer, $799.95. Modem, $149.95. Telephone line, $24.95 a month. Software, free. USENET transmission, hundreds if not thousands of dollars. Thinking before posting, priceless. Somethings in life you can't buy. For everything else, there's MasterCard. -- Graham Reed, in the Scary Devil Monastery --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjqzuI8ACgkQk6gHZCw343XhRQCfTBqU8kDm9ybmtLNnP3C5NT/F wQcAnitmG1TsO8gmbdLOEuMLz6RM+i2o =hhqx -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC