[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: Please review changed man-file of w3m



markus.hiereth@freenet.de wrote:
[...]
>>>        -cookie, -no-cookie
>>> 	      accept and use cookies, neither accept nor use cookies
>> 
>> What's the difference between accepting and using cookies, anyway?
> 
> I assume we need to care for this paragraph of README.cookies 
> 
>     * You can disable cookie on the Option Setting Panel. In this case
>     all cookies are rejected, however, cookies which accepted before
>     disable cookie are used.
> 
> I found out that
> 
>     CLI-option    | is equivalent to 
> ------------------|---------------------------------
>     -cookie       | use_cookie=1 AND accept_cookie=1
>     -no-cookie    | use_cookie=0 AND accept_cookie=0

It makes sense now.  We could express this as

      -cookie, -no-cookie
         use cookies and accept new ones, or do neither

but what I've done below is just avoid mentioning the distinction
between "use" and "accept":

      -cookie, -no-cookie
         turn cookie-handling on or off

[...]
>>>    Options for instant data requests
>> 
>> "Non-persistent data output mode options"?  That's terrible, but it's
>> the best I can think of at the moment.

The word I was failing to remember was "immediate", as in
       Immediate data output mode options
 
[...]
>>>        Conversion of file format and character encoding
>>>        $ cat foo.html | w3m -dump -T text/html -I EUC-JP -O UTF-8 >foo.txt
>> 
>> Ditto (and a UUOC, but I think you can get away with one).
> Now less useless use of code
> 
>> (And the file should be called "???.html"!)
> 
> What name do you propose for the file

Only joking - that was the Japanese kana "fu".

[...]
>> At this point I was idly considering an ERRORS section, and
>> considering the fact that
>> 	     
>> 	     $ w3m http://example.org/nonesuch >/dev/null
>> 
>> exits happily despite getting a 404.  But wait, apparently the IETF
>> set up a server on example.org so that page gets a 200 response!  Now
>> it doesn't work as an example - we would have to use something like
>> "w3m http://ietf.org/nonesuch >/dev/null".
> 
> Do you suggest a section ERRORS to characterize error codes?
> 
> I got echo $? with value 0 for both http://example.org/nonesuch and
> http://ietf.org/nonesuch and
> 
> I got echo $? with value 1 for mistakes like w3m -vM 

Yes, there probably isn't enough to say in an ERRORS section for it to
be worth including.  Any error returns 1, any "successful launch"
returns 0 even if the target isn't accessible.

Okay, by now the changes I'm making are mostly small stylistic changes
which are small enough that I can also manage applying them to the
groff source...

> W3M(1)                                                                  W3M(1)
> 
> 
> 
> NAME
>        w3m - a text based web browser and pager
> 
> SYNOPSIS
>        w3m [OPTION]...  [ file | URL ]...
> 
> DESCRIPTION
>        W3M  is  as  a text based browser which can display local or remote web
                  XX
>        pages as well as other documents. It is able to process HTML tables and
>        frames  but  it  ignores JavaScript and Cascading Style Sheets. W3M can
>        also serve as a general purpose  browser  and  pager  (like  "more"  or
>        "less") for text files named as arguments, passed on standard input, or
>        accessed via the net.
> 
>        W3M organizes its content in buffers or tabs, allowing easy  navigation
>        between.  With  the w3m-img extension installed, W3M can display inline
               ^them
>        graphics in web pages. And whenever W3M's HTML  rendering  capabilities
>        do  not meet your needs, the target URL can be handed over to a graphi-
>        cal browser with a single command.
> 
>        For help with runtime options, press "H" while running W3M.
> 
> 
> ARGUMENTS
>        When given one or more command line arguments, W3M will attempt to work
>        out  the  MIME  type before deciding how to handle it. Web URLs provide
              ^^^
Say "the target's" (thus allowing singular "it").

>        W3M with content-type headers; for relative  or  absolute  file  system
>        paths, W3M relies on filenames.
> 
>        With  no argument, W3M expects data from STDIN and assumes "text/plain"
>        unless another MIME type is given by the user.
> 
>        If provided with no target and no fallback  target  (see  for  instance
>        option -v below), W3M will exit with usage information.
> 
> OPTIONS
>        Command line options are introduced with a single "-" character and may
>        take an argument.

This may need to be "\-" in the nroff to avoid the lintian error
"hyphen-used-as-minus-sign".  But if so you probably needs to replace
every case of whitespace+hyphen, and I haven't tried to do that.
 
>    to tune W3M

That doesn't really exclude anything.  Oh, I see there's a comment
"generic textual-UI options".  I still can't think of a good
intelligible way to say "textual-UI", but how about:
     General UI options:
or just
     General options:

>        -B     with no other target defined, W3M uses  the  bookmark  page  for
>               startup

For syntactic consistency
         -B     with no other target defined, use the bookmark page for startup
and likewise for -v.

> 
>        -M     monochrome display
> 
>        -no-mouse
>               deactivate mouse support
> 
>        -num   display each line's number
> 
>        -N     distribute  multiple command line arguments to tabs. By default,
>               a stack of buffers is used.
                                          ^
For consistency I'm removing final periods.
 
>        -ppc N width of N pixels per character. Range of 4.0 to  32.0,  default
>               8.0.   Larger  values will make tables narrower. (Implementation
>               not verified)
> 
>        -ppl N height of N pixels per line. Range of 4.0 to 64.0.  (Implementa-
>               tion not verified)
> 
>        -title, -title=TERM
>               use  the  buffer  name  as terminal title string. With specified
>               TERM, this sets the title configuration style accordingly
> 
>        -v     with no other target defined, W3M welcomes users with a built-in
>               page
> 
>        -W     toggle wrapping in searches
> 
>        -X     do not initialize/deinitilize the terminal
                                       ^
Still misspelling "deinitiAlize".

> 
>        +N     go  to  line  N;  only effective for N larger than the number of
>               lines in the terminal

Use "num" rather than "N" throughout to reduce the similarity between -N
and +N (and make it parallel to "string" etc).

> 
>    to tune W3M's behaviour as browser
                          ^
That's en_GB; we're standardising on en_US.  I'd like to say "Internet
browser options", but that's probably too fussy; just make it
     Browser options:

>        -cols N
>               with STDOUT as destination; HTML is rendered to lines of N char-
>               acters
> 
>        -cookie, -no-cookie
>               accept and use cookies, neither accept nor use cookies

                turn cookie-handling on or off
> 
>        -header string
>               Append  string  to  the  HTTP(S)  request. Expected to match the
>               header syntax  Variable: Value

Standardise on initial lowercase: "append".

"H" has come out of alphabetical order.

>        -F     render frames
> 
>        -graph, -no-graph
>               use or do not use graphic characters for drawing HTML table  and
>               frame borders
> 
>        -m     Internet  message  mode,  taking message headers into account to
>               determine content-type (Implementation not verified)
> 
>        -no-proxy
>               do not use proxy
> 
>        -post file
>               use POST method to upload data defined in file. The syntax to be
>               used is var1=value1[&var2=value2]...
> 
>        -4     IPv4 only (equivalent to -o dns_order=4)
> 
>        -6     IPv6 only (equivalent to -o dns_order=6)
> 
>    to tune W3M's behaviour as pager
                          ^
     Text pager options:

>        -l N   number  of  lines preserved internally when receiving plain text
>               from STDIN (default 10 000)
> 
>        -r     use caret notation to display special escape characters (such as
>               ANSI  escapes  or nroff-style backspaces for bold and underlined
>               characters) instead of processing them
> 
>        -s     squeeze multiple blank lines into one
> 
>        -t N   set tab width to N columns. No effect on STDOUT
> 
>    to control the treatment of input and the generation of output data

Ugh.  Could we just say "Format options"?  Or, I don't know:
     Data format options:
     Data handling options:
     Data type/encoding options:
None of them are good, but I'll settle for that last one.

>        -I charset
>               user defined character encoding of input data
> 
>        -O charset
>               user defined character encoding of output data
> 
>        -T type
>               explicit characterization of input data by MIME type
> 
>    to process or to request for data; immediate exit thereafter

Hard to follow.  If we need to include the "and it exits" bit,

     Options for data output (with immediate exit):

>        -dump  dump rendered page into STDOUT. "|" for pipe and ">"  for  redi-
>               rection of output set this option implicitly

So do >> and >| and $(w3m) and so on, so let's avoid replicating
bash(1) here:

         -dump  dump rendered page into STDOUT. Set implicitly when
                output is directed to a file or pipe
> 
>        -dump_source
>               dump the page's source code into STDOUT
> 
>        -dump_head
>               dump response of a HEAD request for a URL into STDOUT
> 
>        -dump_both
>               dump HEAD, and source code for a URL into STDOUT
> 
>        -dump_extra
>               dump  HEAD,  source  code,  and extra information for a URL into
>               STDOUT

Oh, these are out of strict alphabetical sequence, but they're more
intelligible in this order so I'll leave them.

> 
>        -help  show a summary of compiled-in and runtime options

If we're calling the things like "enter to follow a link" "runtime
options" then these ones should be called something else.  And really
for the end user the "compiled-in options" aren't options - say:

         -help  show a summary of compiled-in features and command line options

> 
>        -show-option
>               show all available config options
> 
>        -version
>               show the version of W3M
> 
>    to override default settings and resources

Just fitting this into my noun-phrasey subheading style:
     Options for overriding default settings and resources:

>        -bookmark file
>               use file instead of the default bookmark.html file
> 
>        -config file
>               use file instead of the default config file
> 
>        -debug DO NOT USE
> 
>        -o option=value
>               modify one configuration item with an explicitely given value
                                                              X
What is it about the "-plicit" words that makes them so unspellable?
 
>        -reqlog
>               log headers of HTTP communication in file ~/.w3m/request.log
> 
> EXAMPLES
>        Pager-like usage
>               Combine snippets of html code and preview the page
                                    HTML

>                $ cat header.html footer.html | w3m -T text/html
>               Compare two files using tabs
>                $ w3m -N config.old config
> 
>        Browser-like usage
>               Display web content in monochrome terminal
>                $ w3m -M http://w3m.sourceforge.net
>               Display embedded graphics
>                $ w3m -o auto_image=TRUE http://w3m.sourceforge.net
>               Display content from usenet

Capitalised "Usenet" or even "USENET".

>                $ w3m -m nntp://$NEWSSERVER/debian_curiosa/
>               Upload data for a URL using the POST method
>                $ w3m -post - http://data.com/pit.php <<< 'text=abc&count=123'

I try to avoid using "randomexample.com" sites, because they always
turn out to exist (and why "pit.php"?); if it's not a real site it's
usually best to use the canonical site for examples:

                 $ w3m -post - http://example.com/form.php <<< 'text=abc&count=123'

But now it's getting too long for the line... I'll do a bit of
squeezing.
 
>        Filter-like usage
>               Convert an HTML file to a plain text file with  a  defined  line
>               length
>                $  w3m -dump -cols 40 foo.html >foo.txt

Useless use of -dump.  Either

                Output an HTML file as plain text with a defined line length
                 $ w3m -dump -cols 40 foo.html

(but perhaps that's stretching the "filter-like") or just

                Convert an HTML file to plain text with a defined line length
                 $ w3m -cols 40 foo.html > foo.txt

>               Convert a web page to text with appended links
>                $  w3m  -o  display_link_number=1  http://w3m.sourceforge.net >
>               index.txt
>               Conversion of file format and character encoding
>                $  w3m -T text/html -I EUC-JP -O UTF-8 < foo.html > foo.txt
> 
>        Start with no input
>                $ w3m -v
> 
> 
> 
> ENVIRONMENT
>        LANG   Localize to language and country
> 
>        SHELL  Shell
> 
>        TERM   Terminal

None of these say anything that isn't already obvious; I'm not sure
when W3M ever uses TMPDIR.

 
>        TMPDIR Temporary data file
                Directory for temporary files
> 
>        WWW_HOME
>               Defines a fallback target if W3M is  invoked  with  no  data  to
>               process

Once it's down to a list of one item we really have to make it a
sentence!

         W3M recognises the environment variable WWW_HOME as defining
	 a fallback target for use if it is invoked without one.
> 
> FILES
>        ~/.w3m/config
>               user defined configuration file, overrides $/etc/w3m/config

Residual "$".
 

>        ~/.w3m/keymap
>               user defined key bindings; overrides default key bindings
> 
>        ~/.w3m/menu
>               user defined menu, overrides default menu
> 
>        ~/.w3m/mouse
>               user defined mouse settings
> 
>        ~/.w3m/mailcap
>               external viewer configuration file
> 
>        ~/.w3m/mime.types
>               MIME types file
> 
>        ~/.w3m/cookie
>               cookie jar; written on exit, read on launch
> 
>        ~/.w3m/history
>               browser history - visited files and URLs
> 
>        ~/.w3m/passwd
>               password and username file
> 
>        ~/.w3m/pre_form
>               contains predefined values to fill recurrent HTML forms
> 
>        ~/.w3m/bookmark.html
>               default bookmark file

Should we alphabeticise these too?
 
> NOTES
>        This is the W3M 0.5.3 Release.
> 
> SEE ALSO
>        README  and  example files are to be found in the doc directory of your
>        W3M installation. Recent information about W3M  may  be  found  on  the
>        project's web pages at http://w3m.sourceforge.net
> 
> ACKNOWLEDGMENTS
>        W3M has incorporated code from several sources.  Users have contributed
>        patches and suggestions over time.
> 
> AUTHOR
>        Akinori ITO <aito@fw.ipsj.or.jp>
> 
> 
> 
> 4th Berkeley Distribution         2014-11-09                            W3M(1)

Okay, it's beginning to look good.
-- 
JBR	with qualifications in linguistics, experience as a Debian
	sysadmin, and probably no clue about this particular package
.nr N -1
.nr D 5
.TH W3M 1 "2014-11-09"
.UC 4
.SH NAME
w3m \- a text based web browser and pager
.SH SYNOPSIS
w3m [OPTION]...  [ \fIfile\fP | \fIURL\fP ]...
.SH DESCRIPTION
.\".\" This defines appropriate quote strings for nroff and troff
.\".ds lq \&"
.\".ds rq \&"
.\".if t .ds lq ``
.\".if t .ds rq ''
.\".\" Just in case these number registers aren't set yet...
.\".if \nN==0 .nr N 10
.\".if \nD==0 .nr D 5

\fIW3M\fP is a text based browser which can display local or remote
web pages as well as other documents. It is able to process HTML
tables and frames but it ignores JavaScript and Cascading Style
Sheets. \fIW3M\fP can also serve as a general purpose browser and
pager (like "more" or "less") for text files named as arguments,
passed on standard input, or accessed via the net.

\fIW3M\fP organizes its content in buffers or tabs, allowing easy
navigation between them. With the w3m-img extension installed, W3M can
display inline graphics in web pages. And whenever \fIW3M's\fP HTML
rendering capabilities do not meet your needs, the target URL can be
handed over to a graphical browser with a single command.

For help with runtime options, press "H" while running \fIW3M\fP. 
.SH ARGUMENTS

When given one or more command line arguments, \fIW3M\fP will attempt
to work out the target's MIME type before deciding how to handle it. Web URLs
provide \fIW3M\fP with content-type headers; for relative or absolute
file system paths, \fIW3M\fP relies on filenames.

With no argument, \fIW3M\fP expects data from STDIN and assumes
"text/plain" unless another MIME type is given by the user.

If provided with no target and no fallback target (see for instance
option -v below), \fIW3M\fP will exit with usage information.
.SH OPTIONS
Command line options are introduced with a single "-" character and
may take an argument.
.SS
General options:
.TP
\fB-B\fP
with no other target defined, use the bookmark page for startup
.TP
\fB-M\fP
monochrome display
.TP
\fB-no-mouse\fP
deactivate mouse support
.TP
\fB-num\fP
display each line's number
.TP
\fB-N\fP
distribute multiple command line arguments to tabs. By default, a
stack of buffers is used
.TP 
\fB-ppc \fInum\fR
width of num pixels per character. Range of 4.0 to 32.0, default 8.0.
Larger values will make tables narrower. (Implementation not verified)
.TP
\fB-ppl \fInum\fR
height of num pixels per line. Range of 4.0 to 64.0. (Implementation not verified)
.TP
\fB-title\fP, \fB-title=TERM\fP
use the buffer name as terminal title string. With specified TERM,
this sets the title configuration style accordingly
.TP
\fB-v\fP
with no other target defined, welcome users with a built-in page
.TP
\fB-W\fP
toggle wrapping in searches
.TP
\fB-X\fP
do not initialize/deinitialize the terminal
.TP
\fB+\fInum\fR
go to line num; only effective for num larger than the number of lines in the terminal
.SS
Browser options:
.\"to tune browser-like usage
.\"Internet browser mode options
.TP
\fB-cols \fInum\fR
with STDOUT as destination; HTML is rendered to lines of num characters
.TP
\fB-cookie\fP, \fB-no-cookie\fP
turn cookie-handling on or off
.TP
\fB-F\fP
render frames
.TP
\fB-graph\fP, \fB-no-graph\fP 
use or do not use graphic characters for drawing HTML table and frame borders
.TP
\fB-header \fIstring\fR
append string to the HTTP(S) request. Expected to match the header syntax \fC Variable: Value\fP
.TP
\fB-m\fP
Internet message mode, taking message headers into account to
determine content-type (Implementation not verified)
.TP
\fB-no-proxy\fP
do not use proxy
.TP
\fB-post \fIfile\fR
use POST method to upload data defined in file. The syntax to be used is var1=value1[&var2=value2]...
.TP
\fB-4\fP
IPv4 only (equivalent to -o dns_order=4)
.TP
\fB-6\fP
IPv6 only (equivalent to -o dns_order=6)
.SS
Text pager options:
.TP
\fB-l \fInum\fR
number of lines preserved internally when receiving plain text from
STDIN (default 10 000)
.TP
\fB-r\fP
use caret notation to display special escape characters (such
as ANSI escapes or nroff-style backspaces for bold and underlined
characters) instead of processing them
.TP
\fB-s\fP
squeeze multiple blank lines into one
.TP
\fB-t\fP \fInum\fP
set tab width to num columns. No effect on STDOUT
.SS
Data type/encoding options:
.TP
\fB-I \fIcharset\fR
user defined character encoding of input data
.TP
\fB-O \fIcharset\fR
user defined character encoding of output data
.TP
\fB-T \fItype\fR
explicit characterization of input data by MIME type
.\".SS
.\"to address special targets / Command line options for a special startup
.\".TP
.\"\fB-B\fP
.\"with no other target defined, use the bookmark page
.\"to process or to request for data; immediate termination thereafter
.\".TP
.\"\fB-v\fP
.\"with no other target defined, use the built-in W3M startup-page
.SS
Options for data output (with immediate exit):
.TP
\fB-dump\fP
dump rendered page into STDOUT. Set implicitly when output is directed
to a file or pipe
.TP
\fB-dump_source\fP
dump the page's source code into STDOUT
.TP
\fB-dump_head\fP
dump response of a HEAD request for a URL into STDOUT
.TP
\fB-dump_both\fP
dump HEAD, and source code for a URL into STDOUT
.TP
\fB-dump_extra\fP
dump HEAD, source code, and extra information for a URL into STDOUT
.TP
\fB-help\fP
show a summary of compiled-in features and command line options
.TP
\fB-show-option\fP
show all available config options
.TP
\fB-version\fP
show the version of \fIW3M\fP
.\".SS
.\"miscellaneous options
.SS
Options for overriding default settings and resources:
.\" in \fC~/.w3m/\fP, see FILES
.TP
\fB-bookmark \fIfile\fR
use file instead of the default bookmark.html file
.TP
\fB-config \fIfile\fR
use file instead of the default config file
.TP
\fB-debug\fP
DO NOT USE
.TP
\fB-o \fIoption=value\fR
modify one configuration item with an explicitly given value
.TP
\fB-reqlog\fP
log headers of HTTP communication in file \fC~/.w3m/request.log\fP
.SH EXAMPLES
.TP
Pager-like usage 
.\" of \fIW3M\fP 
.\" \fBW3M\fP as a text pager
.br
Combine snippets of HTML code and preview the page 
.br
\ \fC$ cat header.html footer.html | w3m -T text/html \fP
.br
Compare two files using tabs 
.br
\ \fC$ w3m -N config.old config \fP
.TP
Browser-like usage 
.\" of \fIW3M\fP 
.\"  \fBW3M\fP as an HTML renderer
.br
Display web content in monochrome terminal
.br
\ \fC$ w3m -M http://w3m.sourceforge.net\fP
.br
Display embedded graphics
.br
\ \fC$ w3m -o auto_image=TRUE http://w3m.sourceforge.net\fP
.br
Display content from Usenet  
.br
\ \fC$ w3m -m nntp://$NEWSSERVER/debian_curiosa/\fP
.br
Upload data for a URL using the POST method 
.\".br
.\"\fC$ echo 'text=abc&count=123' > file.txt
.\".br
.\"w3m -post file.txt http://example.com/form.php\fP
.\".br
.br
\ \fC$ w3m -post - http://example.com/form.php <<<'a=0&b=1'\fP
.TP
Filter-like usage
.\" of \fIW3M\fP
.br
Convert an HTML file to plain text with a defined line length
.br
\ \fC$ w3m -cols 40 foo.html > foo.txt\fP
.br
Convert a web page to text with appended links
.br
\ \fC$ w3m -o display_link_number=1 w3m.sourceforge.net > out.txt\fP
.br
Conversion of file format and character encoding
.br 
\ \fC$ w3m -T text/html -I EUC-JP -O UTF-8 < foo.html > foo.txt\fP
.TP
Start with no input
.\", suitable as predefined command to configure in window manager menus
.br
\ \fC$ w3m -v\fP
.\".SH Errors
.SH ENVIRONMENT
\fIW3M\fP recognises the environment variable WWW_HOME as defining a
fallback target for use if it is invoked without one.
.SH FILES
.TP
\fC~/.w3m/bookmark.html\fP
default bookmark file 
.TP
\fC~/.w3m/config\fP
user defined configuration file, overrides \fC/etc/w3m/config\fP
.TP
\fC~/.w3m/cookie\fP
cookie jar; written on exit, read on launch   
.TP
\fC~/.w3m/history\fP
browser history - visited files and URLs
.TP
\fC~/.w3m/keymap\fP
user defined key bindings; overrides default key bindings
.TP
\fC~/.w3m/mailcap\fP
external viewer configuration file
.TP
\fC~/.w3m/menu\fP
user defined menu; overrides default menu
.TP
\fC~/.w3m/mime.types\fP
MIME types file
.TP
\fC~/.w3m/mouse\fP
user defined mouse settings
.TP
\fC~/.w3m/passwd\fP
password and username file
.TP
\fC~/.w3m/pre_form\fP
contains predefined values to fill recurrent HTML forms
.\" .TP
.\" .I $~/.w3m/urimethodmap
.\" ???
.SH NOTES
This is the \fIW3M\fP 0.5.3 Release.
.SH "SEE ALSO"
README and example files are to be found in the doc directory of your \fIW3M\fP installation. Recent information about \fIW3M\fP may be found on the project's web pages at http://w3m.sourceforge.net
.SH ACKNOWLEDGMENTS
\fIW3M\fP has incorporated code from several sources.
Users have contributed patches and suggestions over time.
.SH AUTHOR
Akinori ITO <aito@fw.ipsj.or.jp>

Reply to: