File: netrik.1

package info (click to toggle)
netrik 1.16.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 3,272 kB
  • ctags: 729
  • sloc: ansic: 6,657; sh: 994; makefile: 114
file content (454 lines) | stat: -rw-r--r-- 16,323 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
.TH NETRIK 1 "September 21st, 2008"
.SH NAME
netrik \- The AN\fBTRIK\fP inter\fBnet\fP browser

.SH SYNOPSIS
\fBnetrik\fP [\fBoptions\fP] \fIURL\fP or \fIfilename\fP
.P
\fBnetrik\fP \fB-\fP

.SH DESCRIPTION
\fBnetrik\fP is an advanced text mode HTML (WWW) browser, that is to say a web
browser running on character cell displays (linux console, xterm etc.) -- not
unlike w3m, links or lynx.
.P
When invoked with a filename or URL as argument, the specified document is
loaded and displayed in interactive mode, so you can start browsing the web or
some local HTML repository from there. (Alternatively the document can be just
layouted and dumped to the screen, see \fBOPTIONS\fP below.)
.P
When invoked with '-' instead of a file/URL, an HTML document is read from
standard input, and displayed just the same.
.P
If some file name/URL is present in the configuration file (\fI~/.netrikrc\fP),
you can also start netrik without any non-option arguments; the one from the
config file will be loaded then. See \fBnetrikrc\fP(5) for details.
.P
When multiple non-option arguments are specified, netrik simply takes the last
one, and ignores the others. (This is for the above to work.)
.P
The type of the resource to load is automatically determined from the argument.
If it starts with "http://", "ftp://" or "file://", the corresponding type is
used. If none of these is specified, netrik tries to guess the type: First it
tries to open a local file of the given name, and if that fails, it tries HTTP.
Only if both fail, an error is generated. (See \fBEXAMPLES\fP below.)
.P
Local files can be also compressed by gzip or bzip2, which is handled
transparently, meaning the ".gz" or ".bz2" extension needn't be given in the
URL.
.P
Once in the pager, you can explore the web interactively, as with any other web
browser. The keyboard commands should look familiar if you know vi (or some of
the myriads of programs with vi-like keys) as well as lynx: Use the 'j' and 'k'
keys to move around, the up and down arrow keys (or capital 'J' and 'K') to
select links, and the <return> key to follow links. See \fBPAGER COMMANDS\fP
below for a description of other useful commands.
 (default)
.SH OPTIONS
Note: \fBnetrik\fP is still in early development state; options are subject
to changes.
.TP
.B --no-term-width
When using the pager, this causes a page that contains extremely long
words to be rendered wider than the screen, instead of breaking the
word. Note however that side scrolling isn't implemented yet -- you
won't be able to see the end of the line when using this option... In
dump mode, this option causes usage of the default width of 80 columns
instead of what the terminal definition says. (Words are always broken
in dump mode.)

.TP
.B --fussy-html
Abort on any HTML syntax errors or warnings encountered. A short error
description is printed. (This description may not be terribly useful at
times...) This mode is primarily intended for HTML debugging. (Note however
that \fBnetrik\fP may oversee some errors; but most are reported.)
.TP
.B --clean-html
Do not abort on HTML syntax errors. Error descriptions are printed for every
syntax error (or warning), but \fBnetrik\fP tries to parse the page anyhow.
Workarounds are used for some typical syntax errors (e.g. unescaped '<' or '&'
characters); other errors are ignored. After the whole page is loaded,
if some error(s) were found, a warning message is printed (according to the
severity of the worst encountered bug), and the pager starts after a
keypress.
.TP
.B --valid-html
This mode is identical to --clean-html, except that \fBnetrik\fP doesn't pause
after loading completes, if only warnings were generated but no real errors
were encountered. (i.e. constructs that are discouraged in the standard, but
strictly speaking are valid.)
.TP
.B --broken-html   (default)
This mode is identical to --valid-html, except that \fBnetrik\fP also doesn't
pause if only simple errors with known workaround were encountered, which
probably won't disturb layouting. Usage should be avoided if possible. (The
file syntax_error.txt or syntax_error.html in the documentation directory (see
\fBSEE ALSO\fP below) explains why.)
.TP
.B --ignore-broken
In this mode no warning is showm for any syntax errors, even if they might
cause heavily broken layouting. Don't use!

.TP
.B --debug
Before displaying (or dumping) the page, some intermediate layouting
stages are shown. (This output is described in the README.) Try it --
it's quite interesting to watch \fBnetrik\fP work :-) It can be also
useful to find HTML errors in a page, as it dumps the page while
loading/parsing it.
.br
(This option is not available if compiled with --disable-debug to ./configure)
.TP
.B --warn-unknown
Issue a warning when encountering an unknown HTML element or
attribute. This is probably only useful for debugging purposes, as
there are quite a lot of (legal) HTML facilities \fBnetrik\fP doesn't
know.
.TP
.B --dump
Just dump the file given as argument to the screen and quit, instead
of starting the pager. (The page is layouted correctly.)
.TP
.B --no-proxy
Ignore the "http_proxy" and "HTTP_PROXY" environment variables with
--builtin-http. (No effect on wget! See below.)
.TP
.B --no-builtin-http
Use \fBwget\fP(1) to retrieve pages from a HTTP server, instead of the builtin
HTTP handling code. Note that HTTP redirects in most cases cause
relative links in the page to be broken when using wget. The builtin
HTTP code seems to work good now; using wget shouldn't be
necessary. (FTP pages however are always loaded via wget.)
.TP
.B --no-anchor-offset
When jumping to an anchor (following a link with a fragment
identifier), the page will be scrolled (if possible) so that the
anchor will stand just below the screen top. (In the second line,
which is the first line in which links can be activated.) By default,
the anchor is at about 1/5 of the screen height below the top.
.TP
.B --cursor-keys
Use the arrow keys to move the cursor, instead of the lynx-like navigation used
by default. (This is useful for blind users, as it allows using the "flash
cursor" keys found on braille displays.)
.TP
.B --xterm
Assume the terminal has xterm-like attribute handling. (i.e. needs a workaround
to display a bright background color.)
.br
This setting is used automatically if the terminal type ($TERM environment
variable) contains the string "xterm", so you only need to set it manually if
you have some other terminal that also needs that workaround or if you have set
--console in \fBnetrikrc\fP(5) and need to override that.
.br
Note that this workaround works *only* on xterm (and maybe some other
terminals), but not on linux console, so you can't just set it categorically!
.TP
.B --console
Assume the terminal doesn't need and understand the xterm workaround for
bright background colors. (See above.)
.TP
.B --dark-background
Use the color definitions from \fIcolors-dark.c\fP (formerly
\fIcolors.alt.c\fP). A black background will be used (even if the terminal uses
a bright background by default!), and a set of foreground colors which look
very nice on black backgound. (But would be unusable on bright background.)
.br
This is the default now.
.TP
.B --bright-background
Use color definitions from \fIcolors-bright.c\fP (formerly
\fIcolors.default.c\fP). The terminal's default colors will be used for
background and normal text, and an alternative color scheme suitable for bright
background will be used for other text types.
.br
Use this if you have a terminal with bright background (like most xterms), and
also want to stick to that in \fBnetrik\fP.
.br
Note that this can be used on a terminal with dark background as well; some
colors are somewhat hard to read, however.
.TP
.B --no-force-colors
Use terminal's default colors even with --dark-background, instead of forcing
usage of \fBnetrik\fP's default text colors (white on black for normal text).
This is useful if you use the default (dark) colors and your terminal has a
black background anyways -- forcing the default colors is only a waste of time in
this situation.
.P
You can also specify any of these options as default in the netrik config file
\fI~/.netrikrc\fP, see \fBnetrikrc\fP(5).

.SH EXAMPLES
.TP
.B netrik http://netrik.sourceforge.net/index.html
Load the netrik web site and start browsing.
.TP
.B netrik sourceforge.net
Load a local file named "sourceforge.net" in the current directory, or start browing http://sourceforge.net if no such local file exists.
.TP
.B netrik file:///usr/local/share/doc/index.html
Start browsing the netrik HTML documentation.
.TP
.B ssh me@someshell.invalid cat foo.html|netrik -
Load file "foo.html" from your ssh account on someshell.invalid, and display in builtin pager.
.TP
.B netrik --dump foo.html
Layout and dump the file "foo.html" from current directory.
.TP
.B TERM=ansi netrik --dump foo.html >foo.rtext (bourne shell version)
Dump (layouted) content of "foo.html" to the file "foo.rtext", which can be viewed on any ANSI compatible color terminal later. (Using "less -R" for example.)
.TP
.B netrik http://foo.invalid/broken.html --dump --debug 2>&1|less -R
Examine "http://foo.invalid/broken.html" to find the reason for some HTML error.
.TP
.B netrik --broken-html freshmeat.net
Start browsing freashmeat.net, don't halt on noncritical HTML errors.
.TP
.B netrik --ignore-broken www.cnn.com
Start browsing cnn.com, don't halt on *any* HTML errors. (Expect it to look broken, but that's probably not our fault... If you think it is, please file a bug report.)

