From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s6D0Jqc6002712 for ; Sat, 12 Jul 2014 20:19:52 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s6D0Jqur024494; Sat, 12 Jul 2014 20:19:52 -0400 (EDT) Date: Sat, 12 Jul 2014 20:19:52 -0400 (EDT) Message-Id: <201407130019.s6D0Jqur024494@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: update after recent code changes X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- update after recent code changes Modified Files: -------------- mdocml: man.cgi.8 Revision Data ------------- Index: man.cgi.8 =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man.cgi.8,v retrieving revision 1.3 retrieving revision 1.4 diff -Lman.cgi.8 -Lman.cgi.8 -u -p -r1.3 -r1.4 --- man.cgi.8 +++ man.cgi.8 @@ -37,26 +37,42 @@ At the top of each generated HTML page, displays a search form containing these elements: .Bl -enum .It -A -.Dq Search -button to send a search request from the client to the server, -to be clicked after filling in the following input box(es). -.It -An input box for search queries, expecting an +An input box for search queries, expecting +either a name of a manual page or an .Ar expression using the syntax described in the .Xr apropos 1 manual; filling this in is required for each search. .It -An input box for an optional section number. +A +.Dq Submit +button to send a search request from the client to the server. +.It +A +.Dq Reset +button to undo any changes to the input boxes and the dropdown menus +and reset them to the values contained in the +.Ev QUERY_STRING . +.It +Radio buttons to select pages either by name like in +.Xr man 1 +or using +.Xr apropos 1 +queries. +.It +A dropdown menu to optionally select a manual section. If one is provided, it has the same effect as the +.Xr man 1 +and .Xr apropos 1 .Fl s option. Otherwise, pages from all sections are shown. .It -An input box for an optional architecture name. +A dropdown menu to optionally select an architecture. If one is provided, it has the same effect as the +.Xr man 1 +and .Xr apropos 1 .Fl S option. @@ -67,12 +83,6 @@ If the configuration file .Pa /var/www/man/manpath.conf contains only one manpath, the dropdown menu is not shown. By default, the first manpath given in the file is used. -.It -A -.Dq Reset -button to undo any changes to the input boxes and the dropdown menu -and reset them to the values contained in the -.Ev QUERY_STRING . .El .Ss Program output The @@ -165,77 +175,46 @@ The host name and a following slash. The path to the program, normally .Pa cgi-bin/man.cgi/ . .It -A page name, which can be -.Cm index , -which is the default and can be omitted, -.Cm search , -or -.Cm show . -.It -For -.Cm show -only, a slash, the manpath, another slash, +To show a single page, a slash, the manpath, another slash, and the name of the requested file, for example .Pa /OpenBSD-current/man1/mandoc.1 . .It -For -.Cm search -only, a query string starting with a question mark +For searches, a query string starting with a question mark and consisting of .Ar key Ns = Ns Ar value pairs, separated by ampersands, for example -.Pa ?manpath=OpenBSD-current&expr=mandoc . +.Pa ?manpath=OpenBSD-current&query=mandoc . Supported keys are .Cm manpath , -.Cm expr , +.Cm query , .Cm sec , -and .Cm arch , corresponding to .Xr apropos 1 .Fl M , .Ar expression , .Fl s , -and .Fl S , -respectively. +respectively, and +.Cm apropos , +which is a boolean parameter to select or deselect the +.Xr apropos 1 +query mode. For backward compatibility with the traditional .Nm , -.Cm query -is supported as an alias for -.Cm expr -and .Cm sektion -as an alias for +is supported as an alias for .Cm sec . .El .Sh ENVIRONMENT The web server may pass the following CGI variables to .Nm : .Bl -tag -width Ds -.It Ev CSS_DIR -An optional path to the directory containing the CSS files, -to be specified relative to the server's document root, -and to be specified without a trailing slash. -When not specified, the CSS files -are assumed to be in the document root. -This is used in generated HTML code. .It Ev HTTP_HOST The FQDN of the (possibly virtual) host the HTTP server is running on. This is used for .Ic Location: headers in HTTP 303 responses. -.It Ev MAN_DIR -A path to the -.Nm -data directory to be used instead of -.Pa /man , -relative to the web server -.Xr chroot 2 -directory, to be specified without a trailing slash. -This is prepended to the manpath when opening -.Xr mandoc.db 5 -and manual page files. .It Ev PATH_INFO The final part of the URI path passed from the client to the server, starting after the @@ -300,13 +279,34 @@ source file located below the .Dq OpenBSD-current manpath. .El +.Sh COMPILE-TIME DEFINES +.Bl -tag -width Ds +.It Ev CSS_DIR +An optional path to the directory containing the CSS files, +to be specified relative to the server's document root, +and to be specified without a trailing slash. +When not specified, the CSS files +are assumed to be in the document root. +This is used in generated HTML code. +.It Ev MAN_DIR +A path to the +.Nm +data directory to be used instead of +.Pa /var/www/man , +relative to the web server +.Xr chroot 2 +directory, to be specified without a trailing slash. +This is prepended to the manpath when opening +.Xr mandoc.db 5 +and manual page files. +.El .Sh COMPATIBILITY The .Nm CGI program is call-compatible with queries from the traditional .Pa man.cgi script by Wolfram Schneider. -However, the results may not be quite the same. +However, the output may not be quite the same. .Sh SEE ALSO .Xr apropos 1 , .Xr mandoc.db 5 , -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv