• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

debian/H20-Jun-2009-787541

doc/H03-May-2022-9,5417,876

test/H03-May-2022-3627

AUTHORSH A D02-Jan-2009627 3627

COPYINGH A D22-May-200217.6 KiB341281

LICENSEH A D01-Jul-2007716 1612

Makefile.amH A D02-Jan-20091.4 KiB4130

Makefile.inH A D03-May-202226.3 KiB768675

NEWSH A D20-Jun-20095.5 KiB290212

READMEH A D20-Jun-200914.8 KiB339238

TODOH A D02-Jan-20092 KiB4035

aclocal.m4H A D20-Jun-200932.2 KiB890797

cfg.cH A D03-May-2022882 3924

cfg.hH A D18-Apr-20042.1 KiB4628

cmdline.cH A D03-May-20222.2 KiB7049

cmdline.hH A D22-May-2002441 172

colors-bright.cH A D03-May-20221.5 KiB4313

colors-dark.cH A D03-May-20221.5 KiB4213

colors.cH A D03-May-2022466 2510

colors.hH A D03-May-2003562 247

config.h.inH A D20-Jun-2009818 3523

configureH A D03-May-2022164.9 KiB5,9034,872

configure.acH A D02-Jan-20092.6 KiB11391

debug.cH A D03-May-2022790 3814

debug.hH A D22-May-2002910 3810

depcompH A D12-Apr-200917.4 KiB590375

dump-tree.cH A D03-May-20222.6 KiB7646

facilities.cH A D03-May-20226.5 KiB239152

form-file.cH A D03-May-20224.5 KiB209126

form-file.hH A D26-Apr-2003513 173

forms.cH A D03-May-202211.4 KiB317216

forms.hH A D02-Jan-20091.5 KiB3415

http-parse-header.cH A D03-May-20226.7 KiB255185

http-parse-header.hH A D22-May-2002399 195

http.cH A D03-May-20227.3 KiB245176

http.hH A D02-Jan-2009476 215

install-shH A D12-Apr-200913.3 KiB520344

interrupt.cH A D03-May-20222.2 KiB7539

interrupt.hH A D31-Aug-2002561 206

items.cH A D03-May-20222.5 KiB8446

items.hH A D03-Aug-20035.6 KiB155112

layout.cH A D03-May-20224.4 KiB14689

layout.hH A D02-Jan-20091.2 KiB3519

links.cH A D03-May-20222 KiB6037

links.hH A D27-Sep-2002601 174

load.cH A D03-May-202212.3 KiB390285

load.hH A D02-Jan-20091.5 KiB6640

main.cH A D03-May-202223.6 KiB701547

missingH A D12-Apr-200910.9 KiB368275

page.cH A D03-May-20228.7 KiB237145

page.hH A D02-Jan-20091.7 KiB4421

pager.cH A D03-May-202233.6 KiB1,012654

pager.hH A D02-Jan-2009910 2914

parse-elements.cH A D03-May-20224.5 KiB11880

parse-struct.cH A D03-May-202243.2 KiB1,125835

parse-syntax.cH A D03-May-202252.8 KiB1,5831,233

pre-render.cH A D03-May-202216.6 KiB452309

readline.cH A D03-May-20221.4 KiB5729

readline.hH A D03-Aug-2003671 288

render.cH A D03-May-202210.9 KiB323204

render.hH A D03-Aug-2003667 217

screen.cH A D03-May-20225.9 KiB201136

screen.hH A D07-Sep-2003697 196

search.cH A D03-May-2022362 196

search.hH A D29-Mar-2003400 239

sgml.cH A D03-May-20223.2 KiB9151

syntax.hH A D23-Apr-20045.9 KiB177129

url.cH A D03-May-202219.2 KiB617455

url.hH A D02-Jan-20091.4 KiB5430

winch.cH A D03-May-20221.2 KiB4517

winch.hH A D03-Aug-2003352 142

README