.SH PAGER COMMANDS
Similar to \fBvi\fP(1), netrik basically knows two kinds of pager commands.
Simple commands (presently all of them are one-letter commands) are executed
directly when the corresponding key is pressed. These are all the pager
movement commands, plus some more. In the following overview they are
represented by just the letter for letter keys, or a symbol of the form <key>
for special keys. Upper case letters mean the letter key with <shift>, and
letters preceded with '^' mean the letter key with <ctrl>.
.P
The others (presently only two) need to be typed into a command prompt (with
\fBreadline\fP(3) and all), which is activated by pressing ':', and has to be
confirmed by <return>. These are indicated by a ':' before the command name.
(Just as they are typed...)

.SS MOVEMENT (SCROLLING) COMMANDS
.TP
.BR j
scroll one line forward
.TP
.BR k
scroll one line backward
.TP
.BR <del>
scroll two lines forward
.TP
.BR <ins>
scroll two lines backward
.TP
.BR ^F , <space>
scroll one screen forward
.TP
.BR ^B
scroll one screen backward
.TP
.BR ^D , <PgDn>
scroll one half screen forward
.TP
.BR ^U , <PgUp>
scroll one half screen backward
.TP
.BR g , <Home>
go to page top
.TP
.BR G , <End>
go to page end

.SS CURSOR MOVEMENT COMMANDS
.TP
.BR ^H
cursor left
.TP
.BR ^J
cursor down
.TP
.BR ^K
cursor up
.TP
.BR ^L
cursor right

.SS HYPERLINK COMMANDS
.TP
.BR <return>
follow selected link (or manipulate form control)
.TP
.BR J , <down>
go to next link, or scroll one line forward (if no more links on screen)
.TP
.BR K , <up>
go to previous link, or scroll one line backward (if no more links on screen)
.TP
.BR + , =
go to first link on next line, or scroll one line forward (if no more links on screen)
.TP
.BR -
go to first link on previous line, or scroll one line backward (if no more links on screen)
.TP
.BR ^ , ^A
go to first link starting in line
.TP
.BR 0
go to first link in line (different from '^' if there is a link wrapped from previous line)
.TP
.BR $ , ^E
go to last link in line
.TP
.BR H
go to first link on screen
.TP
.BR L
go to last link on screen
.TP
.BR M
go to midmost link (first link in second screen half)
.TP
.BR <tab>
go to next link
.TP
.BR p
go to previous link
.TP
.BR <bs>
go to first link on page
.TP
.BR l
activate links by label

.SS PAGE HISTORY COMMANDS
.TP
.BR ^R
reload current page
.TP
.BR b , <left>
back to previous page in history
.TP
.BR f , <right>
forward to next page in history (after 'b')
.TP
.BR B
back to previous site (page before last absolute URL entered/followed)
.TP
.BR F
forward to next site
.TP
.BR s
set page mark
.TP
.BR S
remove page mark
.TP
.BR r
return to previous page in history marked with 's' (or first page)
.TP
.BR R
forward to next page in history marked with 's' (or last page)
 