1  netrik 1.16.1 (beta)
2>====================<
3
4
5_What it is_ (INTRODUCTION)
6
7Netrik is the ANTRIK Internet Viewer/Browser/Explorer/Navigator/whatever. (Tell
8us which one you like best :-) )
9
10Netrik is Free Software published under the GNU GPL; see LICENSE for details.
11
12If you haven't already done so, you may want to take a look at the SourceForge
13page at http://netrik.sourceforge.net , where you can read extensive
14discussion on topics like: What it is all about; why it is there; how it
15developes; what features are intended; why we consider it necessary etc.
16
17For short, netrik intends to be a really fancy text mode WWW browser (somewhat
18similar to lynx, links, w3m -- only better ;-) ). Well, that's the plan.
19Presently it's rather simple; but has quite a number of unique features
20regarding user interface, HTML presentation and others.
21
22
23_What is new_ (CHANGES)
24
25The 1.16 release adds the new command 'l'. This will enter a special mode, in
26which every link on the active screen area gets a unique label (one or two
27letters) assigned, and the user can then type these letters to immediately
28follow the respective link. (The idea is borrowed from Vimperator, and
29implemented in netrik by Evan M. Gates.)
30
31Note that this feature is considered experimental: It might be changed or
32entirely replaced by other commands for the same use case in the future.
33
341.16.1 uses ncursesw instead of ncurses, which makes utf8 work somewhat again.
35(Not properly, but back to the partially-broken state it was in before.)
36
37See NEWS for changes in previous releases.
38
39
40_Where it runs_ (SYSTEM REQUIREMENTS)
41
42Netrik is developed and tested under GNU/Linux and GNU Hurd. However, for now
43it doesn't use a lot of stuff specific to GNU. It might require some tweaking,
44but should not be too hard to make it work on other UNIX-like systems. There
45are reports of running some older versions on FreeBSD and Solaris, for example.
46In short: Good luck ;-)
47
48Specifically, it depends on the ncurses library and GNU getopt. GNU readline
49and history libraries can be used for fancy command prompt editing. See
50TROUBLESHOOTING below for more details.
51
52For viewing pages on FTP servers, or if you don't want to use the builtin HTTP
53handling, you also need to have GNU Wget installed. (Of course you can replace
54it with your favourite HTTP loader, by using --with-wget-call=... option to
55configure.)
56
57Viewing compressed (local) files requires gzip and/or bzip2 installed.
58
59
60_How to use_ (INSTALL)
61
62Installation is triggered by the typical command sequence:
63
64   ./configure && make && make install
65
66in the netrik directory. (If you got netrik from CVS, you'll have to do
67"autoreconf -i" first.)
68
69In the case some of the commands fails without printing a useful diagnostic
70message, please send a bug report. (See _Bugs_.)
71
72All installation steps should work automatically; no user interaction is
73necessary. However, you may want to set some options influencing important
74features of the program. Use
75
76   ./configure --help
77
78to find out what options are available.
79
80Some details of the compiling process can also be influenced by make variables,
81e.g.
82
83   CC=gcc-3.0 ./configure
84
85Especially LDFLAGS and CPPFLAGS may be useful, to give the location of a
86library and its headers if it resides in an unusual place.
87
88The installation process should be straightforward, if you have all necessary
89libraries installed. See _Why it fails_ below if you run into trouble.
90
91
92For DEBIAN USERS, installation is even simpler: Just use the command
93
94   debuild -b -us -uc
95
96in the unpacked source directory, and then install the resultig package with
97
98   dpkg -i ../netrik_*.deb
99
100(Assuming you have no other .deb matching the wildcard already lying about;
101use the shell's <tab>-completion feature to get the correct file name.)
102
103
104_What you can do with it_ (USAGE)
105
106Well, netrik implements most all basic browser functionality now, so you can do
107the same as with any other browser -- read local HTML files, browse the web.
108(There are some limitations however: No file save/download, no cookies, no
109SSL.)
110
111The most typical use would be invoking with just the name of some local file or
112with some HTTP URL as argument (you can usually leave out the "http://"), which
113will load the resource and startup in interactive browser mode.
114
115Use 'j' and 'k' to scroll the page, up and down arrows (or uppercase 'J' and
116'K') to select links, and the return key to follow a link. (There are many more
117link selection commands; you may for example prefer using a combination of
118'+'/'-' and <tab>/'p' instead of 'J' and 'K'. See doc/keys.html or doc/keys.txt
119for a complete listing.)
120
121See "man netrik" and/or the various documentation files in doc/ for other
122invocation methods, command line options, and more browser commands.
123
124Netrik may also be quite useful for a quick test of HTML files (using --debug)
125-- it should complain about almost all syntax errors. (The man page has an
126example.)
127
128
129_Why it fails_ (TROUBLESHOOTING)
130
131INSTALLATION (especially on non-GNU systems) often fails because some libries
132are missing:
133
134If you want to have fancy command line editing in netrik, you need a shared
135library version of the GNU Readline library, and the developement files
136(headers) going with it. If using GNU/Linux, your distribution should provide a
137package named something like "libreadline-dev"; some distributions fail to do
138so, however. In that case you can get the source (from your distribution or
139from ftp://ftp.gnu.org/gnu/readline/ ) and compile it with "make shared" and
140"make install-shared".
141
142You also need the ncurses developement files. (These are mandatory.) Your
143distribution should provide a "libncurses-dev" package (or something similar);
144some distributions have only one "ncurses" package providing both the library
145and the developement files.
146
147On FreeBSD, the GNU Getopt port (libgnugetopt) needs to be installed.
148
149STARTUP often causes trouble because of a wrong terminal setting: As netrik
150normally uses text colors excessiveley, it complains if it can't use colors.
151Thus, your $TERM environment variable needs to be set to some color terminal
152type in order to run netrik; e.g. "linux", "xterm" or "ansi", but not "linux-m"
153or "vt100".
154
155Note: On some systems, the "xterm" terminal definition also doesn't contain the
156color settings; if it fails with just "xterm", try "xterm-color" instead.
157
158Netrik can also run in a (very crude) monochrome mode now. If you actually have
159a monochrome terminal, you can avoid the warning about colors on each startup:
160Use the --bw option on the command line, or put it into your ~/.netrikrc. (See
161doc/config.txt or doc/config.html for details.)
162
163
164_Keeping in Touch_ (MAILING LIST)
165
166As of course you are very interested in netrik ;-), you may want to subscribe
167to the mailing list. Probably not all messages will be of interest to you, but
168you will have a good overview on current netrik developement.
169
170To subscribe, either send a mail to
171netrik-general-request@lists.sourceforge.net with the word "subscribe" as
172subject, or go to http://lists.sourceforge.net/lists/listinfo/netrik-general .
173
174Again, you can go to the project homepage at http://netrik.sf.net and find
175lots of information there. (Both topical and general.)
176
177
178_How it works_
179
180Netrik consists basically of three big modules: The layout engine, the
181file/HTTP loader, and the pager. However, these aren't clearly separated, but
182closely interlocked; especially the loader is coupled very tighly to the layout
183engine, or one might say: built around it.
184
185Of these three, the layouting is the biggest and probably most interesting part
186-- while the others consist of bunch of specific solutions for all the
187different aspects of their functionality, the layout engine has quite a clear
188generic design:
189
190The whole layouting is done by a series of simple processing steps applied one
191after the other, each one generating a new data structure from the output of
192the previous one.
193
194The first step (parse-syntax.c) reads the input stream (using load.c), and
195creates a syntax tree, which contains all the elements (HTML tags) as well as
196the content (the text between the tags) assigned to each element.
197
198The next step (parse-elements.c) looks up the element names -- which were
199stored as strings up to now -- in a table, and assigns enumerated numbers to
200each one, to faciliate further processing.
201
202An additional pass is used now to fix the broken tree that is created by the
203syntax parser with SGML documents. (Containing unclosed elements.)
204
205The third step (parse-struct.c) is the central part of the process: The syntax
206tree, which is a representation of the file stucture, is converted to a
207structure tree, which is a representation of the page as it appears on the
208screen. It contains one item for each thing visible on the page, like text
209blocks, blank lines, boxes etc.
210
211The fourth step (pre-render.c) places the items on the page. From the sizes of
212the items it determines at which coordinates inside the page every single item
213will be displayed. It also generates a page allocation map, allowing for fast
214lookup which items are present at a certain page position.
215
216After all these preparation passes, the interactive viewer (pager.c) is called.
217Every time the visible page area changes, it uses render.c to display the new
218region, according to the information from the item tree generated before.
219
220See doc/hacking.txt or doc/hacking.html for a more in-depth discussion.
221
222
223_Dumps_
224
225If invoked with the "--debug" option, netrik prints lots of additional
226information while loading/layouting the page, before the pager is (re)started.
227Most every program part generates some messages, which are often (more or less)
228self-explanatory; however, by far the most -- and most interesting -- dumps are
229generated by the layout engine:
230
231While parsing the syntax, every parsed character is dumped. If a parsing error
232occurs (or something worse, like segmentation fault), the last character dumped
233is the one which caused the problem. (The same is already done while parsing
234the HTTP header, if loading by HTTP.)
235
236After syntax parsing has finished, the whole parse tree is dumped. It may be a
237bit confusing, as a node's text is printed *before* a node, not after it, as
238one may expect. (The representation of the syntax tree is quite different from
239W3C DOM: Instead of a mix of child element nodes and text nodes, a parent node
240contains *only* a list of child nodes; the text content is always stored with
241the next child node...) The reason is that the nodes stores the text that comes
242before it in the document, not after it, so dumping it after it would be even
243more confusing.
244
245After parse-elements.c and sgml.c have finished, the tree is dumped again, but
246this time the element and attribute names are not printed in their textual
247representation from the document, but instead looked up from a table of known
248facilities. Also, this second tree dump happens after the SGML fixing, as
249opposed to the first. Dummy elements (for storing text content that can't be
250assigned to any real child) are indicated by a question mark, and the global
251element (tree top) by an exclamation mark.
252
253After parse-struct.c and pre-render.c have finished, the resulting item tree is
254dumped. The coordinates assigned by pre-render.c for each item are printed, and
255the text strings of text items are dumped in the correct colours. Links and
256anchors are also listed for each text item.
257
258Again, see doc/hacking.txt for a more thorough description.
259
260
261_Benchmarks_
262
263I've decided that it's time to repeat the benchmarks, for at least three
264reasons: First of all, much time has passed since I last compared, and many
265browsers are available in new Versions. (Especially the graphical ones.)
266
267Then, I realized that some browsers (links, and especially Netscape4) behave
268considerably different when loading local files than when loading via HTTP.
269This time I've compared HTTP speed, as this is more realistic...
270
271Finally, to allow a more useful comparision between the text based and the
272graphical browsers, I've removed all image references from the test files.
273
274The most important obeservation was that links needs additional time to load
275from HTTP. (The amount of time doesn't depend on the document contents, but
276fluctuates.) For simple documents, this is quite considerable: The loading time
277is up to about twice as long as for local files. That's why this time netrik,
278w3m and links all had very similar results. (Sometimes links was faster,
279sometimes netrik.) Lynx was still much slower. (It doesn't seem to scale well
280with big files...)
281
282The difference to the graphical browsers wasn't that big this time. When
283loading local files, Netscape was nearly as fast as netrik/w3m/links, for most
284files. (For files with tables, it was actually much faster then the
285table-enabled text mode browsers links and w3m.)
286
287However, it exposes a very strange behaviour when loading from HTTP: For very
288simple HTML files, it gets *much* slower; but with the more complicated files,
289it was still super-fast...
290
291Opera is also gotten much better, and is sometimes nearly as fast as Netscape
292with local files now. Due to Netscape's anomaly with simple files, it's
293sometimes even faster over HTTP.
294
295Mozilla is also gotten faster, but is still very much slower than Netscape or
296even Opera.
297
298Note: The tests were done with a couple of very large files (1 MB), so they
299only measure pure HTML parsing (and HTTP loading) speed, but no response times
300in realistic circumstances...
301
302
303_Feedback_
304
305If you just want to tell us that you love netrik (of course you do :-) ), or if
306you think our code is inefficient, or if you do not like our arrogant tone, or
307if you found some bug, or if you think netrik is ugly and useless, or if you
308don't like our indentation, or if you found typos somewhere, or if you think
309our comments are cryptic, or if you think something could be done better, or if
310you have a suggestion for some feature, or if you want to know something, or if
311your cat likes watching you using netrik -- in short, if ever you feel the
312irresistable desire to tell us something: Do so! :-)
313
314Send an e-mail to netrik-general@lists.sourceforge.net . Keep in mind that this
315is a public mailing list, and everyone can look at the archives. If you prefer
316a more "personal" way, you can also mail the maintainer (which happens to be
317me): antrik@users.sourceforge.net
318
319
320_Contribute_
321
322If you want the fame of participating in the greatest project of the new
323millenium ;-), or if you just feel obliged to return something to netrik for
324all the happy hours you spent with it :-), or maybe if you simply want to see
325your favourite feature implemented as soon as possible: Start by subscribing to
326the mailing list. (s.a., _Keeping in Touch_) It's that simple. Really. (You may
327want to introduce yourself after subscribing -- but we don't insist :-) )
328
329If you want to start hacking right away, a glance at the ToDo file should give
330you some ideas.
331
332
333_Bugs_
334
335Netrik is still far from complete, and many things won't work. However, all
336features that are implemented should work correcty -- so if you find some bug,
337don't hesitate to report it; send an e-mail. Again, the address is
338netrik-general@lists.sourceforge.net
339