.SS OTHER COMMANDS
.TP
.BR u
show link URL
.TP
.BR U
show absolute link target URL
.TP
.BR c
show current page URL
.TP
.B :e URL
load document "URL" and display it in the pager (URL relative to current page)
.TP
.B :E URL
load document "URL" and display it in the pager (absolute URL)
.TP
.BR /
search for a string in current page
.TP
.BR q
quit netrik
.TP
.BR "^C " ( SIGINT )
Interrupt file/HTTP loading (no effect otherwise)
.TP
\fB^\\\fP (\fBSIGQUIT\fP)
Immediately quit netrik unconditionally. (Presently, this signal violently terminates netrik; thus no cleanup takes place... Use only in "emergency".)

.SH ENVIRONMENT
\fBhttp_proxy\fP (the uppercase variant \fBHTTP_PROXY\fP is also recognized,
but discouraged) specifies the address of an optional proxy server.
.P
\fBTERM\fP specifies a terminal type for which netrik (actually, ncurses) will
produce output.

.SH EXIT STATUS
.TP
.B 0
Normal exit. (Should occur only if explicitly issued 'q' command, or after whole page has been printed with --dump.)
.TP
.B 1
Some condition occured that prevents netrik from continuing normal operation. This might be a memory allocation error, failure to open some important file etc. Note that it might also indicate some bug in netrik; if the error message printed doesn't seem to make sense (e.g. a memory allocation error when there is plenty of free RAM available), please report that. (See \fBBUGS\fP below.)
.TP
.B 2
Operational error: The user induced an error condition that netrik can't handle gracefully (yet), e.g. trying to follow a relative link where no base URL is available. (On a page loaded from standard input, for example.)
.TP
.B 100
One of the internal sanity checks gave alarm. \fBThis is a bug in netrik!\fP Please report it. (See \fBBUGS\fP below.)
.P
Other errors codes shouldn't occur. (Note that error codes above 128 are generated when the program is terminated by a signal, e.g. 139 for SIGSEGV, which usually also indicates a bug, unless the signal was generated by some user action.)

.SH "CONFORMING TO"
Netrik knows most of HTML 4.01 and XHTML 1.0. There are several facilities it
doesn't recognize yet, though; and some things are layouted incorrect.
(Especially space handling is totaly broken.)
.P
It doesn't conform to XHTML also for the reason that it only warns about syntax
errors (rather than aborting), and some may even slip through alltogether.
.P
Note that full standards compliance is not a primary development goal; we may
ignore known minor incompatibilities, as long as they do not undermine W3C's
standardization efforts, and there is more important work to do...

.SH FILES
\fI~/.netrikrc\fP: The netrik configuration file.

.SH VERSION
This manual page documents netrik version 1.16.1.

.SH BUGS
Layouting is so strange that it always looks broken...
.P
Layouting \fBis\fP actually broken. (Wrong space handling.)
.P
HTML syntax error messages are penetrating.
.P
The UI is inconsistent.
.P
Netrik is vaporware.
.P
Netrik has \fBless\fP command line switches than ls ;-)
.P
Please report any other problems you find to <netrik-general@lists.sourceforge.net>.
Thanks.

.SH AUTHOR
Netrik was created and is maintained by Olaf D. Buddenhagen AKA antrik
(<antrik@users.sf.net>), with major contributions from Patrice Neff, S�ren
Schulze, and others. (For a full listing of all contributors see AUTHORS in the
doc directory, see below.)
.P
This man page was created by Patrice Neff and modified by antrik.

.SH SEE ALSO
\fBnetrikrc\fP(5)
.P
The \fIREADME\fP file, and the complete plain text or html documentation
(\fIindex.txt\fP/\fIindex.html\fP) in the doc directory. (The doc directory is
usually something like \fI/usr/share/doc/netrik\fP when netrik was installed
from a binary package or \fI/usr/local/share/doc/netrik\fP when compiled from
source.)
.P
The netrik website at <http://netrik.sourceforge.net>.
.P
The netrik mailing list at <netrik-general@lists.sf.net>; see
<http://lists.sourceforge.net/lists/listinfo/netrik-general> for list
information.