15
17
<H2 align=center> edbrowse Documentation </H2>
17
<H4 align=center> Author </H4>
19
<P><PRE><font size=4 face=Arial,Helvetica,sans-serif>
19
<H3 align=center> <A NAME=top> Contents </A> </H3>
21
<H4> Chapter 1, Preface </H4>
24
<LI><A HREF=#auth> Author </A>
25
<LI><A HREF=#copy> Copyright Notice </A>
26
<LI><A HREF=#ack> Acknowledgements </A>
27
<LI><A HREF=#over> Overview </A>
30
<H4> Chapter 2, Quick Reference Guide </H4>
33
<LI><A HREF=#guide> Quick Reference Guide </A>
34
<LI><A HREF=#tips> Tips for Avoiding Line Numbers </A>
35
<LI><A HREF=#mlist> Mailing List </A>
38
<H4> Chapter 3, The Editor </H4>
41
<LI><A HREF=#dev> Important Deviations From /bin/ed </A>
42
<LI><A HREF=#brace> Balancing Braces </A>
43
<LI><A HREF=#cx> Context Switch </A>
44
<LI><A HREF=#usage> Usage </A>
45
<LI><A HREF=#bin> Binary Characters </A>
46
<LI><A HREF=#bfile> Binary Files </A>
47
<LI><A HREF=#dir> Directory Scan, File Manager </A>
48
<LI><A HREF=#case> Upper/Lower Case </A>
49
<LI><A HREF=#bl> Break Line </A>
50
<LI><A HREF=#race> Race Conditions </A>
53
<H4> Chapter 4, Web Browser </H4>
56
<LI><A HREF=#url> Accessing A URL </A>
57
<LI><A HREF=#browse> Browse Mode </A>
58
<LI><A HREF=#math> Technical, Math </A>
59
<LI><A HREF=#title> Title, Description, Keywords </A>
60
<LI><A HREF=#rf> The Refresh Command </A>
61
<LI><A HREF=#hlink> Hyperlinks </A>
62
<LI><A HREF=#ilink> Internal Links </A>
63
<LI><A HREF=#back> The Back Key </A>
64
<LI><A HREF=#move> The M Command </A>
65
<LI><A HREF=#music> Background Music </A>
66
<LI><A HREF=#input> Input Fields </A>
67
<LI><A HREF=#entry> Data Entry </A>
68
<LI><A HREF=#textarea> Text Areas </A>
69
<LI><A HREF=#button> Push The Button </A>
70
<LI><A HREF=#addr> Web And Email Addresses </A>
71
<LI><A HREF=#cook> Cookies </A>
72
<LI><A HREF=#ssl> Secure Connections </A>
73
<LI><A HREF=#ftp> FTP Retrievals </A>
74
<LI><A HREF=#frame> Frames </A>
77
<H4> Chapter 5, Javascript </H4>
80
<LI><A HREF=#js> Introduction to Javascript </A>
81
<LI><A HREF=#valid> Validating and Modifying Forms </A>
82
<LI><A HREF=#popup> Popups and Popunders </A>
83
<LI><A HREF=#onc> Onchange and Undo </A>
86
<H4> Chapter 6, Edbrowse Scripts and the Configuration File </H4>
89
<LI><A HREF=#cfg> The Config File </A>
90
<LI><A HREF=#keyval> Keyword = Value </A>
91
<LI><A HREF=#agent> User Agent </A>
92
<LI><A HREF=#script> Edbrowse Functions </A>
93
<LI><A HREF=#init> The Init Script </A>
94
<LI><A HREF=#ma> Mail Accounts </A>
95
<LI><A HREF=#mt> Mime Descriptors </A>
96
<LI><A HREF=#sampcfg> A Sample Config File </A>
99
<H4> Chapter 7, Mail Client </H4>
102
<LI><A HREF=#sm> Send Mail </A>
103
<LI><A HREF=#smc> Send Mail Client </A>
104
<LI><A HREF=#fmc> Fetch Mail Client </A>
105
<LI><A HREF=#mailfmt> Formatted Mail </A>
106
<LI><A HREF=#filter> Mail Filtering </A>
109
<H3 align=center> <A NAME=auth> Author </A> </H3>
111
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>Karl Dahlke
21
112
<A HREF=mailto:karl@eklhad.net>karl@eklhad.net</A>
22
113
248-524-1004 (during regular business hours)
25
<H4 align=center> Copyright Notice </H4>
116
<H3 align=center> <A NAME=copy> Copyright Notice </A> </H3>
27
This program is copyright (C) (C) Karl Dahlke, 2000-2003.
28
It is made available, by the author, under the terms of the General Public License (GPL),
29
as articulated by the Free Software Foundation.
118
This program is copyright (C) (C) Karl Dahlke, 2000-2006.
119
It is made available by the author under the terms of the GNU General Public License (GPL),
120
as articulated by the Free Software Foundation.
30
121
It may be used for any purpose, and redistributed, provided this copyright notice is included.
32
<H4 align=center> Overview </H4>
34
This program is, at first glance, a reimplementation of /bin/ed.
124
As a special exception, I hereby grant permission to link
125
the code of this program with the OpenSSL library
126
(or with modified versions of OpenSSL that use the same license as OpenSSL),
127
and distribute linked combinations including the two.
128
You must obey the GNU General Public License in all respects
129
for all of the code used other than OpenSSL.
130
If you modify this program, you may extend this exception to your version of the
131
program, but you are not obligated to do so.
132
If you do not wish to do so, delete this exception statement from your version.
134
<H3 align=center> <A NAME=ack> Acknowledgements </A> </H3>
136
This program borrows some code and design concepts from the
137
<A HREF=http://atrey.karlin.mff.cuni.cz/~clock/twibright/links/>
139
which is also freely available under the terms of the GPL.
140
My thanks to the authors for all their hard work.
143
I would be dead in the water if it weren't for a cadres of excellent online tutorials.
144
Their technical writing puts mine to shame.
145
Please look through some of these web pages; you'll be glad you did.
148
<A HREF=http://www.mcli.dist.maricopa.edu/tut/>
151
<br><A HREF=http://www.htmlcodetutorial.com>
152
An html Code Tutorial
154
<br><A HREF=http://www.htmlgoodies.com/tutors/>
155
So You Want to Write some html...
157
<br><A HREF=http://hotwired.lycos.com/webmonkey/javascript/tutorials/tutorial1.html>
158
Javascript for Webmasters
160
<br><A HREF=http://safari.oreilly.com>
161
Javascript, the Definitive Guide
165
This package requires Spider Monkey Javascript, released by Mozilla under the MPL.
167
<A HREF=ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.5.tar.gz>
168
download it here</A>.
169
Programmers and maintainers of this package should take advantage of the
170
<a href=http://developer.mozilla.org/en/docs/Category:JSAPI_Reference>
171
online documentation</A>.
173
<H3 align=center> <A NAME=over> Overview </A> </H3>
175
This program is, at first glance, a reimplementation of /bin/ed.
35
176
In fact you might issue a few ed commands and not realize that you are
36
actually running my perl script.
177
actually running my program.
37
178
But as you proceed
38
179
you will eventually discover some discrepancies,
39
areas where my program differs from ed.
40
These are discussed in the next section.
180
areas where my program differs from ed.
181
(These are discussed below.)
43
At first, reinventing ed seems a complete waste of time,
44
until you realize that this program also acts as a browser --
45
a browser embedded inside ed.
184
Reinventing ed <em>seems</em> like a complete waste of time,
185
until you realize that this program also acts as a browser -
186
a browser embedded inside ed.
46
187
You can edit a URL as easily as a local file,
47
188
and activate browse mode to render the html tags
48
in a manner that is appropriate for a command-response program such as this.
189
in a manner that is appropriate for a command-response program such as this.
49
190
In other words, we discard most of the formatting information
50
and retain the links and fill-out forms.
191
and retain the links and fill-out forms.
51
192
This allows blind users to access the Internet
52
193
via an application that is entirely compatible with the linear nature of speech or braille.
55
196
I find this approach superior to the "quick fix"
56
197
of pasting an adaptor onto a preexisting screen browser (lynx)
57
or graphical browser (Netscape).
58
Of course that's just my opinion.
59
To be fair, many blind users, even totally blind users, are satisfied with their auditory screen scrapers.
60
I'm glad it works for them, but this approach frustrates the hell out of me.
198
or graphical browser (Netscape).
199
Of course that's just my opinion.
200
To be fair, many blind users, even totally blind users, are satisfied with their auditory screen scrapers.
201
I'm glad it works for them, but this approach frustrates the hell out of me.
61
202
If you also prefer linear applications,
62
203
give this browser a try.
65
This documentation assumes you are familiar with ed.
66
In fact it helps if you are fluent in ed.
67
Experience with internet browsers and the associated terminology is also valuable.
69
<H4 align=center> Important Deviations From /bin/ed </H4>
71
Certain search/substitute commands may behave differently under this editor.
72
This is because the regular expressions are passed
73
directly to perl for evaluation, hence they have more features and more power
74
than the regular expressions employed by /bin/ed.
75
The syntax is also somewhat different.
206
This documentation assumes you are familiar with ed.
207
In fact it helps if you are fluent in ed.
208
Experience with internet browsers and the associated terminology is also helpful.
210
<H3 align=center> <A NAME=guide> Quick Reference Guide </A> </H3>
212
Here are the ed and edbrowse commands, all in one place.
213
This is a quick reference guide.
214
Most of these commands will not make sense until you read the rest of the documentation.
216
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>q: quit the current session
217
qt: quit the program completely, whether you've written your files or not
218
!command: shell escape
219
p: print the current line
220
4,7p: print lines 4 through 7
221
'a,'bp: print a range of lines, marked with labels a and b
222
kb: mark the current line as b
223
l: list the current line, showing nonascii chars in hex
224
n: print the current line with its line number
225
=: print the number of lines in the file
226
z22: print the next 22 lines
227
s/x/y/: replace x with y on the current line
228
s/x/y/2: replace the second instance of x with y on the current line
229
4,7s/x/y/g: replace all instances of x with y, on lines 4 through 7
230
/x/: look for the line containing x
231
/x/i: look for the line containing x or X
232
ci: searches and substitutions are case insensitive
233
cs: searches and substitutions are case sensitive
234
sg: substitution strings are global across sessions
235
sl: substitution strings are local to their sessions
236
lc: convert line to lower case
237
mc: convert line to mixed case
238
uc: convert line to upper case
239
h: help, explain the last question mark
240
f: print the name of the current file
241
f foo: set the file name to foo
242
f/: retain only the lass component of the filename
243
e: print the number of the current session
244
e3: move to session 3
245
e foo: edit the file named foo
246
r foo: read the contents of foo into the current buffer
247
w foo: write the current buffer to foo
248
w+ foo: append to foo
249
w/: write to the lass component of the filename
250
d: delete the current line
251
1,$d: delete all the lines, 1 through eof
252
u: undo the last command
253
i: insert text before the current line, end with a period
254
c: change the current line, enter a new block of text, end with period
255
a: add text after the current line, end with a period
256
a+: include the line you just typed in, when you thought you were in append mode
257
4,7m11: move lines 4 through 7 to line 11
258
4,7t11: copy lines 4 through 7 to line 11
259
3,4j: join lines 3 and 4 together
260
3,4J: join lines 3 and 4 together with a space between
261
g/x/ p: print every line that has an x
262
v/x/ p: print every line that does not have an x
263
B: find the line with the balancing brace
264
b: brouse the current file, which is assumed to be in html
265
b foo.html: edit the file foo.html and browse it
266
b url: fetch url from the internet and browse it
268
g: go to the link on the current line
269
g2: go to the second link on the current line
270
^: the back key, go back to the web page you were looking at before
271
i=xyz: set the input field on the current line to xyz
272
i2=xyz: set the second input field on the current line to xyz
273
i2*: push the second button on the current line, usually submit or reset
274
i3?: describe the third input field on the current line
275
db: set debug level [0-7]
277
bl: break line into sentences and phrases
278
dr: directory is readonly
279
dw: directory is writable, and d moves files to your recycle bin
280
dx: directory is writable, and d deletes files
281
hf: show hidden files in directory listing (toggle)
282
bd: binary detection on files (toggle)
284
el: show end markers ^$ when a line is listed
285
ep: show end markers when a line is listed or printed
287
ft: show the title of the current web page
288
fd: show the description of the current web page
289
fk: show the keywords of the current web page
290
hr: http redirection (toggle)
291
js: allow javascript (toggle)
292
sr: send referrer (toggle)
293
tn: send dos-style newlines on lines in textareas (toggle)
295
fmp: ftp mode passive
296
fmd: ftp mode default, passive then active
297
rf: refresh the web page or directory listing
298
et: edit this web page as pure text
299
vs: verify ssl connections (toggle)
300
ip: show referenced ip numbers, usually for saved mail messages
301
sm: send mail [account number]
304
<H3 align=center> <A NAME=tips> Tips for Avoiding Line Numbers </A> </H3>
306
If you're new to ed, you may find this program awkward.
307
I often receive complaints about line numbers.
308
People hate line numbers.
309
They don't want to read the first page line by line,
310
1p 2p 3p 4p 5p etc.
311
Well I hate line numbers too, and I never use them.
315
If you just want to read the whole document, type ,p.
316
That works, if you use a command line speech adapter.
317
The whole document is in buffer, and you can read through it using the function keys on your adapter.
318
Now I realize most people still use screen readers, so this won't work.
319
Still, there's an easy way to step through screen by screen.
320
Start with 1z20 to get the first 20 lines.
321
Then the z command will give you the next 20, and the next 20, and so on.
322
You may want to use 22, or 24, or whatever makes sense relative to your screen.
325
Another approach is to simply hit return, again and again, and proceed line by line.
326
You may need to hit a function key to "read" each line,
327
after you hit return,
328
or maybe not, if your adapter has an autoread feature.
331
Once you are use to the regular expressions, you can jump to any part of the document,
332
even a large document, in record time simply by searching for a unique text fragment.
333
This comes with practice.
334
Sometimes I guess wrong, and my search string is not unique.
335
I wind up somewhere else and have to search again.
336
This doesn't happen very often.
337
I usually get to the right place in one or two tries.
340
If you want to mark certain lines of text, please don't try to remember the line numbers.
341
Use the k command to mark them.
342
I usually use ka and kb to mark the start and end of a block of text,
343
while kc marks the new location.
344
The move command is then 'a,'bm'c - with absolutely no line numbers.
345
(This is standard ed fair, though most people never take advantage of it.)
348
To look for links on a web page, search for the right brace.
349
Yes, you may stumble across a literal right brace in the text, but this doesn't happen very often.
350
You might access a particular link by typing /{Next}/g.
351
Similarly, you can look for input fields by searching for the greater than sign.
352
(This will make sense as you read about the representation of web pages.)
353
And of course, multiple operations can be scripted, a feature unique to this browser.
356
These are just some of the tips and tricks that will make you as fast and efficient as anybody using a screen editor or browser,
357
provided you are familiar with the page.
358
(You will never be faster than your sighted colleague when traveling through unfamiliar territory,
359
no matter what system you use.)
360
My wife is always amazed at how quickly I can negotiate websites,
361
or edit the common documents that we work on together.
363
<H3 align=center> <A NAME=mlist> Mailing List </A> </H3>
365
There is a mailing list for users of edbrowse and other command line utilities.
366
You can join by sending mail to
367
<A HREF=mailto:commandline-subscribe@yahoogroups.com?subject=Subscribe>
368
commandline-subscribe@yahoogroups.com</A>.
370
<H3 align=center> <A NAME=dev> Important Deviations From /bin/ed </A> </H3>
372
Certain search/substitute commands may behave differently under this editor.
373
This is because the regular expressions are interpreted
374
by the perl compatible regular expression (pcre) library,
375
rather than the traditional regexp library.
376
Hence regular expressions have more features, and more power,
377
than the regular expressions employed by /bin/ed.
378
The syntax is also somewhat different.
76
379
For instance, perl uses bare parentheses where ed uses escaped braces --
77
to delimit sections of matched text.
380
to delimit sections of matched text.
78
381
And perl uses $1 ... $9 to reference the matched substrings,
79
whereas ed uses \1 ... \9.
382
whereas ed uses \1 ... \9.
80
383
Also, perl supports the i suffix, for case insensitive search,
81
along with the traditional g (global) suffix.
82
There is no reason to describe all the nuances here.
384
along with the traditional g suffix for global substitute.
385
There is no reason to describe all the nuances here.
83
386
Please read the perlre man page `man perlre' for a full description
84
of regular expressions under perl.
85
Once you are accustomed to their power and flexibility
387
of regular expressions under perl.
388
Once you are accustomed to their power and flexibility,
86
389
you'll never go back to ed.
89
Great! You've read the perlre man page, and you're back.
90
Here are a few changes that I've made to perl regular expressions.
392
Great! You've read the perlre man page, and you're back.
393
Here are a few changes that I've made to perl regular expressions.
91
394
I have found that ( and ) are almost always meant to be literal,
92
395
as in searching for myFunction(),
93
so I reverse the sense of escaped parentheses in perl.
396
so I reverse the sense of escaped parentheses in perl.
94
397
That is, ( and ) now match the literal characters,
95
and \( and \) are used to demark substrings of the matched text.
96
These substrings are then referenced, in the replacement string, by $1 through $9.
97
Similarly, | means a literal |, and \| is alternation.
398
and \( and \) are used to demark substrings of the matched text.
399
These substrings are then referenced, in the replacement string, by $1 through $9.
400
Similarly, | means a literal |, and \| is alternation.
98
401
I also change the sense of &, on the right hand side,
99
to mean what it means in ed.
100
I leave ^ $ . [ ] + * ? and {n} alone, to be interpreted by perl,
101
as described in the perlre man page.
102
My changes to regexp, to look more like ed, may be confusing
103
if you are a perl expert.
402
to mean what it means in ed.
403
I leave ^ $ . [ ] + * ? and {m,n} alone, to be interpreted by perl,
404
as described in the perlre man page.
405
However, if * is the first character, it is treated as a literal star.
406
This makes sense, as there is no previous character to modify.
407
Some versions of ed do this, some don't.
408
But I find it convenient; when I want to replace * + or ?, I don't have to escape it, just because it is a modifier.
409
Similarly, an open bracket by itself is treated as literal.
410
These changes to regexp, to look more like ed, may be confusing
411
if you are a perl expert.
104
412
Sorry about that, but I think these changes make this
105
editor much easier to use, for everyone,
106
especially the experienced ed users.
413
editor much easier to use for everyone,
414
especially the experienced ed users.
107
415
Below are some additional differences between this program and /bin/ed.
111
Lines beginning with # are ignored, making it easier to comment your edbrowse scripts.
419
Lines beginning with # are ignored, making it easier to comment your edbrowse scripts.
112
420
The # character has no special significance in the middle of a line.
115
Lines beginning with ! implement a shell escape.
116
The ! character has no special significance in the middle of a line.
117
The ! alone spawns an interactive subshell - type exit to return to edbrowse.
423
Lines beginning with ! implement a shell escape.
424
The ! character has no special significance in the middle of a line.
425
The ! alone spawns an interactive subshell - type exit to return to edbrowse.
118
426
The work "ok" is printed when the shell command is finished -
119
427
thus you can tell when a no-output command is done.
122
Type `cd dirname' to change directories.
123
The new directory is always printed.
124
Type cd alone to find out where you are.
430
Type `cd dirname' to change directories.
431
The new directory is always printed.
432
Type cd alone to find out where you are.
125
433
I don't know what happens under dos
126
434
if you type cd f:/this/that, I never tested it.
127
Type "cd -" to go back to the directory you were in before.
130
Unlike bash, edbrowse does not retrace your steps back through symbolic links.
437
Unlike bash, edbrowse does not retrace your steps back through symbolic links.
131
438
Thus .. is always the physical parent directory.
134
environment variables are expanded before the cd command is applied, including the leading ~.
441
environment variables are expanded before the cd command is applied, including the leading ~.
135
442
Thuse cd ~/work takes you to the work directory under your home directory.
138
This command does not change any filenames that may be active.
445
This command does not change any filenames that may be active.
139
446
You can edit foo, cd .., and write,
140
and foo will be copied to the parent directory.
447
and foo will be copied to the parent directory.
141
448
That's probably not what you want, so be careful.
144
451
r operates on the current line by default,
145
rather then the last line.
452
rather then the last line.
146
453
Use $r to read a file at the end of your working text.
149
The w+ command appends to the file.
456
The w+ command appends to the file.
150
457
Some versions of ed use w> for this operation,
151
458
but for 40 years > has been the industry standard for write with truncate,
152
so using > for append is somewhat confusing.
459
so using > for append is somewhat confusing.
153
460
And w>> is just too clunky, so I use w+.
156
463
w/ writes the data into a file whose name is the last component
157
of the current file name.
464
of the current file name.
158
465
This is useful when you've just downloaded this.that.com/foo/bar/package-2.7.7-22.tar.gz,
159
and you want to write the file locally, but don't want to retype the stuff at the end.
466
and you want to write the file locally, but don't want to retype the stuff at the end.
160
467
Alternatively, f/ changes the filename, keeping only the last component.
163
470
Whenever a file is read from or written to disk,
164
$var, in the filename, is replaced with the corresponding environment variable.
471
$var, in the filename, is replaced with the corresponding environment variable.
165
472
Thus you can edit your address book at any time via `e $adbook',
166
provided $adbook has been set in your environment.
473
provided $adbook has been set in your environment.
167
474
Also, a leading ~/ is replaced with $HOME/,
168
475
making it easy to edit files in your home directory
169
476
such as ~/.profile.
172
Shell metta characters are also expanded, provided the result is one file name.
173
You can read or write a file by typing a minimal portion of its name.
479
Shell metta characters are also expanded, provided the result is one file name.
480
You can read or write a file by typing a minimal portion of its name.
174
481
Neither $variables nor stars are expanded for files on the command line,
175
as this expansion is already done by the shell.
176
Of course, if you're on DOS or Windows, that expansion is not performed,
177
so this program performs the expansion for you.
178
This is an attempt to remain portable.
179
You should be able to edit *.c in any operating system
482
as this expansion is already done by the Unix shell.
483
Windows users should compile using the setargv.obj utility,
484
which performs wildcard expansion on command line arguments.
485
Thus you should be able to edit *.c in any operating system
180
486
and get all the C source files in the current directory.
183
489
Many versions of ed place a $ at the end of a listed line,
184
but this is not one of them, at least not by default.
490
but this is not one of them, at least not by default.
185
491
I use a linear speech adapter, rather than a screen reader,
186
so the embedded newlines tell me exactly where the line boundaries are.
492
so the embedded newlines tell me exactly where the line boundaries are.
187
493
The extraneous $ character just gets in my way.
190
496
However, I realize most people still use screen readers,
191
497
where trailing whitespace is indistinguishable from the blank screen,
192
and a wrapped fragment is sometimes mistaken for a second line.
193
Therefore, you can use the command `el' to place end markers around listed lines.
194
Listed lines begin with ^ and end with $.
195
Enter `ep' to place end markers around all printed lines.
498
and a wrapped fragment is sometimes mistaken for a second line.
499
Therefore, you can use the command `el' to place end markers around listed lines.
500
Listed lines begin with ^ and end with $.
501
Enter `ep' to place end markers around all printed lines.
196
502
Use `eo' to turn end markers off.
492
833
And then listed, you will see the very same text,
493
but there is a bell and a 1/2 character inside.
494
The ~x is not encoded into anything, because x is not a hex digit.
834
but there is a bell and a 1/2 character inside.
835
The ~x is not encoded into anything, because x is not a hex digit.
495
836
If you want to force a ~, even though there are hex digits following,
496
837
use two tildes, ~~.
499
When you are entering a regular expression, you have the choice, hex or octal.
500
My program converts ~xx, as a hex value,
501
and the perl regexp machinery converts \nnn, as octal.
502
Thus any of the following will undos a file.
840
When you are entering a regular expression, you have the choice, hex or octal.
841
This program converts ~xx, as a hex value,
842
and the perl regexp machinery converts \nnn, as octal.
843
Thus any of the following will undos a file.
503
844
The first is translated via my software, the second and third by perl regexp.
505
<P><PRE><font size=4 face=Arial,Helvetica,sans-serif>,s/~0d$//
846
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>,s/~0d$//
511
852
Embedded escape characters are always displayed in hex,
512
whether the line is listed or not.
853
whether the line is listed or not.
513
854
Most terminals and terminal emulaters, including the Linux console
514
855
and my speech adapter,
515
interpret various escape sequences as control commands.
856
interpret various escape sequences as control commands.
516
857
Thus an errant escape sequence from a binary file could send your terminal or your speech adapter into an unexpected state,
517
making recovery difficult.
518
It seems prudent to render escapes as visible characters all the time.
858
making recovery difficult.
859
It seems prudent to render escapes as visible characters all the time.
519
860
If you have no idea where that ~1b came from, it's probably a literal escape character.
522
Returns and nulls are also converted into hex all the time.
523
Thus an embedded return will not make one line look like two lines.
524
You will usually see this when importing a dos text file.
525
Every line ends in ~0d.
863
Returns and nulls are also converted into hex all the time.
864
Thus an embedded return will not make one line look like two lines.
865
You will usually see this when importing a dos text file.
866
Every line ends in ~0d.
526
867
Issue one of the three commands shown above to undos the file.
528
<H4 align=center> Binary Files </H4>
869
<H3 align=center> <A NAME=bfile> Binary Files </A> </H3>
530
871
Data is considered binary if it is sufficiently large
531
872
(more than 50 bytes)
532
and it contains a significant fraction of non-ascii or null characters (more than 25%).
873
and it contains a significant fraction of non-ascii or null characters (more than 25%).
533
874
International text may contain scattered binary codes, for accented letters etc,
534
but most of the characters should still be ascii.
535
Therefore binary data is not international text.
875
but most of the characters should still be ascii.
876
Therefore binary data is not international text.
536
877
In fact you probably won't be able to display or edit binary data effectively,
537
at least not by this program.
538
But don't let that stop you.
878
at least not by this program.
879
But don't let that stop you.
539
880
As an exercise, create an executable program that prints "hello world",
540
then edit the executable using this editor.
541
Look for the string "hello world" and replace world with jorld.
542
Write the file and run the executable.
881
then edit the executable using this editor.
882
Look for the string "hello world" and replace world with jorld.
883
Write the file and run the executable.
543
884
You should now see "hello jorld".
546
When binary data is first read into the buffer, you will see the words "binary data".
547
After that the buffer remains "binary", even if you delete all the data and read in ascii text.
887
When binary data is first read into the buffer, you will see the words "binary data".
888
After that the buffer remains "binary", even if you delete all the data and read in ascii text.
548
889
You must use the `e' command to get a fresh, ascii buffer.
551
For the most part it doesn't really matter if the data is considered binary or ascii.
892
For the most part it doesn't really matter if the data is considered binary or ascii.
552
893
Either way you can display and edit the data, and write it to a file.
555
This program tries to "do the right thing" under DOS/Windows.
896
This program tries to "do the right thing" under DOS/Windows.
556
897
That is, it converts crlf to and from newline if it believes the file is text;
557
otherwise it leaves the file alone.
559
<H4 align=center> Accessing A URL </H4>
898
and it leaves binary data alone.
899
These distinctions are not relevant on Unix/Linux.
902
Although this approach is satisfactory for English and most European languages,
903
it fails miserably for Asian languages, which definitely look like binary data.
904
You can disable binary detection by entering the `bd' command.
905
If you speak an Asian language,
906
you may want to put this command in your init script,
907
so edbrowse comes up the way you want -
908
treating your international files as text files.
911
If you speak an Asian language, and you are running Windows,
912
and binary detection is disabled,
913
<em>don't</em> use this program to manipulate binary files,
914
as they will get corrupted!
915
Better still, say goodbye to Windows and start using a real operating system.
917
<H3 align=center> <A NAME=dir> Directory Scan, File Manager </A> </H3>
919
If you edit a directory
920
you will see a list of all the visible files in that directory,
921
in alphabetical order.
922
(Use the `hf' option if you want to see the hidden files too.)
923
Type g to go to one of these files or sub directories.
924
Type ^ to return to the parent directory.
925
(Note, g is the "go" command, and ^ is the back key; more on this later.)
926
Thus you can traverse an entire directory tree
927
as though you were inside a file manager.
930
Like `ls -F', a subdirectory is indicated by a trailing slash.
931
This slash is not part of the filename.
932
Similarly, named pipe is indicated by |,
934
block special by *, character special by <,
935
and socket by ^.
936
If a regular file ends in one of these characters, it may confuse you,
937
but it won't confuse this program.
938
Edbrowse knows whether that trailing | is part of the filename
939
or a pipe indicator.
940
Since each file is represented by a single line of text,
941
files with newlines embedded in their names cannot be accessed.
944
If you read a directory into a preexisting file it is just text.
945
You can't visit any of the underlying files, because they are just words.
946
You must edit a directory in its own session
947
or read a directory into an empty session
948
if you want to access the underlying files.
949
Note that you can write the buffer to another editting session,
950
and in that session the words are just words.
951
This distinction is important as we start to edit the text.
954
By default, directories are readonly.
955
If you try to delete a line, and hence the associated file,
956
it will tell you that you are still in directory read mode.
957
I'm trying to save you from yourself!
958
Type dw to enable directory writes,
959
and dr to make directories readonly again.
962
When directory writes are enabled,
963
you can remove files using the d command.
964
For instance, g/\.o$/d removes all the object files.
965
Since these edits have implications outside the scope of this program,
966
there is no undo capability.
967
When you make a change it is made.
968
With this in mind, I borrowed a good idea from Microsoft.
970
The deleted file isn't actually deleted;
971
it is moved to your recycle bin,
972
located in $HOME/.recycle.
973
So if you accidentally type ,d and remove all your files,
974
you can recover them from your recycle bin.
975
You may want to set up a cron job that removes
976
all the files from your recycle bin once a week.
977
This directory is created mode 700, so nobody else can look at your deleted files.
978
If you create this directory yourself, please make it 700.
979
After all, some of your files might be private.
982
Because this operation is a move, rather than a true delete,
983
there are a few restrictions based on your operating system.
984
If your OS can move directories,
985
this program will be able to delete a subdirectory as easily as a file.
986
The entire subtree is moved to your recycle bin.
987
Make sure your cleanup cron job is capable of removing directory trees, not just files.
990
Depending on your OS, you may not be able to move files across file systems.
991
From /disk2 to /disk1, or from the D drive to the C drive.
992
In this case you might want to issue the dx command,
993
which makes directories writable, like dw, but actually deletes the files.
994
You'll need this if you're trying to free up space on the disk.
995
Note that symbolic links are always deleted;
996
there isn't much point in moving a link to the recycle bin.
999
"What's the point of all this?" you may ask.
1000
"What's wrong with the shell?"
1003
Nothing, as long as the file names are small and familiar.
1004
But sometimes the file names are long and cumbersome,
1005
and it is nearly impossible to type those names into the shell,
1006
character for character, upper and lower case, with no mistakes.
1007
Meta characters such as the * can help,
1008
but only when the file you want has a name radically different from the other files in the directory.
1009
This isn't always the case.
1010
Suppose an application generates log files as follows.
1012
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>ProgramFooBar.-04-04-1998.06:31:59.log
1013
ProgramFooBar.-04-11-1998.11:37:14.log
1014
ProgramFooBar.-04-18-1998.16:22:51.log
1018
How do you delete the old ones and keep the most recent,
1019
or rename them to something more manageable?
1020
Stars are a bit risky; you can access multiple files without realizing it.
1021
And we're not even talking about those pesky files with spaces or invisible control characters in their names.
1022
Our sighted friend calls up his file manager and simply clicks on the file he wants to view or edit or remove.
1023
Sometimes I want/need that kind of power.
1026
When the substitute command changes text, it renames the underlying file.
1027
This won't move the file on top of another existing file,
1028
so you can't lose any data this way.
1029
Again, I'm saving you from yourself.
1032
The search and substitute commands ignore the trailing filetype characters.
1033
If you want to rename a directory from foo/ to foobar/,
1034
you can type s/$/bar/.
1035
The bar will be placed at the end of the word foo, because the trailing / isn't really there.
1038
Now suppose you want to run an arbitrary program on some of these files.
1039
This could be a print utility,a compiler, whatever.
1040
Sometimes you can rename the files for your convenience, then work in the shell.
1041
But sometimes you don't own the files,
1042
and sometimes they must retain their original names.
1043
This happens when several html documents reference each other through hyperlinks,
1044
using their existing filenames.
1045
So you can't rename the files, yet you still want to run your program on one or two of them.
1048
You can run any program on any file without retyping that filename via the shell escape.
1049
Use kx to assign the label x to the file you are interested in.
1050
(This is standard ed syntax.)
1051
Then run !program 'x
1052
to invoke your program on that file.
1053
This sounds involved, but it is merely macro substitution, implemented in a few lines of code.
1054
If 'x is present in a shell escape, and is not next to any letters or digits,
1055
we replace it with the text on the line labeled x.
1056
Thus if your filename contains spaces, you'd better run !program "'x",
1057
to make sure the entire file name is one argument to the running program.
1060
The token '. is replaced with the text on the current line,
1061
and the token '_ is replaced with the current filename.
1062
If you try to write a file, and remember that you left it readonly,
1063
you can make it writable via !chmod +w '_,
1064
then write the text to the file.
1067
You can expand multiple tokens in one shell command.
1068
Use kx and ky to mark two files that you want to compare, then run !diff 'x 'y.
1071
This feature is not limited to directory scans.
1072
You may be editing a simple file,
1073
but you can still paste the contents of a line into your shell command.
1074
Off hand I don't know why you'd want to do this,
1077
<H3 align=center> <A NAME=case> Upper/Lower Case </A> </H3>
1079
The `lc' command converts a line to lower case,
1080
and `uc' converts it to upper case.
1081
Perl users will recognize these directives.
1082
As an extension, `mc' converts to mixed case, capitalizing the first letter of each word,
1083
and the d in mcdonald.
1086
This is especially useful in a directory scan.
1087
The last thing a blind person wants to worry about is whether some of the letters in a file name are upper case.
1088
If directory write mode is enabled,
1089
type ,lc to convert all the file names to lower case.
1093
If you want to upcase a particular word, type s/word/uc/.
1094
This converts the word to upper case.
1095
All the other substitution suffixes apply.
1096
To change foo, Foo, FOo, and FOO to FOO, everywhere,
1097
type ,s/\bfoo\b/uc/ig.
1099
<H3 align=center> <A NAME=bl> Break Line </A> </H3>
1101
The `bl' command breaks the current line into sentences and phrases,
1102
each about 70 characters long.
1103
It also compresses white space and strips white space from the end of the line.
1104
If the line contains return characters,
1105
these are turned into line separaters -
1106
places where the line will definitely be cut.
1107
The only white space that is preserved is the tabs or spaces
1108
at the beginning of the line, or after each return character.
1109
This is a modest attemp to keep indented text indented,
1110
if that makes any sense?
1113
I use this feature in two different ways.
1114
If I am familiar with the document,
1115
(I probably wrote it),
1116
I may use the bl command on a line of text that seems rather long.
1117
I typed it in quickly, as an uninterrupted thought, and now I want to break it up.
1118
But I don't want to count punctuation marks and say,
1119
"I think we need a break after the third comma
1120
and the period following that and then at the next comma",
1121
issuing the s punctuation commands along the way.
1122
Oh I like the s commands well enough - they put you in complete contrl -
1123
but it's easier to type bl - and bl usually does the right thing.
1124
Also, bl compresses accidental double spaces,
1125
a typo that I will never hear if I simply read the line as a whole.
1128
When the document comes in from the outside,
1129
usually from another word processor such as MS-Word,
1130
bl serves a completely different function.
1131
Paragraphs are often stored on a single physical line.
1132
Sometimes the entire document is on a single line,
1133
with return characters, \r, separating paragraphs.
1134
Wysiwyg word processors don't worry about separating sentences and phrases -
1135
that's what word wrap is for.
1136
Well - bl is our version of word wrap.
1137
It doesn't try to conform to any screen;
1138
it merely cuts the text into manageable chunks,
1139
each piece a separate semantic unit.
1141
physical lines will contain sentences or phrases, as delimited by punctuation,
1142
or by the newline/return characters embedded in the original document.
1145
If one of the original lines, delimited by newline or return,
1146
is long, i.e. more than 120 characters,
1147
it is assumed to be a self-contained paragraph,
1148
and a blank line is added before and after.
1149
Thus a disassembled paragraph containing 20 sentences
1150
does not simply flow into the next disassembled paragraph containing 18 more sentences.
1151
An empty line separates the two paragraphs.
1152
This is only applicable if bl is applied to a range of lines,
1153
or the entire document,
1154
as might occur when making an outside document readable.
1157
Don't apply the bl command to a preformatted section,
1158
such as a table or ascii art.
1159
If you're not sure what to expect,
1160
i.e. you didn't write the file,
1161
scan through it first,
1162
and apply bl to the range of lines that actually represents text.
1163
Often this is the entire document (,bl).
1164
The following commands do a pretty good job of cleaning up a typical Microsoft Word document.
1167
<PRE><font size=3 face=Arial,Helvetica,sans-serif>e whatever.doc or whatever.wps
1168
# change filename, so you don't accidently overwrite the microsoft document
1170
,s/[~80-~ff~00-~0c~0e-~1f]//g # strip out non ascii control/formatting codes
1171
g/^\s*$/d # these blank lines use to contain non ascii codes
1172
,bl # break lines and paragraphs
1173
1,20p # first couple lines are often garbage, but then the text begins.
1177
Of course the program catdoc does a better job of converting word documents into text.
1178
This is often bundled with xls2cvs.
1179
These are must-have programs for people who want a command line environment.
1181
<H3 align=center> <A NAME=race> Race Conditions </A> </H3>
1183
Suppose you are writing a file,
1184
and edbrowse truncates the existing file,
1185
then the computer crashes before edbrowse can write the new data.
1186
When you bring your computer back to life,
1187
your file is empty, zero bytes, and all your work is lost.
1190
This is a narrow window to be sure;
1191
the computer has to fail at precisely the wrong millisecond.
1192
To guard against this improbable calamity,
1193
some editors write your data to a temp file,
1194
remove the true file, and move the temp file over to the true file.
1195
This way your data cannot be lost.
1196
Either the new or the old file will survive.
1199
Then links came on the scene, hard links, and then symbolic links.
1200
Authors of ed, and other editors, had to scramble.
1201
You can't remove a link, write to temp,
1202
and move the temp file over to the link.
1203
It isn't a link any more, it's a regular file,
1204
and your filesystem is not what it use to be.
1205
For one thing, the true file, pointed to by the (symbolic) link,
1206
has not been changed at all.
1207
This is not what you want!
1208
So people rewrote there editors to disable this feature if the named file is
1209
a link to some other file.
1210
They had to revert back to the old truncate and write paradigm,
1211
and hope that nothing bad happens in between.
1212
And you know what, it never does.
1213
The window is just too small.
1216
With this in mind, edbrowse doesn't mess with temp files at all.
1217
I just don't bother.
1218
I truncate the file and write out the data,
1219
and I don't expect anything to go wrong during the critical millisecond.
1222
Another race condition is more subtle.
1223
Suppose you are editing a file and your friend,
1224
or a system program, edits the same file.
1225
Your file has actually been changed out from under you,
1226
while you held it in memory.
1227
When you go to write your changes,
1228
they will clobber any changes made by your friend, or the system utility.
1229
Most text editors guard against this by watching the timestamp.
1230
When you first edit the file foo,
1231
an editor might remember the timestamp on foo.
1232
then, when you are ready to write your changes,
1233
it checks the timestamp, and if foo has been updated in the interim,
1234
it issues a warning message.
1235
"File has been updated by someone else -
1236
do you really want to write?"
1239
This is a good feature,
1240
but edbrowse doesn't have it, simply because I haven't gotten round to writing it.
1241
I'm the only user on my PC,
1242
and you're probably the only user on your PC too,
1243
so this feature is not in high demand.
1244
Still, I should implement it some day.
1246
<H3 align=center> <A NAME=url> Accessing A URL </A> </H3>
561
1248
Instead of invoking `e filename', you can invoke `e http://this.that.com/file.html',
562
and the editor will retrieve the named file using the http protocol.
563
The source (i.e. raw html) is made available for edit.
564
You can modify it and save it on your local machine.
1249
and the editor will retrieve the named file using the http protocol.
1250
The source (i.e. raw html) is made available for edit.
1251
You can modify it and save it on your local machine.
565
1252
Because the text was retrieve from another machine,
566
1253
it cannot be written back to that machine,
567
hence the `w' command will not work.
1254
hence the `w' command will not work.
568
1255
You must specify a local file `w myfile.html',
569
1256
or another editing session `w3'.
572
1259
Note that this is not browsing, we are simply retrieving text from
573
another machine and editing it locally.
574
The text need not be html, it could be (for instance) a plain ascii document.
1260
another machine and editing it locally.
1261
The text need not be html, it could be (for instance) a plain ascii document.
575
1262
Many people, myself included, put various types of files, even executables,
576
on their web sites for retrieval.
1263
on their websites for retrieval.
577
1264
Of course you wouldn't want to edit a binary file,
578
1265
but you can still use this editor to retrieve the file and save it locally,
579
1266
thus implementing an http download.
582
1269
While inside the editor, you can type `e URL'
583
1270
to leave the current buffer and
584
retrieve text from a remote machine.
585
Or you can type `r URL' to retrieve remote text and add it to the current buffer.
1271
retrieve text from a remote machine.
1272
Or you can type `r URL' to retrieve remote text and add it to the current buffer.
586
1273
There is no `w URL' command, because the http protocol
587
does not allow you to "write" html source onto a remote machine.
1274
does not allow you to "write" html source back to a remote machine.
590
1277
As a convenience, any filename with two or more embedded dots
591
1278
and a standard suffix (such as .com or .net)
593
You can usually omit the http:// prefix.
594
Try invoking `e www.whitehouse.gov'
595
to view the home page of the capitol of the United States.
596
But again, you are looking at html source, which probably isn't what you want.
1279
is treated as a URL.
1280
You can usually omit the http:// prefix.
1281
Try invoking `e www.space.com',
1282
as an example.
1283
But again, you are looking at html source, which probably isn't what you want.
597
1284
Browsing will be discussed later.
600
1287
Whenever you retrieve data from a URL, the editor, directed by the http protocol,
601
might change the filename out from under you.
1288
might change the filename out from under you.
602
1289
This is because the resource has moved,
603
and the original computer was kind enough to give you the new address.
604
If debugging is set to 1 or higher,
605
you will see a series of three or four different URLs
606
as the editor is redirected across the internet.
1290
and the original computer was kind enough to give you the new address.
1291
If debugging is set to 2 or higher,
1292
you might see a series of three or four different URLs
1293
as the editor is redirected across the internet.
607
1294
Finally it retrieves your document,
608
and the current file name holds the correct URL.
609
You might want to update your bookmark file accordingly.
610
Then again, you might not.
1295
and the current file name holds the correct (latest) URL.
1296
You might want to update your bookmark file accordingly.
1297
Then again, you might not.
611
1298
Sometimes the initial url is the "public" location of the web page,
612
and subsequent redirections occur inside the company.
1299
and subsequent redirections occur inside the company.
613
1300
In this case you'll want to retain the public url,
614
which will always work, even if the company relocates its web server.
1301
which will always work, even if the company relocates its web server.
615
1302
Use youre best judgment.
617
<H4 align=center> Browse Mode </H4>
1304
<H3 align=center> <A NAME=browse> Browse Mode </A> </H3>
619
1306
If the editor contains html text, from any source,
620
you can type `b' to activate browse mode.
1307
you can type `b' to activate browse mode.
621
1308
The command will be rejected only if the buffer is lacking in common html tags,
622
or the editor is already in browse mode.
623
You can force its hand by adding <html> at the top -
624
it will always try to convert such a file.
625
Now the transformed text is readable, without any visible html tags.
1309
or the editor is already in browse mode.
1310
You can force its hand by adding <html> at the top,
1311
or any other tag we recognize -
1312
it will always try to convert such a file.
1313
Now the transformed text is readable, without any visible html tags.
626
1314
In other words, <P> has been turned into a paragraph break,
627
<OL> has become an ordered (numbered) list, and so on.
628
The filename is also changed; a .browse suffix has been appended.
1315
<OL> has become an ordered (numbered) list, and so on.
1316
The filename is also changed; a .browse suffix has been appended.
629
1317
If you write the transformed data, deliberately or accidentally,
630
1318
the reformatted text will be saved in a new file,
631
without disturbing the original html.
632
This protects you if you are developing your own web pages.
1319
whatever.html.browse,
1320
without disturbing the original html.
1321
This protects you if you are developing your own web pages.
633
1322
BTW, I believe blind people should write raw html,
634
rather than wielding a wysiwyg web development tool such as Front Page.
635
In fact I write all my documents in html, even short business letters.
1323
rather than wielding a wysiwyg web development tool such as Front Page.
1324
In fact I write all my documents in html, even short business letters.
636
1325
I can create headings, lists, tables, etc,
637
without using a wysiwyg editor or a screen reader.
1326
without using a wysiwyg editor or a screen reader.
639
<A HREF=http://www.mcli.dist.maricopa.edu/tut/>
1328
<A HREF=http://www.htmlcodetutorial.com>
640
1329
excellent tutorial</A>
641
1330
will get you started.
644
1333
When the browse conversion is executed, the system checks for
645
common syntax errors, such as a numbered list that is never closed.
646
If the file name is a URL, these syntax errors are not reported.
647
After all, it's not your web page, and there's nothing you can do about it.
1334
common syntax errors, such as a numbered list that is never closed.
1335
If the file name is a URL, these syntax errors are not reported.
1336
After all, it's not your web page, and there's nothing you can do about it.
648
1337
However, if the web page is yours, as indicated by a local filename,
649
1338
the first syntax error is displayed,
650
whence you can return to the html source and fix it.
651
Type `ub' to undo the browse conversion.
652
This takes you back to the raw html text under its original filename.
653
Now you can coorect the error and try the `b' command again.
654
For your convenience, the label 'e is set to the line containing the error.
1339
whence you can return to the html source and fix it.
1340
Type `ub' to undo the browse conversion.
1341
This takes you back to the raw html text under its original filename.
1342
Now you can coorect the error and try the `b' command again.
1343
For your convenience, the label 'e is set to the line containing the error.
655
1344
Repeat this process until `b' runs without errors.
658
1347
If you try to quit, and the editor says "expecting `w'",
659
remember that you should be back in raw html before you issue the write command.
660
You could write the browsable text into file.browse,
1348
remember that you should be back in raw html before you issue the write command.
1349
You could write the browsed text into file.browse,
661
1350
and that will satisfy the "write" criteria,
662
but this isn't really what you want.
1351
but this isn't really what you want.
663
1352
You've corrected errors in the html source, and that's what you need to save,
664
1353
so remember to undo the browse reformatting before you write the file.
667
Note that you can issue the unbrowse command even if there were no errors.
1356
Note that you can issue the unbrowse command even if there were no errors.
668
1357
If, for instance, you are looking at a well-constructed page
669
on some other web site,
670
and you'd like to read or save the raw html, just type ub.
671
As an exercise, invoke `e www.whitehouse.gov',
1358
on some other website,
1359
and you'd like to read or save the raw html, just type ub.
1360
As an exercise, invoke `e www.space.com',
672
1361
and use the `b' and `ub' commands to switch between
673
1362
the raw html and the browsable text.
676
1365
The browse reformatting is relatively simple,
677
because a blind person doesn't want complexity.
1366
because a blind person doesn't want complexity.
678
1367
We don't care about fonts and italics etc, and if we do,
679
the best way to obtain this information is by reading the raw html.
1368
the best way to obtain this information is by reading the raw html.
680
1369
So most tags are discarded, except those related to headers, paragraphs, and lists.
681
I don't indent subsections or list items.
1372
I don't indent subsections or list items.
682
1373
The visual effect is lost on us,
683
and sometimes the extra spaces really get in the way.
1374
and sometimes the extra spaces get in the way.
686
1377
Because the physical line is, for us, the unit of thought,
687
1378
i.e. the atomic construct that is modified or moved or copied,
688
1379
lines are cut at approximately 80 characters, give or take a few,
689
usually at a sentence or phrase boundary.
1380
usually at a sentence or phrase boundary.
690
1381
Thus reading line by line often reveals a sequence of sentences,
691
or at least self-contained phrases within a larger sentence.
1382
or at least self-contained phrases within a larger sentence.
692
1383
I consider this the optimal way to view or edit a document --
694
If you read these words raw, without doing the browse on the file,
695
you'll see what I mean.
1385
If you read this manual raw, without doing the browse on the file,
1386
you'll see what I mean.
1387
Review the <A HREF=#bl>break line</A> command above.
698
1390
The layout of a preformatted section, <pre>, is honored,
699
1391
although sequences of blank lines are compressed down to one blank line,
700
and whitespace at the end of lines is stripped.
1392
and whitespace at the end of lines is stripped.
701
1393
This preserves the structure of street addresses,
702
1394
and other preformatted blocks.
705
Tables are formatted like an ascii unload from a spreadsheet or sql database.
706
Pipes separate the fields on each row.
1397
Tables are formatted like an ascii unload from a spreadsheet or sql database.
1398
Pipes separate the fields on each row.
707
1399
There is no whitespace around the pipes,
708
and the fields of a given row probably won't line up with the fields from the previous row.
1400
and the fields of a given row probably won't line up with the fields below.
709
1401
It isn't pretty,
710
1402
but a blind user can't really trace down a column in any case,
711
especially when using a line editor such as this.
712
Better to write the table to a local file and use cut, sort, join, etc.
1403
especially when using a line editor such as this.
1404
Better to write the table to a local file and use cut, sort, join, etc.
713
1405
Here is a sample table.
715
<P><PRE><font size=4 face=Arial,Helvetica,sans-serif>part number|quantity|price
1407
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>part number|quantity|price
722
Empty fields at the end of a row are dropped.
1414
Empty fields at the end of a row are dropped.
723
1415
These are almost always images -- sometimes an entire row of images --
724
sometimes an entire table of images.
725
The blind user doesn't need to read the zero-content pipes.
1416
sometimes an entire table of images.
1417
The blind user doesn't need to read the no-content pipes.
728
Note that the browsable text is readonly.
729
After all, it's not the "source" -- why should you edit it?
1420
Note that the browsable text is readonly.
1421
After all, it's not the "source" -- why should you edit it?
730
1422
There are ways to enter and edit the input fields of an on-line form,
731
but this will be discussed later.
732
For now, you can think of the text as readonly.
733
Issue a move or copy or insert or substitute command,
1423
but this will be discussed later.
1424
For now, you can think of the text as readonly.
1425
Issue a copy or insert or substitute command,
734
1426
and you'll get an error.
737
If you do want to edit the text, as text,
738
enter the `et' command (edit as text).
739
You will not be able to return to the html that produced this page.
740
Nor can you follow a hyperlink or submit a fill-out form.
1429
If you do want to edit the text, as pure text,
1430
enter the `et' command (edit as text).
1431
You will not be able to return to the html that produced this page.
1432
Nor can you follow a hyperlink or submit a fill-out form.
741
1433
The browsable text has become plain text, with no internet semantics.
744
The command `b file.html' is shorthand for `e file.html', followed by `b'.
1436
The command `b file.html' is shorthand for `e file.html', followed by `b'.
745
1437
Remember that the ub command reverses the browse conversion, and reproduces the original html text,
746
as though you had entered `e file.html'.
1438
as though you had entered `e file.html' alone.
749
1441
If a url is opened from the command line,
750
as in "edbrowse www.google.com", it is automatically browsed.
1442
as in `e www.google.com', it is automatically browsed.
751
1443
Type `ub' to revert back to the raw html.
753
<H4 align=center> Technical, Math </H4>
1445
<H3 align=center> <A NAME=math> Technical, Math </A> </H3>
755
1447
Most people never read technical web pages, but if you do...
758
A subscript, as indicated by html tags, is enclosed in brackets.
759
Thus x<sub>n</sub> becomes x[n].
760
This transformation is not done if the subscript is a one or two digit number.
761
Thus x subscript 1 is rendered x1, just like your professor would say it.
1450
A subscript, as indicated by html tags, is enclosed in brackets.
1451
Thus x<sub>n</sub> becomes x[n].
1452
This transformation is not done if the subscript is a one or two digit number.
1453
Thus x subscript 1 is rendered x1, just like your professor would say it.
762
1454
This is not ambiguous, as you might first think;
763
only programmers use x1 as a variable name, not mathematicians.
764
If you see x1 in a formula, it means x subscript 1.
1455
only programmers use x1 as a variable name, not mathematicians.
1456
If you see x1 in a formula, it means x subscript 1.
765
1457
Even 17a3b3 is not ambiguous;
766
1458
it is a translation of 17 times a[3] times b[3].
769
Superscripts are enclosed in parentheses, with a preceeding arrow.
770
The parentheses are omited if the superscript is a number or letter.
1461
Superscripts are enclosed in parentheses, with a preceeding arrow.
1462
The parentheses are omited if the superscript is a number.
771
1463
Thus x cubed looks like x^3,
772
1464
while x to the n-1 power looks like x^(n-1).
775
1467
There are, sad to say, three different ways to encode mathematical symbols
777
1469
At present edbrowse only supports one of them,
778
though it is the most common, and the most portable among all browsers.
779
This is the symbolic font face,
1470
though it is the most common, and the most portable among all browsers.
1471
This is the unicode system,
780
1472
where the Greek letter theta is specified as
781
<font face=symbol>q</font>.
782
Explorer turns this expression into <font face=symbol>q</font>,
1474
Explorer turns this expression into θ,
783
1475
one character on the screen,
784
while edbrowse turns it into the word theta.
785
It also puts spaces around the word
786
if its neighbors are also words.
787
This is illustrated by the circumfrence of a circle, which is 2 times pi times r.
1476
while edbrowse turns it into the word theta.
1477
We also put spaces around the word
1478
if its neighbors are also words.
1479
This is illustrated by the circumfrence of a circle, which is 2 times pi times r.
788
1480
These three tokens are usually squashed together,
789
1481
and there is no confusion in the sighted world,
790
where pi is a separate Greek letter.
1482
where pi is a separate Greek letter.
791
1483
But if pi is spelled out,
792
1484
and the tokens are left together,
794
Now pir looks like a three letter word.
1485
the result is 2pir.
1486
Now pir looks like a three letter word.
795
1487
To avoid this, edbrowse inserts spaces, giving 2 pi r.
796
Other symbols, such as degrees, one half, times, etc,
797
are also expanded into words, with the same whitespace considerations.
800
1490
These translations are designed to work with the pages of the
801
<A HREF=http://www.mathreference.com> on-line math project</A>,
1491
<A HREF=http://www.mathreference.com> Math Reference Project</A>,
802
1492
an archive of advanced mathematics
803
that atemps to be both sighted and blind friendly at the same time.
1493
that atemps to be both sighted and blind friendly at the same time.
804
1494
This may be impossible,
805
but I'm giving it a shot.
1495
but I'm giving it a whirl.
807
<H4 align=center> Title, Description, Keywords </H4>
1497
<H3 align=center> <A NAME=title> Title, Description, Keywords </A> </H3>
809
1499
While in browse mode, the commands ft, fd, and fk
810
produce the title, description, and keywords of the current web page respectively.
811
These are normally not visible to the user.
812
The title describes the web page in 80 characters or less.
1500
produce the title, description, and keywords of the current web page respectively.
1501
These are normally not visible to the user.
1502
The title describes the web page in 80 characters or less.
813
1503
The description is a more complete explanation,
814
which is displayed by a search engine such as yahoo or altavista.
815
The user reads the description via the search engine and decides whether to read that web page.
816
Finally, the keywords are used by search engines to facilitate keyword searches.
1504
which is displayed by a search engine such as yahoo or altavista.
1505
The user reads the description via the search engine and decides whether to read that web page.
1506
Finally, the keywords are used by search engines to facilitate keyword searches.
817
1507
Like the rest of the browsable text,
818
these three attributes are readonly.
1508
these three attributes are readonly.
819
1509
If it is your web page,
820
you can modify them by returning to the raw html.
1510
you can modify them by returning to the raw html.
821
1511
Web designers should pay close attention to the description and the keywords,
822
1512
else your pages will not be accessible via the standard search engines.
825
1515
Note that `ft' prints the title of the web page,
826
whereas `f t' renames the current file to "t".
828
<H4 align=center> Hyperlinks </H4>
830
A link to another web page is enclosed in braces, as in:
833
{Recent reports} suggest a connection between ADHD and food additives.
1516
whereas `f t' (with a space) renames the current file to "t",
1517
which is probably not what you want.
1519
<H3 align=center> <A NAME=rf> The Refresh Command </A> </H3>
1521
Type `rf' to refresh the current file.
1522
This rereads the file or url into the current buffer.
1523
It does not push a new editing session onto the stack.
1524
This is analogous to the refresh button on Netscape and Explorer.
1527
If a web page is updated every minute, e.g. with the latest stock prices for your favorite companies,
1528
you can type rf to fetch the latest copy of this web page.
1529
This assumes the intervening internet servers are not caching the web page
1530
and handing you the same out-of-date copy over and over again.
1533
On your local machine,
1534
you can use this feature to read the latest version of a dynamic file,
1535
such as a log file.
1536
Or you can reread a directory,
1537
to incorporate any new files that have been placed in that directory.
1538
For example, you might use the shell escape to execute
1540
yet z will not appear in your directory scan until you type rf.
1542
<H3 align=center> <A NAME=hlink> Hyperlinks </A> </H3>
1544
A link to another web page is enclosed in braces, like this:
1547
{Recent reports} suggest a connection between autism and intestinal bacteria.
836
1550
Behind the scenes, "recent reports" is linked to
837
www.feingold.org/research.shtml,
1551
www.pecanbread.com/BTVCautismchapter.html,
838
1552
but you don't see that unless you activate the link
839
1553
or view the raw html.
842
1556
Of course the browsable text might also contain words inside braces,
843
especially if the web page is technical in nature.
844
Hence there is some ambiguity.
845
However, I believe it is clear from context.
1557
especially if the web page is technical in nature.
1558
Hence there is some ambiguity.
1559
However, I believe it is clear from context.
846
1560
{More information} is probably a link,
847
1561
whereas ${HOME}/.profile is probably not.
850
1564
Some web pages present a series of icons
851
that are actually links to other pages.
852
That is, you click on an icon, rather than a phrase, to go somewhere else.
853
These icons are suppose to be intuitive.
854
Sometimes they are -- sometimes they're not.
855
In any case, they aren't much use to the blind.
1565
that are actually links to other pages.
1566
That is, you click on an icon, rather than a phrase, to go somewhere else.
1567
These icons are suppose to be intuitive.
1568
Sometimes they are -- sometimes they're not.
1569
In any case, they aren't much use to the blind.
856
1570
Sometimes the web designer is kind enough to supply
857
a text phrase that roughly describes the image.
858
In this case the phrase is used as the link.
859
It appears in braces, as though there were no image at all.
1571
a text phrase that roughly describes the image.
1572
In this case the phrase is used as the link.
1573
It appears in braces, as though there were no image at all.
860
1574
If there is no alternate phrase,
861
the filename of the hyperlink reference is used.
1575
the filename of the hyperlink reference is used.
862
1576
This name can be surprisingly helpful,
863
or it can be utterly useless, as in "index.html".
1577
or it can be utterly useless, as in "index.html".
864
1578
If this name canot be determined,
865
the generic link {image} is used.
1579
the generic link {image} is used.
1580
In this case you will have to go to the web page to find out what it contains.
868
To follow a link, enter the `g' (go) command.
1583
To follow a link, enter the `g' (go) command.
869
1584
Yes, `g' also initiates a global command,
870
1585
such as a global substitute,
871
but only when it is followed by a regular expression.
1586
but only when it is followed by a regular expression.
872
1587
By itself, g follows the link on the current line,
873
4g follows the link on line 4,
874
and g2 follows the second link on the current line.
1588
g2 follows the second link on the current line,
1589
and 4g follows the link on line 4.
875
1590
If a link spreads across multiple lines, you must be on the first of these lines,
876
1591
the line containing the left brace.
879
The g command can also follow a link that is written in raw text,
880
as long as it "looks" like a valid url.
1594
The g command can also act on a link that is written in raw text,
1595
as long as it "looks" like a valid url.
881
1596
If your friend sends you an interesting url via email,
882
1597
and you save it to a text file,
883
1598
you can "go" to that link,
884
even though the file is not html
1599
even though the file is not html,
885
1600
and you've never issued a browse command.
887
<H4 align=center> Internal Links </H4>
1602
<H3 align=center> <A NAME=ilink> Internal Links </A> </H3>
889
1604
Although most links lead to other web pages,
890
some links point to other sections within the current document.
891
Again, you will be able to tell by context.
1605
some links point to other sections within the current document.
1606
Again, you will be able to tell by context.
892
1607
Links in the table of contents are usually
893
shortcuts to chapters in the current document.
1608
shortcuts to chapters in the current document.
894
1609
The same holds for links that look like:
895
1610
see {Appendix I},
896
1611
or, see the section on {Hardware Configuration}.
899
The g command follows an internal link or an external link.
900
Either way you find yourself in a different place.
1614
The g command follows an internal link or an external link.
1615
Either way you find yourself in a different place.
901
1616
However, if the link is internal,
902
you are still browsing the same file.
903
In fact, the only thing that has changed is the current line number.
1617
you are still browsing the same file.
1618
In fact, the only thing that has changed is the current line number.
904
1619
The new line is displayed,
905
and should correspond to the link you activated.
906
Often the words are the same.
907
Activate {Appendix I}, and you'll probably see the section heading "Appendix I".
1620
and should correspond to the link you activated.
1621
Often the words are the same.
1622
Activate {Appendix I}, and you'll probably see the section heading "Appendix I".
908
1623
Enter z10 to read the first few lines of the appendix.
910
<H4 align=center> The Back Key </H4>
1625
<H3 align=center> <A NAME=back> The Back Key </A> </H3>
912
1627
If you edit a new file via the `e', `b', or `g' commands,
913
1628
and you already have text in the buffer,
914
that text is bundled up and pushed onto an internal stack.
915
You can pop the stack by issuing the `^' command.
1629
that text is bundled up and pushed onto an internal stack.
1630
You can pop the stack by issuing the `^' command.
916
1631
This is suppose to be intuitive --
917
1632
the up arrow pointing to the previous page that rolled off your screen.
920
1635
This feature seems rather silly if you're just editing files,
921
but it makes sense when surfing the net.
1636
but it makes sense when surfing the net.
922
1637
Often we descend through two or three links,
923
only to find ourselves at a dead end.
924
"I didn't want to go here."
925
So we hit the back key again and again, until we reach familiar territory.
926
We can now proceed in a new direction.
927
The command ^3 or ^^^ backs up through three pages.
1638
only to find ourselves at a dead end.
1639
"I didn't want to go here."
1640
So we hit the back key again and again, until we reach familiar territory.
1641
We can now proceed in a new direction.
1642
The command ^3 or ^^^ backs up through three pages.
928
1643
Don't use this iterative feature unless you know exactly how many times you need to back up.
931
1646
Note that the entire state of an editing session is saved and reproduced,
932
including the file name, the last change (for undo),
933
the last search/replace strings for substitutions, etc.
934
The only bit that is cleared is the "write pending" bit.
935
After all, the program asked you if you wanted to save the changes
936
when you first edited the new file.
937
Apparently you didn't (having issued the edit command again),
938
so we may as well clear that bit.
939
You can still pop the stack and save the prior changes to disk,
940
but you don't have to.
1647
including the file name,
1648
the last search/replace strings for substitutions,
1649
the hyperlinks and forms,
1650
the compiled javascript,
943
Unlike lynx, I don't keep a running history of every web page visited.
944
I never really saw a need for this feature.
1654
Unlike lynx, I don't keep a running history of every web page visited.
1655
I never really saw a need for this feature.
945
1656
99% of the time I simply want to back up one or two pages,
947
Unfortunately this high-runner operation requires two somersaults and a back flip under lynx.
1657
and that's it.
1658
Unfortunately this high-runner operation requires two somersaults and a back flip under lynx.
948
1659
It is a one key command in my browser.
951
1662
The stack should not be confused with parallel edits,
952
as described in an earlier section.
953
In fact each editing session, e1 e2 e3 ..., has its own internal stack.
1663
as described in an earlier section.
1664
In fact each editing session, e1 e2 e3 ..., has its own internal stack.
954
1665
Parallel sessions are appropriate when you need to move back and forth between two files,
955
or cut&paste between them.
1666
or cut&paste between them.
956
1667
However, one session, with its internal stack,
957
1668
is usually sufficient to surf the net.
1273
I suppose I could interrogate the environment variable $bookmarks
2031
I suppose I could interrogate the environment variable $bookmarks myself,
1274
2032
and append the URL to that file automatically,
1275
but as this example shows, you might not want all the links.
1276
In fact the email link makes no sense in a bookmark file.
2033
but as this example shows, you might not want all the links.
2034
In fact the email link makes no sense in a bookmark file.
1277
2035
Also, you may want to change the description of the link,
1278
2036
though in this example the description is pretty reasonable.
1281
2039
Alternatively, you might discard the url and retain the email address,
1282
appending it to your address book.
2040
appending it to your address book.
1283
2041
Again, you will want to change the generic phrase "send us mail"
1284
to a brief string that is meaningful to you, such as kangaroo-mail.
2042
to a brief string that is meaningful to you, such as kangaroo-mail.
1285
2043
This becomes the alias, which you can use to send mail
1287
Subsequent sections describe the use of this program as a mail client.
2044
to that recipient.
2045
(Subsequent sections describe the use of edbrowse as a mail client.)
1290
2048
If there are no links on the current line, or you are not in browse mode,
1291
the current filename is used.
1292
If the filename looks like a URL,
1293
it will be enclosed in <A> </A> tags,
1294
as though it were a link.
2049
the current filename is used.
1295
2050
This is useful when you want to bookmark the current page,
1296
2051
rather than some other page pointed to by a link.
1299
2054
If the current page is the result of a form submition, the filename
1300
may include your input fields after the question mark.
1301
If it does, that's a feature, not a bug.
2055
may include your input fields after the question mark.
2056
If it does, that's a feature, not a bug.
1302
2057
This exact URL, with the data at the end, can be stored as a bookmark
1303
2058
and activated again and again,
1304
as though you had filled out the form each time.
2059
as though you had filled out the form each time.
1305
2060
Every week you can call up this virtual URL
1306
to see if there is any new information on kangaroos.
2061
to see if there is any new information on kangaroos.
1307
2062
A more practical example might be a canned query that retrieves
1308
2063
the weather for a certain city
1309
or the stock prices for the companies in your portfolio.
1310
You can also write concise shell scripts that "fill in" the virtual
1311
form, simply by modifying the information after the question mark.
2064
or the stock prices for the companies in your portfolio.
2065
You can also write concise scripts that "fill in" the virtual
2066
form, simply by modifying the information after the question mark.
1312
2067
This provides a simple command to retrieve the weather from any major city
1313
2068
or the current price of any stock.
1316
Not all forms support this type of in-URL encoding.
1317
If the A command produces www.search-engine.com,
1318
with no ?data at the end,
1320
You will have to fill out the form interactively every time you want to run this query.
1321
Fortunately most on-line forms allow you to encode the input fields within the URL.
1322
If you are a web designer, do your clients a favor
1323
and use the "get" method in your forms whenever possible.
1324
This will allow others to create and resubmit canned queries with specific input parameters,
1325
or develop shell scripts that query your web site automatically.
1327
<H4 align=center> Cookies </H4>
1329
Some web sites serve "cookies",
2071
If the form uses the post, rather than the get method,
2072
the same data will appear,
2073
but the question mark is replaced with a control a.
2074
Unfortunately the control a is not visible, and this could cause confusion.
2075
When in doubt, list the line.
2078
One last warning about adding links to your bookmark file.
2079
Let's say you've issued your A command, and tweaked the description a bit.
2080
Now the link is just write, and you want to save it.
2081
You accidentally type `w $bookmarks', forgetting the plus.
2082
Instead of apending the link to the end, you have clobbered your entire bookmark file.
2083
Years of accumulated links are gone.
2084
To avoid this disastrous typo, create a macro to append to your bookmark file.
2085
I know, we haven't talked about user defined macros yet, but we will.
2086
And when we do, you should write a "bookmark append" macro that looks like this.
2087
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>function+bma {
2093
Now you can type <bma to add a link to your favorites,
2094
and you don't have to worry about typos.
2095
It's shorter than `w+ $bookmarks' anyways.
2096
We'll return to this topic when we introduce macros,
2098
that are defined in your config file.
2100
<H3 align=center> <A NAME=cook> Cookies </A> </H3>
2102
Some websites serve "cookies",
1330
2103
which your browser is expected to retain
1331
and pass back during subsequent exchanges.
1332
In fact some web sites simply won't work without cooky support.
1333
Therefore edbrowse supports cookies by default.
1334
You can toggle this feature with the `ac' (accept cookies) command,
1335
but you probably don't want to.
2104
and pass back during subsequent exchanges.
2105
In fact many websites simply won't work without cooky support.
2106
Therefore edbrowse always accepts cookies.
1338
Note that only Netscape-style cookies are supported.
1339
However, this is the most common flavor of cooky.
2109
Note that only Netscape-style cookies are supported.
2110
However, this is the most common flavor of cooky.
1340
2111
It will probably meet your needs.
1343
2114
Persistent cookies are stored in a file,
1344
$HOME/.cookies, and are thus available for subsequent edbrowse sessions.
2115
usually $HOME/.cookies,
2116
and are thus available for subsequent edbrowse sessions.
1345
2117
These cookies are used to store long-term information about you,
1346
such as your login and password into amazon.com.
1347
Hence your .cookies file should be mode 0600.
2118
such as your login and password into amazon.com.
2119
Hence your .cookies file should be mode 0600.
1348
2120
In fact the file is created mode 0600, for your own protection.
1351
You probably won't need to view your .cookies file,
2123
You probably won't need to view your .cookies file, ever,
1352
2124
but it is text based, and can be edited directly if you wish.
1353
The file format is consistent with lynx,
1354
if your version of lynx supports persistent cookies.
1355
Thus lynx and edbrowse are interoperable.
1356
You can receive cookies from a web site using one browser,
1357
switch to the other browser, and pass the appropriate cookies back as expected.
1359
<H4 align=center> PDF Files </H4>
1361
The portable document format, pdf, is growing in popularity;
1363
If you want to download a technical manual,
1364
or a scientific paper,
1365
don't be surprised if it is in pdf format,
1366
as indicated by the .pdf suffix on the filename.
1367
Unfortunately this format is completely inaccessible to blind users.
1370
Some pdf files (not all)
1371
can be converted into html,
1372
though the conversion is rather crude.
1373
Still, it is sufficient to read the text and follow the hyperlinks.
1374
Several third parties provide conversion utilities,
1375
but I believe the best utility, now and in the future,
1376
is at access.adobe.com.
1377
After all, who knows more about pdf than its creater, adobe.com?
1378
I doubt anyone else will do a better job converting to and from pdf,
1379
especially as pdf evolves and grows in complexity.
1382
If you retrieve a pdf file from the Internet,
1383
edbrowse automatically routes it through access.adobe.com,
1384
thus converting it into html.
1385
Then the text is rendered in the usual way.
1386
Note that the file name is the name of the pdf document,
1387
but the request actually went to another url.
1388
You might be fetching this.that.com/foobar.pdf,
1389
and see the error "cannot connect to access.adobe.com".
1390
This seems incongruous until you remember that a separate web server,
1391
access.adobe.com, is performing the translation.
1392
If you can't get to both web sites,
1393
e.g. because of an internet problem, you won't be able to retrieve the data.
1396
You can toggle pdf to html conversion
1397
by entering the `ph', pdf to html, command.
1398
When conversion is disabled,
1399
all pdf files will be downloaded as binary files,
1400
and you can do whatever you like with them.
1402
<H4 align=center> Secure Connections </H4>
2126
<H3 align=center> <A NAME=ssl> Secure Connections </A> </H3>
1404
2128
Edbrowse supports the most common method of encrypting web traffic,
1405
HTTP over SSL/TLS, colloquially known as secure http.
1406
Web sites which allow
2129
HTTP over SSL/TLS, colloquially known as secure http.
2130
Websites that support
1407
2131
secure http have URLs of the form:
1408
https://secure.server.com/yawn.html.
1410
<H6 align=center> Prerequisites for https</H6>
1412
In order to use this new functionality, you will need to obtain some
1413
prerequisite software.
1414
Firstly, you must obtain the
1415
<A HREF=http://www.openssl.org/source/>
1416
OpenSSL toolkit</A>.
1417
Then you must obtain the
1418
<A HREF=http://symlabs.com/Net_SSLeay/>
1422
These will need to be installed. The README, INSTALL, and other files supplied
1424
are (somewhat) self-explanatory.
1426
<H6 align=center> Certificate Verification</H6>
1428
When connecting to a server, you will be sent a certificate. This contains
1429
the server's public key, and has been signed by a certifying authority.
1430
This signature can and should be verified. This lessens the chance that
1431
you are dealing with a bogus server. Certifying authorities run checks on
1432
those whom they deal with, and will not sign a certificate for a sham
1433
organization. We verify against a file of certificates from legitimate certifying
1434
authorities. This should be placed in your home directory under the name
1436
A valid file should be obtainable from the
1438
same place as Edbrowse</A>.
1440
additional trusted certificates, as needed, in PEM format, to the end of this file.
1441
You'd want to do this, for example, to access machines on your organization's
1442
intranet if your organization uses it's own private certifying authority.
1444
<H6 align=center> Disabling Certificate Verification</H6>
1446
Sometimes you may not be concerned about the legitimacy of those with whom
1447
you deal. Maybe their certificate is invalid, out of date, etc.
1448
You can toggle certificate verification with the `vs' (verify secure connections) command.
1449
Certificate verification is
1451
Note that disabling certificate verification is a security risk. I wouldn't
1452
send my credit card information to an unverified server.
1453
As of this writing, lynx does not verify any web servers,
1454
and is less secure than edbrowse, Explorer, or Netscape.
1456
<H4 align=center> FTP Retrievals </H4>
1458
This browser supports the retrieval of ftp files and directories. You can
1459
give it an FTP URL like:
2132
https://secure.server.com.
2133
Notice the protocol is https:// rather than http://.
2134
The extra s stands for "secure".
2135
The traffic is encrypted, i.e. mathematically scrambled,
2136
and cannot be intercepted by a nefarious third party.
2139
Edbrowse will verify ssl connections,
2140
if you supply a file of ssl certificates.
2141
This is an antispoofing measure, to make sure a hacker isn't posing as your bank,
2142
trying to steal your account numbers and passwords.
2143
You can grab a certificate file <A HREF=ssl-certs>here</A>,
2144
but I don't always keep it up to date.
2145
If you don't have this file,
2146
or, if you don't specify its location in your config file,
2147
you will not be able to verify secure connections, and you will be warned accordingly.
2148
Some browsers don't have this feature at all, so it's not the end of the world,
2149
but in general it's a good idea to verify your secure connections,
2150
unless it prevents you from getting to a website whose authenticity you accept at face value.
2151
In that case you can use the vs command to turn the feature off.
2152
This is a toggle command; type vs again to turn the feature on.
2155
Never send sensitive information,
2156
such as social security numbers or credit card numbers,
2157
over an insecure channel.
2158
Make sure the form is using ssl.
2159
How can you tell?
2160
The submit button will have the word "secure" added to its text.
2162
<Make your purchase now secure>
2164
This is similar to the lock icon that Explorer uses to tell you that your connection is secure,
2165
although my system is not quite as foolproof.
2166
A website could fake you out by putting the word secure in the submit text.
2169
Note that generic buttons (besides the submit button) can also submit your form,
2170
through javascript.
2171
I don't know if that button is going to submit the form or not,
2172
and I don't want to put the word "secure" on every button on the page.
2173
I only add it to the submit button,
2174
but if that button is secure then they are all secure.
2175
They all use the same form, and the same url.
2178
In theory, it is possible for javascript too switch the destination url out from under you at the last minute,
2179
from https://this.is.safe.com to http://this.is.untrusted.com.
2180
I don't know if other browsers watch for this bait-and-switch, but edbrowse does.
2181
If the original url was secure,
2182
and I reported this to you via <submit secure>,
2183
and javascript changes it to an insecure connection, I won't submit the form.
2184
This is really paranoid,
2185
because the first website, the one that asked for your credit card number,
2186
also supplies the javascript,
2187
and they have no incentive to breech security,
2188
since you're going to hand them your credit card number anyways.
2191
If you have logins on secure servers,
2193
you must keep your password absolutely safe.
2194
Never send that password over an insecure connection.
2195
It becomes as valuable as your credit card numbers.
2196
I have a special password that I use for my secure logins,
2197
and <em>only</em> for those logins.
2198
I use other, expendable passwords when the connection is not secure.
2201
Please don't fall for all those email scams
2202
that tell you your login has expired, and would you please log in again using this convenient form.
2203
The mail is forged to look legitimate,
2204
and the form actually sends your secret password to a thief,
2205
who then rades your account.
2206
A reputable company will
2207
never, never, never, ask you to login through an email form.
2208
They will always tell you to go back to the website and log in there.
2211
Internet security is complex, to say the least,
2212
and it is beyond the scope of this document.
2213
If you have any questions about it,
2214
please send them to me directly.
2216
secure http is really quite safe, and you can use it to send sensitive information across the Net.
2217
It's probably safer than giving your credit card number to the clerk on the phone,
2218
who use to take your order before there was e-commerce.
2219
so it's ok to be a little bit paranoid,
2220
in fact it's probably a good idea,
2221
but don't let that stop you from making your online purchases.
2223
<H3 align=center> <A NAME=ftp> FTP Retrievals </A> </H3>
2225
This browser supports the retrieval of ftp files and directories.
2226
You can provide an FTP URL like:
1460
2227
ftp://ftp.random.com/tarball.tar.gz
1461
and the file will be fetched.
1462
You can also visit an FTP URL from an html file.
2228
and the file will be fetched.
2229
It doesn't matter whether you type in the url yourself,
2230
or it is a hyperlink on a web page.
2231
The file is retrieved, and placed in a local file of the same name.
2232
You will ssee the words:
2236
some stats on the size of the file and the bits per second
2241
Of course the download could fail, in which case you will receive an error message.
2242
If it was simply interrupted,
2243
due to some internet glitch,
2244
you can issue the command again,
2245
and edbrowse will resume the download from where it left off.
2246
This can save time when fetching a large file.
1463
2249
By default, edbrowse uses the account name "anonymous" and the password
1464
"some-user@edbrowse.net" for ftp connections.
1466
<H6 align=center> Parsing Remote Directories</H6>
2250
"some-user@edbrowse.net" for ftp connections.
2251
However, you can override this in the url,
2252
and some web pages take advantage of this feature.
2253
For example, let's say you want to access the file /etc/passwd on whatever.localdomain.
2254
This file isn't readable by anonymous users.
2255
You have to log in as a real person.
2256
Within edbrowse, you might use the command:
2258
e ftp://chris:xxx@whatever.localdomain/etc/passwd
2261
The ftp connection will be made as user "Chris", with password "XXX".
1468
2264
Some ftp URLs point at directories, not files. If you visit one of these,
1469
2265
and it is located on a Unix-like server, you will receive the listing as an
1470
2266
html file with hyperlinks. You can visit the directory members just as
1471
though you were exploring a web site.
2267
though you were exploring a website.
1472
2268
If the server does not run some
1473
2269
flavore of Unix, you will receive the directory listing in plain
1476
<H6 align=center> Accounts Other Than "anonymous"?</H6>
1478
There is another form which ftp URLs may take.
1479
ftp://user:password@host/path/
1480
For example, let's say I want to access the file /etc/passwd on numenor.localdomain.
1481
This file isn't readable by anonymous users.
1482
Within edbrowse, I might use the command:
1483
e ftp://chris:xxx@numenor.localdomain/etc/passwd
1484
to download the file.
1485
The ftp connection will be made as user "Chris", with password "XXX".
1487
<H6 align=center>Modes of ftp</h6>
1489
When you visit an ftp server to download a file or directory listing, two
1490
types of connections are employed. The control connection is used for sending
1491
commands to the ftp host, and the data connection is used to download the
1495
While the control connection is made from the client to the server, the
1496
data connection is usually made from the server to the client. This is
1497
called active mode ftp.
1498
The problem is that this "active mode" doesn't work well if you happen to
1499
be behind a firewall.
1502
The solution is passive mode ftp. The data connection
1503
is made from the client to the server. Edbrowse uses passive mode by default.
1504
But this may not work if the server is behind a firewall. So you have a choice;
1505
use the `pm'command to toggle between passive mode and active mode.
1507
<H4 align=center> Frames </H4>
1509
Frames are a mechanism whereby a web page can fetch and display several other web pages on the screen.
1510
Each subpage is called a frame, and lives in its own space on the screen.
2273
The ftp mode, i.e. the style of data connection,
2274
can be either active or passive.
2275
One works well when the client is behind a router,
2276
and the other works well when the server is behind a router.
2277
You can specify ftp mode active by entering the command `fma',
2278
or ftp mode passive by `fmp'.
2279
The command `fmd' sets the ftp mode to a default,
2280
which tries to establish a passive connection first,
2281
and then an active connection as a fallback.
2282
This is a reasonable default, so you should probably leave this alone.
2285
Edbrowse doesn't actually establish the ftp connections,
2286
rather, it invokes the program ncftpget to fetch the file,
2287
and ncftpls to list the directory.
2288
These programs are distributed with most Unix systems.
2289
If you don't have these programs, please visit
2290
<A HREF=http://www.ncftp.com>ncftp.com</A>.
2293
Once again, review the differences.
2294
Http pulls a file into a buffer in memory, i.e. an edbrowse session,
2295
while ftp copies the file directly to disk.
2296
Also, ftp does not print dots every 100K to indicate progress,
2297
so you just have to wait until it's done.
2298
(Depending on your operating system, you could switch to another virtual console/window and check on the length of the local file.)
2300
<H3 align=center> <A NAME=frame> Frames </A> </H3>
2302
Frames are a mechanism whereby a web page can fetch and display several other web pages on the screen at once.
2303
Each subpage is called a frame, and lives in its own space on the screen.
1511
2304
Sometimes the frames are top middle and bottom;
1512
sometimes they are left middle and right.
1513
Edbrowse fetches these frames and presents them in order.
1516
Most frames have names - hopefully these names are helpful.
1517
If a page uses frames you might see something like this.
1519
<P><PRE><font size=4 face=Arial,Helvetica,sans-serif>Frame top:
1521
Stuff about the company, and how to get back to the home page etc.
1525
The stuff you actually asked for, your order, etc.
1529
You can disable frame fetching via the `ff' command,
1530
if you know your web sites well, and you want to activate particular frames manually.
1531
When frameFetch is disabled, frames look like hyperlinks:
1533
Access each one in turn, as if it were just another web page.
1536
There may be web sites out there that won't work unless all the frames are fetched, in order.
1537
Suppose the first frame sends your browser a cooky,
1538
which it must return when fetching the second frame.
1539
I don't know of any web sites like this,
1540
but I wouldn't be surprised if there are some out there,
1541
so you might want to leave fetchFrames enabled.
1543
<H4 align=center> Javascript </H4>
1545
Javascript is everywhere, but in some cases we can work around it.
1546
Remember that web designers rarely <em>program</em> in Java.
1547
In fact they aren't programmers at all.
1548
They use various wysiwyg web design tools
1549
that crank out canned fragments of javascript.
1550
In some cases we canrecognize these fragments and deal with them.
1553
Sometimes a hyperlink uses javascript only to open a new window,
1554
which brings up the referenced web page.
1555
Obviously the notion of a new window is meaningless in edbrowse;
1556
every web page is already in its own window.
1557
So this program tries to bypass the javascript and replace it with a simple hyperlink.
1558
It isn't openNewWindow ("foobar.html") any more,
1559
it's just foobar.html.
1560
It will look and act just like any other hyperlink.
1563
Keep in mind, I'm using a simple heuristic,
1564
encoded in a regular expression.
1565
I'm sure there are openWindow() calls that I don't recognize as such,
1566
and no doubt there are other javascript calls that I will mistake
1567
for a subwindow hyperlink.
1568
If you find either a false negative or a false positive,
1569
send it along and I'll try to update my heuristics.
1572
Another common javascript function is the validate&submit function.
1573
This function checks your entries -
2305
sometimes they are left middle and right.
2306
Edbrowse presents these frames as hyperlinks,
2307
and you can call up each in turn,
2308
or jump straight to a specific frame if you are familiar with the website.
2309
Usually the top frame is navigational in nature,
2310
and the bottom is a legal disclaimer/copyright notice,
2311
so you're just as happy to skip these and cut to the chase.
2312
On rare occasions, and I've only seen this once,
2313
you <em>must</em> open the top frame,
2314
whether you are interested in it or not,
2315
because that particular html page sets some cookies that you need to run the website.
2318
A page of frames might look like this.
2319
I think you can guess which one to click on.
2329
I thought about a FetchFrame feature that fetches all the frames and presents them in one go,
2330
just as they are all displayed on the screen for a sighted user,
2331
but this feature is <em>very</em> difficult to implement,
2332
and so far, nobody seems to want it.
2333
So as you might imagine, it's way down on the list.
2335
<H3 align=center> <A NAME=js> Introduction to Javascript </A> </H3>
2337
Javascript is software, embedded in the web page, that runs on your computer.
2338
These functions do not run on the web server,
2339
they run right on your box.
2340
Hence it is sometimes called client side javascript.
2341
And javascript can do almost anything.
2342
You could, for instance, download a web page that includes a javascript function to compute the digits of pi,
2343
right on your computer,
2344
although that would be rather silly.
2345
Most of the time javascript is used to validate and/or modify forms,
2346
or create fancy visual effects.
2349
The first version of edbrowse, written in perl, ignored javascript completely,
2350
and that was ok for a while,
2351
but more and more sites use javascript,
2352
and these websites were simply inaccessible.
2353
Most of the e-commerce sites fall into this category.
2354
If you want to make purchases, or manage your bank account online,
2355
you <em>need</em> a javascript enabled browser.
2358
The second version of edbrowse, written in C,
2359
and indicated by a version number that starts with 2,
2360
included a home grown javascript compiler and engine
2361
that I wrote myself.
2362
This worked pretty well, for a spare time project,
2363
but javascript evolves, like any other language or standard,
2364
and I just couldn't keep up.
2367
The third version, which is the "latest and greatest", uses a javascript engine from Mozilla.com,
2368
which is open source under the Mozzilla Public License.
2369
This allows me to leverage, rather than reinvent, some 70,000 lines of code -
2370
and somebody else is maintaining that code as javascript evolves.
2371
this illustrates the power of the open source community.
2374
Edbrowse does not support all the features of client side (DOM) javascript,
2375
and it never will.
2376
For example, many websites use javascript to change images
2377
on the fly as you move your mouse around the screen.
2378
This has no meaning in edbrowse.
2379
Other websites bring up multiple windows,
2380
and let you control the contents of subwindows using icons in a master window.
2381
This would be very difficult to simulate in a command-line environment -
2385
As a rough approximation, I expect to implement about half of javascript,
2386
the half that will satisfy 95% of the websites we care about.
2387
So you may see warning messages about this or that feature not supported.
2388
If you are tired of wading through these messages,
2389
or if a bug in my javascript interpreter causes edbrowse to crash completely,
2390
you can turn javascript off via the `js' command.
2391
This is useful when you are casually surfing the net, looking for information,
2392
and you know you're not going to need javascript.
2393
You can also disable javascript for specific domains.
2394
This will be discussed later, when we describe the edbrowse config file.
2396
<H3 align=center> <A NAME=valid> Validating Forms </A> </H3>
2398
When a web page asks for user input,
2400
"validate&submit" function.
2401
This function checks your entries:
1574
2402
have you filled in all the riquired fields -
1575
2403
is there an @ sign in your email address -
1577
Then, if there are no errors, it submits the form.
1578
I can't emulate the javascript,
1579
but I can <em>assume</em> you have entered the data correctly
1580
and submit the form.
1581
The javascript call is replaced with a simple submit button.
1582
The same text is used, but the letters js are appended,
1583
to remind you that javascript is being bypassed.
1584
Thus the last line on a registration form might look like:
1586
<Register now js>
1589
In some cases the javascript function, which I am neatly bypassing,
1590
reformats your data.
1591
If it does, you're screwed.
1593
<H4 align=center> Web Strip (Experimental) </H4>
1595
A web page often contains redundent information,
1596
relative to its parent page.
1597
Plowing through the same navigation links and introductory text,
1598
in search of new information,
1599
can be a huge waste of time.
1600
The sighted user recognizes the same "stuff" at a glance and scrolls down the page,
1601
consuming perhaps 4 seconds,
1602
but I often spend 4 minutes performing the same operation.
1606
The web strip feature, `ws', attempts to delete the redundent
1607
text at the start and end of a web page,
1608
leaving only the new information.
1609
After all, that's why you activated the link in the first place.
1610
You can resurrect the deleted text via the unstrip, `us', command.
1613
This feature is called experimental because it isn't very smart.
1614
It's more like a cmp than a diff.
1615
The slightest change in a line, or insertion of a blank line,
1616
will cause web strip to stop in its tracks.
1617
Often there is more text that <em>should</em> be deleted,
1618
but I don't have time to turn this into a Ph.D. thesis.
1619
If anybody wants to beef up this routine, I'd be grateful.
1621
<H4 align=center> Web Express </H4>
1623
<A HREF=http://www.webexpresstech.com/WebXP/WebExpressTutorial.html>
1626
is a stand-alone program designed to fetch specific information from the internet
1627
and present it concisely,
1628
without all the headers and footers and commercials etc.
1629
Some of this technology has been folded into edbrowse, with permission.
1632
The @ command initiates a web express query.
1633
The identifier that follows the @ sign is the name of the query.
1634
It is often cryptic, just a couple of letters.
1635
For instance, @gg is shorthand for a google search.
1636
Type the following to look up information on african elephants.
1638
@gg african elephant
1641
When the page is retrieved,
1642
specific post-processing code strips out the extraneous information,
1643
and leaves only the results of your search.
1644
This is a web strip feature that really works!
1645
It works because somebody has tailored it to this particular page.
1646
There are no heuristics - no guesses.
1647
The down side is the constant maintenance.
1648
If google changes its format,
1649
we will have to modify the post-processing commands accordingly.
1652
As described earlier, `us' (unstrip) is the opposite of web strip.
1653
You can enter the us command to get the entire google page back again.
1654
Then you can jump to other places in google,
1655
click through the sponsored links, etc.
1658
The web strip feature
1659
supports inheritance.
1660
If the first page doesn't have the information you are looking for,
1661
aned you call up the second page by clicking on the {more results} button,
1662
you can use the ws command to strip the second page of results,
1663
using the same google-specific commands
1664
that were applied to the first page.
1667
Many shortcuts are available - too many to document here.
1669
@yf jnj gets the current stock quote for Johnson and Johnson from yahoo financial,
1670
and @mw elephant looks up the word elephant
1671
in the on-line Merriam Webster dictionary.
1673
Type @ by itself to get a list of available shortcuts.
1676
Actually, none of these shortcuts are included in the edbrowse program.
1677
They are all defined in your .ebrc config file for maximum flexibility.
1678
You can modify existing shortcuts or add your own,
1679
reflecting your particular interests.
1681
<A HREF=sample.ebrc>
1682
sample config file</A>
1683
for the definitions of various web express commands.
1685
<H4 align=center> Predefined Edbrowse Command Sets </H4>
1687
You can bundle a set of edbrowse commands together under one name,
1689
If the following appears in your .ebrc file,
1690
you can type <ud to undos a file.
1691
<P><PRE><font size=4 face=Arial,Helvetica,sans-serif>cmdlist = ud
1696
The leading < symbol tells edbrowse
1697
that the line contains an edbrowse command.
1698
The commands bundled together under the name "foo"
1699
are invoked by typing <foo.
1700
The same list of commands can be folded into other lists of commands,
1701
or into the post-processing directives associated with web express shortcuts.
1702
The command list named "init" is run at startup.
1705
If the name of the macro has a + before it in the .ebrc file,
1706
execution stops when an error occurs.
1708
edbrowse runs all the commands in the set.
1709
Note that all the commands are run, no matter what,
1710
after a web express shortcut.
1712
<H4 align=center> Directory Scan, File Manager </H4>
1714
If you edit a directory
1715
you will see a list of all the visible files in that directory,
1716
in alphabetical order.
1717
Type g to go to one of these files or sub directories.
1718
Type ^ to return to the parent directory.
1719
This is similar to browse mode;
1720
just pretend like there are braces around each file name.
1721
Thus you can traverse an entire directory tree
1722
as though you were inside a file manager.
1725
Like ls -F, a subdirectory is indicated by a trailing slash.
1726
This slash is not part of the filename.
1727
Similarly, named pipe is indicated by |,
1729
block special by *, character special by <,
1731
If a regular file ends in one of these characters, it may confuse you,
1732
but it won't confuse this program.
1733
Edbrowse knows whether that trailing | is part of the filename
1734
or a pipe indicator.
1735
Since each file is represented by a single line of text,
1736
files with newlines embedded in their names cannot be accessed.
1739
If you read a directory into a preexisting file it is just text.
1740
You can't visit any of the underlying files, because they are just words.
1741
You must edit a directory in its own session
1742
or read a directory into an empty session
1743
if you want to access the underlying files.
1744
Note that you can write the buffer to another editting session,
1745
and in that session the words are just words.
1746
This distinction is important as we start to edit the text.
1749
By default, directories are readonly.
1750
If you try to delete a line, and hence the associated file,
1751
it will tell you that you are still in directory read mode.
1752
I'm trying to save you from yourself!
1753
Type dw to enable directory writes,
1754
and dr to make directories readonly again.
1757
When directory writes are enabled,
1758
you can remove files using the d command.
1759
For instance, g/\.o$/d removes all the object files.
1760
Since these edits have implications outside the scope of this program,
1761
there is no undo capability.
1762
When you make a change it is made.
1763
With this in mind, I borrowed a good idea from Microsoft.
1764
The deleted file isn't actually deleted;
1765
it is moved to your recycle bin,
1766
located in $HOME/.recycle.
1767
So if you accidentally type ,d and remove all your files,
1768
you can recover them from your recycle bin.
1769
You may want to set up a cron job that removes
1770
all the files from your recycle bin once a week.
1771
This directory is created mode 700, so nobody else can look at your deleted files.
1772
If you create this directory yourself, please make if 700.
1775
Because this operation is a move, rather than a true delete,
1776
there are a few restrictions based on your operating system.
1777
If your OS can move directories,
1778
this program will be able to delete a subdirectory as easily as a file.
1779
The entire subtree is moved to your recycle bin.
1780
Make sure your cleanup cron job is capable of removing directory trees, not just files.
1783
Depending on your OS, you may not be able to move files across file systems.
1784
From /disk2 to /disk1, or from the D drive to the C drive.
1785
In this case you might want to issue the dx command,
1786
which makes directories writable, like dw, but actually deletes the files.
1787
You'll need this if you're trying to free up space on the disk.
1788
Note that symbolic links are always deleted;
1789
there isn't much point in moving a link to the recycle bin.
1792
"What's the point of all this?" you may ask.
1793
"What's wrong with the shell?"
1796
Nothing, as long as the file names are small and familiar.
1797
But sometimes the file names are long and cumbersome,
1798
and it is nearly impossible to type those names into the shell,
1799
character for character, upper and lower case, with no mistakes.
1800
Meta characters such as the * can help,
1801
but only when the file you want has a name radically different from the other files in the directory.
1802
This isn't always the case.
1803
Suppose an application generates log files as follows.
1805
<P><PRE><font size=4 face=Arial,Helvetica,sans-serif>ProgramFooBar.-04-04-1998.06:31:59.log
1806
ProgramFooBar.-04-11-1998.11:37:14.log
1807
ProgramFooBar.-04-18-1998.16:22:51.log
1811
How do you delete the old ones and keep the most recent,
1812
or rename them to something more manageable?
1813
Stars are a bit risky; you can access multiple files without realizing it.
1814
And we're not even talking about those pesky files with spaces or invisible control characters in their names.
1815
Our sighted friend calls up his file manager and simply clicks on the file he wants to view or edit or remove.
1816
Sometimes I want/need that kind of power.
1819
When the substitute command changes text, it renames the underlying file.
1820
This won't move the file on top of another existing file,
1821
so you can't lose any data this way.
1824
The search and substitute commands ignore the trailing filetype characters.
1825
If you want to rename a directory from foo/ to foobar/,
1826
you can type s/$/bar/.
1827
The bar will be placed at the end of the word foo, because the trailing / isn't really there.
1830
Now suppose you want to run an arbitrary program on some of these files.
1831
This could be a print utility,a compiler, whatever.
1832
Sometimes you can rename the files for your convenience, then work in the shell.
1833
But sometimes you don't own the files,
1834
and sometimes they must retain their original names.
1835
This happens when several html documents reference each other through hyperlinks,
1836
using the aforementioned filenames.
1837
So you can't rename the files, yet you still want to run your program on one or two of them.
1840
You can run any program on any file without retyping that filename via the shell escape.
1841
Use kx to assign the label x to the file you are interested in.
1842
(This is standard ed syntax.)
1843
Then run !program 'x
1844
to invoke your program on the file in the line labeled x.
1845
This sounds involved, but it is merely text substitution, implemented in a few lines of perl.
1846
If 'x is present in a shell escape, and is not next to any letters or digits,
1847
we replace it with the text on the line labeled x.
1848
Thus if your filename contains spaces, you'd better run !program "'x",
1849
to make sure the entire file name is one argument to the running program.
1852
The token '. is replaced with the text on the current line,
1853
and the token '_ is replaced with the current filename.
1854
If you try to write a file, and remember that you left it readonly,
1855
you can make it writable via !chmod +w '_,
1856
and then write the text to the file.
1859
You can expand multiple tokens in one shell command.
1860
Use kx and ky to mark two files that you want to compare, then run !diff 'x 'y.
1863
This feature is not limited to directory scans.
1864
You may be editing a simple file,
1865
but you can still paste the contents of a line into your shell command.
1866
Off hand I don't know why you'd want to do this,
1869
<H4 align=center> The Refresh Command </H4>
1871
Type `rf' to refresh the current file.
1872
This rereads the file or url into the current buffer.
1873
It does not push a new editing session onto the stack.
1874
This is analogous to the refresh button on Netscape and Explorer.
1877
If a web page is updated every minute, e.g. with the latest stock prices for your favorite companies,
1878
you can type rf to fetch the latest copy of this web page.
1879
This assumes the url is a direct html reference,
1880
or a dynamic fetch using the get method.
1881
This will not work with the post method.
1882
It also assumes the intervening internet servers are not caching the web page
1883
and handing you the same out-of-date copy over and over again.
1886
On your local machine,
1887
you can use this feature to read the latest version of a dynamic file,
1889
Or you can reread a directory,
1890
to incorporate any new files that have been placed in that directory.
1891
For example, you might use the shell escape to execute
1893
yet z will not appear in your directory scan, until you type rf.
1895
<H4 align=center> User Agent </H4>
2404
are there 5 digits in your zip code -
2406
If there are no errors, it submits the form.
2407
These functions usually behave well under edbrowse.
2408
When you push the button, you will either see the error message,
2409
or the form will be submitted,
2410
and a confirmation page should appear shortly.
2413
In some cases the javascript function
2414
reformats your data.
2415
It may fill in some of the "hidden" fields for you,
2416
or it may compute sales tax and adjust the purchase price accordingly.
2417
This is more than form validation, this is active javascript,
2418
and the data won't be right unless the javascript runs properly
2419
on your computer.
2420
More and more sites are using active javascript,
2421
so a javascript enabled browser is a must.
2424
Some javascript functions manage menus dynamically.
2425
Make a primary selection,
2426
and javascript populates a second dropdown list with options
2427
corresponding to your first selection.
2428
You can now make a second selection,
2429
which further refines your search.
2430
If the first menu presents "meats", "vegetables", "fruits", and "grains",
2431
and you select fruits,
2432
the second menu might contain
2433
"apples", "oranges", "lemons", etc.
2434
Javascript makes this possible.
2435
Unfortunately these dynamic menus are not yet supported by edbrowse.
2437
<H3 align=center> <A NAME=popup> Popups and Popunders </A> </H3>
2439
A popup is a window that suddenly appears in front of the window you really want to see.
2440
It usually advertises something, and is often annoying,
2441
although in rare cases it is a necessary aspect of the website.
2444
You have a distinct advantage over all those other surfers with their graphical browsers.
2445
The popup window does not open automatically.
2446
Windows are not well defined in a command line browser anyways,
2447
so it would be folly to try to implement this feature,
2448
or any other aspect of multi-windowing for that matter.
2449
Instead, the popup appears as a hyperlink at or near the top of the page,
2450
and you can click on it if you like, or ignore it.
2451
This is similar to the <A HREF=#music>background music</A>, described in an earlier section.
2452
The popup link might look like this.
2457
Popunders are not as common.
2458
They appear after you have closed the window.
2459
In some sense they are hidden "under" your web page, and when you close the page they pop out.
2460
In edbrowse, this does not happen automatically.
2461
When you type q, you quit, and that's the end of it.
2462
As you might expect, the popunder function appears as a hyperlink.
2463
It might look like this.
2468
Remember, the popup link is a simple html link to another web page,
2469
while the Close link calls a javascript function on the current page.
2470
However, this javascript function usually links to another web page,
2471
so don't be surprised if you find yourself somewhere else on the internet.
2472
In either case, popup or popunder, you can use the back key to return to the
2473
page you were looking at.
2474
If you need access to a popup window and the main page in parallel,
2475
use the <A HREF=#move>M command</A>.
2478
Javascript also includes timer functions,
2479
that fire after a specified number of seconds.
2480
These are implemented as hyperlinks at the top of the page.
2481
They usually manage visual effects, and are rather pointless.
2482
The following timer might draw a star burst on the screen in 16 seconds.
2484
{Timer 16: starburst()}
2486
<H3 align=center> <A NAME=onc> Onchange and Undo </A> </H3>
2488
When you set or change the value of an input field,
2489
the form can (optionally) call a javascript routine.
2490
It doesn't usually, but it can.
2491
In an earlier example, I described a primary and secondary menu.
2492
When the first selection is made,
2494
javascript sets up the second menu commensurate with your primary selection,
2495
using the "onchange" feature.
2498
This is all well and good,
2499
but edbrowse has something
2500
your graphical browser does not, the undo command.
2501
And in this context, it doesn't really work.
2502
Change fruits to vegetables, and the second menu presents carrots and peas and the like.
2503
Now type u for undo,
2504
and the first field reverts back to fruits,
2505
but the second menu still contains vegetables.
2506
This is because the undo feature was originally written for the text editor.
2507
It simply puts the text back the way it was, and has no capacity to "undo" the side effects of javascript code.
2508
So the moral of the story, if there is one,
2509
is to set and change the values of an input form directly,
2510
and avoid the undo command, unless you're pretty sure there are no javascript side effects associated with that field.
2512
<H3 align=center> <A NAME=cfg> Config File </A> </H3>
2514
At startup, edbrowse reads and parses a config file.
2515
It's ok if this file is missing, but if it is present,
2516
it has to be syntactically correct.
2517
An error in your config file will cause edbrowse to abort.
2518
If this happens, use the -c option to edit the config file directly.
2519
This bypasses initialization, and places you in the editor,
2520
with the config file preloaded.
2521
Make your corrections, write the file,
2522
quit, and invoke edbrowse again.
2523
Repeate these steps until there are no errors,
2524
and you see the words "edbrowse ready".
2527
The config file is in $HOME/.ebrc.
2528
The "eb" is shorthand for edbrowse.
2529
You cannot rename the config file; it is what it is.
2530
This is true on Windows as well, so make sure HOME is set.
2533
The config file is line oriented.
2534
Lines begining with # are comments, and are ignored.
2535
Blank lines are also ignored.
2536
All other lines fall into one of 5 categories.
2539
<P><LI> Define an option, using the keyword=value syntax.
2540
<P><LI> Define an edbrowse script that can be invoked from the command line,
2541
or from another script.
2542
<P><LI> An edbrowse command, that becomes part of an edbrowse script.
2543
<P><LI> Establish an email account.
2544
This will be described later, when we talk about the email client.
2545
<P><LI> A mail filtering rule.
2548
<H3 align=center> <A NAME=keyval> Keyword = Value </A> </H3>
2550
The best documentation is an example, so let's dive right in.
2553
Recall the section on <A HREF=#cook>cookies</A>.
2554
You'll need a file, often called a cookie jar,
2555
to store your cookies.
2556
The line that establishes this cookie jar might look like this.
2558
jar = /home/eklhad/.ebsys/cookie-jar
2561
This is a simple keyword = value syntax.
2562
It's ok if the filename has embedded spaces, or even an equals sign.
2563
No need to quote it.
2566
When edbrowse sees this line in its config file, it records the location of the cookie jar,
2567
and it checks the validity of that file.
2568
If the file is a directory (or something weird),
2569
or is otherwise inaccessible,
2570
edbrowse prints an error message and aborts.
2572
use the -c option to edit your config file,
2573
and change the cookie jar.
2576
Here are some additional name=value directives.
2577
Some of these are used to set up an email account.
2578
This will become clearer when we talk about the mail client.
2581
certfile = /home/eklhad/.ebsys/ssl-certs
2584
Specify the file that holds the certificates for secure connections.
2585
This was explained in the section on <A HREF=#ssl>secure connections</A>.
2588
maildir = /home/eklhad/mbox
2590
Go to this directory when fetching mail.
2591
thus, if you save a mail message, you'll always know where it is.
2599
Wait 30 seconds for a response from a web server, and 3 minutes for a response from the mail server.
2600
A time value of 0 waits forever.
2601
Sorry, there seems to be no way to interrupt a socket call,
2602
other than control backslash (quit), which kills the entire program.
2603
That's why these timers are here - so you don't hang forever.
2604
The defaults are 20 and 0 respectively.
2609
Specify domains that don't need javascript.
2610
You can eliminate annoying error messages and speed up access
2611
by disabling javascript for certain websites.
2612
Javascript will not be run on pages within these domains,
2613
nor will it be fetched from these domains.
2616
The above directive will also drop javascript from subdomains such as www.space.com.
2619
You can include a path or partial path after the domain, as in space.com/popups.
2620
This will block the popup ads that you don't want to see, and often generate edbrowse errors in any case.
2621
Subdomains are not considered when a path is given; the domain must match exactly.
2624
inserver = pop3.some-domain.com
2628
outserver = smtp.some-domain.com
2632
Specify the machines and ports that you use to fetch mail and send mail respectively.
2633
You can use the fully qualified domain names, or aliases, as defined in /etc/hosts.
2634
The ports shown here are standard, and almost always correct.
2635
They are also default in edbrowse, so you need not set inport and outport unless they are different from that shown above.
2636
Note, these keywords are only valid in the context of a mail account, as indicated by mail{}.
2643
Specify the login and password that edbrowse uses to fetch your mail.
2648
reply = karl.dahlke@some-domain.com
2650
These lines are added in to the emails that you send.
2651
They tell the recipient who you are, and how to reply.
2653
<A HREF=http://www.spamlaws.com>
2654
illegal</A> to use these lines for deceptive purposes.
2655
Make sure they identify you, and that the reply address is indeed one of your email accounts.
2658
adbook = /home/eklhad/.ebsys/address-book
2660
When specifying recipients, you can use aliases instead of full email addresses.
2661
Aliases are checked against your address book,
2662
a line oriented text file that is specified here.
2663
If your address book contains the line
2665
fred : fred.flintstone@bedrock.us : 226 cobblestone way : 5553827
2667
then you can use the alias fred,
2668
and edbrowse will substitute Fred's email address when sending mail.
2669
Only the first two fields in the address book are significant
2670
as far as edbrowse is concerned.
2671
Other fields might hold phone/fax numbers, street address, etc.
2675
spamcan = /home/eklhad/.recycle/save-spam
2677
There is no perfect spam filter.
2678
But I can't live without one,
2679
so I wrote a simple ip blocker.
2680
(This is discussed below.)
2681
When spam is received,
2682
edbrowse prints the line "spam from such and so",
2683
and saves the mail in this file.
2684
If you recognize the name, spam from your friend,
2685
you can call up this file, find the email, and read it.
2686
This should not happen, as there is no particular reason to block the ip address of your friend's computer,
2687
but hey, better safe than sorry.
2690
ipblack = /home/eklhad/.ebsys/ip-blacklist
2692
A line oriented text file holds the ip addresses of known porn/spam sites.
2693
The syntax is the usual: numbers separated by dots,
2694
with an optional /xx netmask indicator at the end.
2695
If the file contains the following two lines,
2696
any ip address that starts with 192.168,
2697
or 10.11.12.13, are forbidden addresses.
2704
If an email refers to a website that resolves to any of these addresses it is considered spam,
2705
and flagged as such.
2706
Let's be clear; I am not blocking email that comes from certain sources.
2707
After all, your friend's computer may well be sending you viruses or spyware.
2708
Rather, I screen email that has certain urls in its body.
2709
If the button that says "cheap meds for you" leads to a forbidden website,
2710
you'll never see the email.
2713
Note, I use the very same blacklist in my firewall.
2714
A shell script reads in the addresses and issues the appropriate iptables commands.
2715
My file has some 2,000 entries.
2716
This is large, but manageable.
2717
If the list gets much larger, I may rebuild the kernel
2718
with the "large ip tables" option enabled.
2719
This makes packet matching more efficient when there are many rules.
2720
I suppose it sorts them or something.
2722
<H3 align=center> <A NAME=agent> User Agent </A> </H3>
1897
2724
Every time you fetch a web page from the internet,
1898
your browser identifies itself to the host.
1899
This is done automatically.
1900
Edbrose identifies itself as "edbrowse/1.5.16",
2725
your browser identifies itself to the host.
2726
This is done automatically.
2727
Edbrose identifies itself as "edbrowse/2.2.9",
1901
2728
where the number after the slash indicates the current version of edbrowse.
1904
2731
All well and good, but some websites have no respect for edbrowse,
1905
or lynx for that matter.
1906
They won't even let you in the door unless you look like Explorere or Netscape.
2732
or lynx for that matter.
2733
They won't even let you in the door unless you look like Explorere or Netscape.
1907
2734
Clickbank.com, a major credit card processor, is one example.
2736
So what do we do?
1913
2740
You can specify different agents in your .ebrc file,
1914
and activate them with the `ua' (user agent) command.
2741
and activate them with the `ua' (user agent) command.
1915
2742
If the following lines are in your .ebrc file,
1916
2743
you can type ua1 to pretend to bee lynx,
1917
and ua2 to pretend to be Mozilla.
1918
Type ua0 to resurrect the standard edbrowse identification.
2744
and ua2 to pretend to be Mozilla.
2745
Type ua0 to resurrect the standard edbrowse identification.
1919
2746
Let's hope there aren't too many asinine websites out there,
1920
like Clickbank, that force us to lie.
2747
like Clickbank, that force us to lie.
2748
It's just so stupid, and pointless.
1923
2751
agent = Lynx/2.8.4rel.1 libwww-FM/2.14
1925
2753
agent = Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)
1927
<H4 align=center> Upper/Lower Case </H4>
1929
The `lc' command converts a line to lower case,
1930
and `uc' converts it to upper case.
1931
Perl users will recognize these directives.
1932
As an extension, `mc' converts to mixed case, capitalizing the first letter of each word,
1933
and the d in mcdonald.
1936
This is especially useful in a directory scan.
1937
The last thing a blind person wants to worry about is whether some of the letters in a file name are upper case.
1938
If directory write mode is enabled,
1939
type ,lc to convert all the file names to lower case.
1942
If you want to convert a particular word, type s/word/uc/.
1943
This converts the word to upper case.
1944
All the other substitution suffixes apply.
1945
To change foo, Foo, FOo, and FOO to FOO, everywhere,
1946
type ,s/\bfoo\b/uc/ig.
1948
<H4 align=center> Break Line </H4>
1950
The `bl' command breaks the current line into sentences and phrases,
1951
each about 70 characters long.
1952
It also compresses white space and strips white space from the end of the line.
1953
If the line contains return characters,
1954
these are turned into line separaters -
1955
places where the line will definitely be cut.
1956
The only white space that is preserved is the tabs or spaces
1957
at the beginning of the line, or after each return character.
1958
This is a modest attemp to keep indented text indented,
1959
if that makes any sense?
1962
I use this feature in two different ways.
1963
If I am familiar with the document,
1964
(I probably wrote it),
1965
I may use the bl command on a line of text that seems rather long.
1966
I typed it in quickly, as an uninterrupted thought, and now I want to break it up.
1967
But I don't want to count punctuation marks and say,
1968
"I think we need a break after the third comma
1969
and the period following that and then at the next comma",
1970
issuing the s punctuation commands along the way.
1971
Oh I like the s commands well enough - they put you in complete contrl -
1972
but it's easier to type bl - and bl usually does the right thing.
1973
Also, bl compresses accidental double spaces,
1974
a typo that I will never hear if I simply read the line as a whole.
1977
When the document comes in from the outside,
1978
usually from another word processor such as MS-Word,
1979
bl serves a completely different function.
1980
Paragraphs are often stored on a single physical line.
1981
Sometimes the entire document is on a single line,
1982
with return characters, \r, separating paragraphs.
1983
Wysiwyg word processors don't worry about separating sentences and phrases -
1984
that's what word wrap is for.
1985
Well - bl is our version of word wrap.
1986
It doesn't try to conform to any screen;
1987
it merely cuts the text into manageable chunks,
1988
each piece a separate semantic unit.
1990
physical lines will contain sentences or phrases, as delimited by punctuation,
1991
or by the newline/return characters embedded in the original document.
1994
If one of the original lines, delimited by newline or return,
1995
is long, i.e. more than 120 characters,
1996
it is assumed to be a self-contained paragraph,
1997
and a blank line is added before and after.
1998
Thus a disassembled paragraph containing 20 sentences
1999
does not simply flow into the next disassembled paragraph containing 18 more sentences.
2000
An empty line separates the two paragraphs.
2001
This is only applicable if bl is applied to a range of lines,
2002
or the entire document,
2003
as might occur when making an outside document readable.
2006
Don't apply the bl command to a preformatted section,
2007
such as a table or ascii art.
2008
If you're not sure what to expect,
2009
i.e. you didn't write the file,
2010
scan through it first,
2011
and apply bl to the range of lines that actually represents text.
2012
Often this is the entire document (,bl).
2013
The following commands do a pretty good job of cleaning up a typical Microsoft Word document.
2016
<PRE><font size=4 face=Arial,Helvetica,sans-serif><code>e whatever.doc or whatever.wps
2017
f _ # don't accidently overwrite the microsoft document
2018
,s/[~80-~ff~00-~0c~0e-~1f]//g; # strip out non ascii control/formatting codes
2019
g/^\s*$/d # these blank lines use to contain non ascii codes
2020
,bl # split lines and paragraphs
2021
1,20p # first couple lines are often garbage, but then the text begins.
2022
</code></font></PRE>
2025
Note that this function uses the same software as the browse command.
2026
Both commands format the text in the same way.
2027
If you change the constant $optimalLine = 80 in the ebrowse source,
2028
that affects both the break line and the browse translations.
2030
<H4 align=center> Send Mail </H4>
2756
This feature was written pre-javascript,
2757
and is not 100% compatible with the navigator object.
2758
Navigator.userAgent returns the correct string, according to the agent you select,
2759
but other aspectss of the navigator object do not change with the agent,
2762
<H3 align=center> <A NAME=script> Edbrowse Functions </A> </H3>
2764
You can bundle a set of edbrowse commands together under one name,
2765
similar to a macro.
2766
If the following appears in your .ebrc file,
2767
you can type <ud to undos a file.
2771
,s/\r$//
2776
The new < command is suppose to remind you of redirection,
2777
i.e. read input commands from this macro.
2778
And macros can invoke other macros,
2779
by using a < command in the body.
2780
Almost any edbrowse command is fair game.
2781
A macro can fetch web pages from the internet,
2782
fill out forms, submit requests, and send mail.
2785
Normally, edbrowse marches along, whether a command succeeds or not.
2786
However, you can tell a macro to stop if it encounters an error
2787
by using this syntax.
2791
/hello/p
2793
/world/p
2798
The plus sign after the word function means each command in that function must succeed.
2799
If there is no line containing the word hello, the function stops.
2800
If there is such a line, then the function moves on,
2801
and looks for a line containing the word world.
2804
Other than some indenting, the format is fixed, and unforgiving.
2805
You cannot, for instance, put the opening brace on its own line, as K&R would suggest.
2808
These functions, or macros, can accept parameters.
2809
Let's make the previous function a bit more general.
2820
You can reproduce the earlier behavior by typing <hw hello world.
2821
Or you can search for different lines by invoking <hw foo bar.
2822
The latter looks for a line containing foo and prints it,
2823
and if this succeeds it looks for a line containing bar and prints that.
2824
Let's build a more useful function, a shortcut to google.
2825
The variable ~0 represents all the arguments together.
2826
In this case ~0 is the keywords you pass to google, for your search.
2830
b www.google.com/search?q=~0&hl=n&btnG=Google+Search&meta=
2835
With this in place, you simply type `<gg kangaroo habitat'
2836
to find out where kangaroos live.
2839
Finally, an edbrowse function can branch,
2840
based upon the success or failure of the previous command.
2841
Use if(*) for success, and if(?) for failure.
2842
The ? is suppose to remind you of the question mark that you get when an edbrowse command fails.
2843
The following looks for a line containing foo, and if it finds one,
2844
it advances to the next line, and if that line contains bar, it deletes it.
2845
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>function+silly {
2857
I deliberately used function+ instead of function: in the above example.
2858
Normally the + will cause the function to abort if an edbrowse command fails.
2859
However, if the result of that command is used by a control statement,
2860
the function does not abort.
2861
This is similar to set -e in the shell,
2862
which causes a script to abort,
2863
unless the result of the command is used by an if statement.
2866
Other control statements include while(*) while(?) until(*) and until(?).
2867
The following deletes lines from the top of the file,
2868
as long as they contain foo or bar.
2869
It then deletes the blank lines at the top.
2870
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>function+topclean {
2881
You can use loop(100){ ... } to repeat a set of commands 100 times.
2882
I haven't used this feature very often.
2884
<H3 align=center> <A NAME=init> The Init Script </A> </H3>
2886
The script named "init" is run at edbrowse startup.
2887
You can use this to establish your default settings - even read in your bookmark file,
2888
so your "favorites" are close at hand.
2890
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>function+init {
2891
# turn debug off, so we don't see any status messages from this script
2893
# Assume directories can be modified
2895
# Put beginning and end markers around listed lines
2897
# Let session 99 hold your favorites, ready to surf.
2900
# back to session 1, ready to go to work
2902
# Restore debug level to something reasonable, 1 or 2
2908
This is just a sample.
2909
Put anything you like in your init script,
2910
or leave it out altogether if you are happy with edbrowse out of the box.
2912
<H3 align=center> <A NAME=ma> Mail Accounts </A> </H3>
2914
The next chapter describes edbrowse as a mail client,
2915
so let's use the config file to define your email accounts.
2916
You can define several accounts, as necessary.
2917
They are implicitly numbered,
2918
in the order they appear in the config file.
2919
So the first mail account becomes #1, the second becomes #2, and so on.
2922
We already discussed the relevant keywords for an email account.
2923
All you have to do is enclose them in mail{...}, like this.
2924
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>mail {
2926
inserver = pop3.some-domain.com
2927
outserver = smtp.some-domain.com
2931
reply = karl.dahlke@some-domain.com
2936
The "default" directive makes this account the default.
2937
One and only one account should be labeled default.
2938
If you do not specify an account when fetching or sending mail, the default account is used.
2939
Beyond this, the default smtp server is <em>always</em> used to send mail,
2940
no matter which account you specify.
2941
If account #1 is default, and you send mail using account #3,
2942
the name and reply address from account #3 will be sent to the recipient,
2943
and if he replies, his reply will be sent to your third email account.
2944
However, the smtp server from your default account is always used to physically transmit the message.
2945
There are technical reasons for doing this,
2946
that are beyond the scope of this document.
2947
Trust me, it's the right thing to do.
2950
Mail filtering, by sender and/or subject,
2951
is controlled by your config file as well.
2952
This will be <A HREF=#filter>described later</A>,
2953
as part of the fetchmail client.
2955
<H3 align=center> <A NAME=mt> Mime Descriptors </A> </H3>
2957
Mime types are determined by the extension of the file, or in some cases the protocol.
2958
They might tell edbrowse to use /usr/bin/play to play file.wav or file.voc,
2959
and /usr/bin/mpg123 to play file.mp3, and so on.
2960
Rather than repeat it all here, I suggest you look at the mime {...} sections in the sample config file provided below.
2961
Linux users can probably copy this part directly into their own config file.
2962
It generally does the right thing.
2963
Here is one example.
2965
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>mime {
2967
desc = audio file in mp3 format
2969
program = mpg123 -q -
2974
If you have pulled down a file from the internet that ends in .mp3,
2975
type `pb' to play the contents of the buffer.
2976
The data is piped into the program,
2977
whose options tell it to expect data from standard in.
2978
If the mp3 player works better from a file,
2979
use a trailing percent to turn the buffer into a temp file with the proper suffix.
2982
program = mpg123 -q %
2985
The command `pb' could mean process buffer,as well as play buffer.
2986
For instance, a mime descriptor might unzip a zip archive.
2988
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>mime {
2990
desc = a compressed zip archive
2992
# use %, since unzip cannot read data from standard in
2997
<H3 align=center> <A NAME=sampcfg> A Sample Config File </A> </H3>
2999
The best documentation is an example,
3000
so I have provided a sample config file with fake data.
3001
It is well commented.
3002
You can download a copy <A HREF=sample.ebrc>here</A>.
3004
<H3 align=center> <A NAME=sm> Send Mail </A> </H3>
2032
3006
You can email the contents of your current editing session to someone else
2034
Use the `sm' command to send mail.
2035
Your pop3/smtp server is described in the config file $HOME/.ebrc.
2037
<A HREF=sample.ebrc>
2038
obtain a sample</A> here.
2039
It is well commented.
2042
The recipients, attachments, and subject must appear at the top of your send file.
3007
via the `sm' command.
3008
Your email accounts are described in your <A HREF=#cfg>config file</A>.
3011
The contents of your .signature file, in your home directory, are automatically appended.
3012
This is standard behavior for Unix mail clients.
3015
The recipients, attachments, and subject must appear at the top of your file.
2043
3016
The sm command is picky, so observe the following syntax carefully.
2045
<P><PRE><font size=4 face=Arial,Helvetica,sans-serif>To: fred.flintstone@bedrock.us
3018
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>To: fred.flintstone@bedrock.us
2046
3019
To: barney.rubble@bedrock.us
2048
3021
attach: hollyrock-brochure.pdf
2049
3022
Subject: Hollyrock Vacation
2050
3023
Come visit Hollyrock.
2106
3081
As you may have guessed,
2107
the to: lines establish the recipients.
2108
Please don't specify more than a few recipients.
2109
I paste them together into one line,
2110
and if that line gets too long, the server might complain.
2111
Beyond this, some servers, my mail server included,
2112
set a hard limit on the number of recipients.
3082
the to: lines establish the recipients.
3083
Please don't specify more than a few recipients.
3084
Some servers, my mail server included,
3085
set a hard limit on the number of recipients.
2113
3086
If you exceed this number,
2115
the remaining recipients simply don't get their mail.
2116
Best to limit your "to:" lines to 8 or less.
3087
somewhere between 10 and 100,
3088
the remaining recipients simply don't get their mail.
3089
Best to limit your "to:" lines to 10 or less.
2119
When specifying recipients, you can use aliases instead of full email addresses.
3092
When specifying recipients, you can use aliases instead of full email addresses.
2120
3093
Aliases are checked against your address book,
2121
a text file that is specified in your .ebrc file.
3094
a text file that is specified in your .ebrc file.
2122
3095
If your address book contains the line
2124
fred:fred.flintstone@bedrock.us:226 cobblestone way:5553827
3097
fred : fred.flintstone@bedrock.us : 226 cobblestone way : 5553827
2126
then you can simply write "To:fred" at the top of your file.
3099
then you can simply write "To:fred" at the top of your file.
2127
3100
Only the first two fields in the address book are significant
2128
as far as edbrowse is concerned.
3101
as far as edbrowse is concerned.
2129
3102
Other fields might hold phone/fax numbers, street address, etc.
2130
3104
Note that "Reply to fred" is an alternate syntax for "to: fred".
2133
Some web pages include sendmail links.
2134
They look just like other hyperlinks, but they send email to the appropriate person.
3107
Some web pages include sendmail links.
3108
They look just like other hyperlinks, but they send email to the appropriate person.
2136
3110
<A HREF=http://developer.netscape.com/viewsource/husted_mailto/mailto.html>
3111
technical details</A>.
2140
3114
If you activate a sendmail link,
2141
you will be placed in a new editing session with the "to" and "subject" lines preloaded.
3115
you will be placed in a new editing session with the "to" and "subject" lines preloaded.
2142
3116
If the url did not specify a subject,
2143
the subject is simply "Comments".
2144
You will probably want to replace this with a better subject line.
2145
Write your mail message and type `sm' to send it on its way.
2146
Then type ^ to return to the web page you were looking at.
2147
Other aspects of sendmail links are not supported by edbrowse,
2148
as they are rarely used.
3117
the subject is simply "Hello".
3118
You will probably want to replace this with a better subject line.
3119
Write your mail message and type `sm' to send it on its way.
3120
Then type ^ to return to the web page you were looking at.
3121
Note that the body of your email may also be preloaded with some default text,
3122
so be sure to check before you write and send.
2151
3125
You can include attachments by placing "attach:" lines at the top of the file,
2152
assuming the recipient can handle these attachments.
3126
assuming the recipient can handle these attachments.
2153
3127
This might make sense when the sendmail link is asking for {bug reports} -
2154
you might attach a program and/or its output.
2155
Yet this is somewhat unusual.
3128
you might attach a program and/or its output.
3129
Yet this is somewhat unusual.
2156
3130
Most sendmail links expect a few sentences of feedback, and nothing more.
2159
Some web forms are submitted via email, rather than a direct http transmission.
2160
Edbrowse handles this properly.
3133
Some web forms are submitted via email, rather than a direct http transmission.
3134
Edbrowse handles this properly.
2161
3135
It shows you the destination email address,
2162
3136
sends the mail through smtp,
2163
and tells you to watch for a reply.
3137
and tells you to watch for a reply.
2164
3138
This reply could be an email response, or even a phone call
2165
if you provided your phone number in the form.
2166
But remember, nothing happens immediately.
2167
You are still on the same web page, still looking at the same submit button.
2168
Don't push the button again!
3139
if you provided your phone number in the form.
3140
But remember, nothing happens immediately.
3141
You are still on the same web page, still looking at the same submit button.
3142
Don't push the button again!
2169
3143
The mail has been sent,
2170
3144
and you'll be hearing from the company in the next few days.
2172
<H4 align=center> Send Mail Client </H4>
3146
<H3 align=center> <A NAME=smc> Send Mail Client </A> </H3>
2174
3148
as described in the previous section,
2175
edbrowse incorporates the features of a mail client.
2176
In addition to the `sm' command,
2177
you can send mail in a batch fashion, from the command line.
3149
edbrowse incorporates the features of a mail client.
3150
In addition to the interactive `sm' command,
3151
you can send mail in a batch fashion, from the command line.
2178
3152
If fred and barney are in your address book,
2179
3153
and you want to send them mail from the command line, with an attachment,
2180
using your primary email account, do this.
3154
using your primary email account, do this.
3155
(I'm assuming e has been aliased to an edbrowse executable.)
2182
perl edbrowse -m0 fred barney hollyrock-notice +hollyrock-brochure.pdf
3157
e -m1 fred barney hollyrock-notice +hollyrock-brochure.pdf
2185
Files with the leading + are assumed to be attachments.
3160
Files with the leading + are assumed to be attachments.
2186
3161
If they are binary they will be encoded properly,
2187
according to the mime standard.
3162
according to the mime standard.
2188
3163
A leading - indicates an alternate format, like this.
2191
perl edbrowse -m0 fred barney hollyrock-notice -hollyrock-graphical.html
2194
Remember, you can specify several mail accounts in your .ebrc file.
2195
The first account is indicated by index 0, as in -m0.
2196
The account with the * (in the config file) is always used
2197
as the outgoing smtp server.
2198
The -m option does not change this.
2199
However, -m3 will set the from and reply address according to account 3,
2200
whether that has the * or not.
2201
You always use the same smtp server to send your mail,
2202
but you can make it look like it came from other places,
2203
and direct the replies back to those places.
2206
Suppose you've brought some work home, for instance,
2207
and are on your home computer.
2208
You want to send mail to your colleagues,
2209
but you want it to look like it came from your work account,
2210
and more important, you want their replies to go back to your work account
2211
so you will see them next morning.
2212
Specify the work account via the -m option.
2213
Your local server, associated with your home ISP,
2214
is still used to send the mail,
2215
because that's the only server you can use.
2216
Other servers, not associated with your ISP,
2217
rarely allow outsiders to send mail.
2218
Remember, the smtp protocol has no password.
2219
So you always want to use your trusted local mail server to send,
2220
even when another account is specified.
2223
All right, that was all very complicated.
2224
don't worry about it, edbrowse does the right thing.
3166
e -m1 fred barney hollyrock-notice -hollyrock-graphical.html
3169
Remember, you can specify several mail accounts in your .ebrc file.
3170
The first account is indicated by index 1, as in -m1, and so on.
2225
3171
You can make your life a lot easier with some aliases in your .bashrc file.
2227
<P><PRE><font size=4 face=Arial,Helvetica,sans-serif># My mail, home account
2228
alias mymail="perl /usr/local/bin/edbrowse -m0"
2229
# My wife's account; sometimes she doesn't check it for a week.
2230
alias wifemail="perl /usr/local/bin/edbrowse -m1"
3172
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif># My mail, home account
3173
alias mymail="e -m1"
3174
# My wife's account.
3175
alias wifemail="e -m2"
2231
3176
# My work account.
2232
alias workmail="perl /usr/local/bin/edbrowse -m2"
3177
alias workmail="e -m3"
2233
3178
# mail is obsolete
2234
3179
alias mail="echo use mymail, wifemail, or workmail"
2237
<H4 align=center> Fetch Mail Client </H4>
3182
<H3 align=center> <A NAME=fmc> Fetch Mail Client </A> </H3>
2239
If edbrowse is run with the -m0 option, and no other arguments,
3184
If edbrowse is run with the -m1 option, and no other arguments,
2240
3185
it is an interactive fetch mail client,
2241
retrieving mail from your first pop3 account.
2242
The first thing it tells you is how many messages you have.
2243
If there are no messages it says "No mail", and exits.
2244
If there are messages, it retrieves each one in turn.
3186
retrieving mail from your first pop3 account.
3187
The first thing it tells you is how many messages you have.
3188
If there are no messages it says "No mail", and exits.
3189
If there are messages, it retrieves each one in turn.
2245
3190
For each message, it displays some header information (such as subject
2246
and sender) and the first page of text, and then presents a prompt.
3191
and sender) and the first page of text, and then presents a prompt.
2247
3192
A '?' prompt means the message is complete --
2248
a '*' prompt means there is more text to read.
2249
You respond by hitting a key.
3193
a '*' prompt means there is more text to read.
3194
You respond by hitting a key.
2250
3195
Keys have the following meaning.
2252
<P><PRE><font size=4 face=Arial,Helvetica,sans-serif>? summary of key commands.
2254
x abort the program, deleted mail is not really deleted.
2255
space display more text.
2256
n read the next message.
2257
A add the sender to your address book.
2258
d delete this message.
2259
J junk this subject, and delete any future mail with this subject.
2260
w write this message to a file and delete it.
2261
k keep this message in a file, but don't delete it.
2262
u write this message unformatted to a file and delete it.
3197
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>? summary of key commands
3199
x abort the program, deleted mail is not really deleted
3200
space display more text
3201
n read the next message
3202
d delete this message
3203
i show referenced ip addresses, then delete this message
3204
j junk this message, and any messages with this subject, for 10 days
3205
J junk this subject for a year
3206
w write this message to a file and delete it
3207
k keep this message in a file, but don't delete it
3208
u write this message unformatted to a file and delete it
2266
The capital A command appends name:address to your address book,
2267
where name is the modified name of the sender and address is his email address.
2268
Name is converted to lower case, and spaces are turned into dots.
2269
Thus it can be typed from the shell, as an email alias,
2270
without worrying about upper case letters or quotes.
2271
In reality, you're probably going to edit the address file,
2272
replace the full name with a simpler alias,
2273
and move the line to the section where it belongs.
2274
Thus fred.flintstone might simply become fred,
2275
as you move the line to the section of cartoon characters.
2278
The last three commands, k w and u, require a filename, which you enter.
3212
The last three commands, k w and u, require a filename, which you enter.
2279
3213
The reserved filename "x" is essentially /dev/null,
2280
hence the mail message, or subordinate attachment, is not saved.
2281
You can save the mail message to x (discard) and still save the attachments.
3214
whence the mail message is discarded.
3215
You can save the mail message to x (discard) and still save the attachments.
2282
3216
If the file is anything other than x,
2283
and the program cannot write to the specified file, it dies, rather ungracefully,
2284
and you have to reestablish the email session.
2285
Yes, I'll make it more fault tolerant in the future.
2288
<H4 align=center> Mail Filtering </H4>
2290
Your config file supports a modest level of mail filtering.
2291
You can redirect all messages from a given email address into a file, or the bit bucket,
2292
indicated by the special filename "x".
2293
If subsequent messages are directed to an existing file,
2294
they are appended to the end of the file, so that no data is lost.
2295
Messages with unnamed attachments cannot be auto-redirected,
2296
since the program needs to ask you what to do with those attachments.
2297
By specifying a partial email address in the filter rule,
2298
you can redirect all messages that come from a given domain,
2299
such as "@space.com".
2300
This is a case insensitive fragment match.
2301
There is more documentation on this topic
2303
<A HREF=sample.ebrc>
2304
sample .ebrc file</A>.
2306
<H4 align=center> Formatted Mail </H4>
2308
By default, incoming mail is formatted for readability.
3217
and the program cannot write to the specified file, it asks you for a new filename.
3220
The junk command adds a filter rule to your config file,
3221
sending any message with this subject to oblivion.
3222
This is useful when you don't want to read a particular discussion thread in a mailing list.
3223
Use the j command to junk it for ten days.
3224
If the subject pops up again in two months, you might be interested.
3225
Use the capital J command to junk a subject for a year.
3226
This is typically used for spam subjects, such as
3227
"Cheap meds for you."
3230
Issue the i command when the mail is obviously porn/spam.
3231
You will see the ip addresses, which you can add to your blacklist file.
3232
This is not done automatically, because I believe in a certain amount of manual control over the process.
3233
For example, if you, as a human, notice that you have blocked out
3234
7 addresses starting with 10.16.29,
3235
you may want to get rid of those rules and replace them with the single rule 10.16.29.0/24.
3236
There is a slight risk in doing this,
3237
since a valid address might be nestled in amongst all these spam sites.
3238
But it's not likely.
3239
In fact, I sometimes take a leap of faith and exclude an entire two-byte block.
3240
That's 65,536 websites that are locked out of my computer, for email or browsing.
3241
A bit heavy handed perhaps, but I really hate all this spam and spyware crap!
3244
If one of those 65,536 addresses turns out to be valid,
3245
use a bang to negate the sense of the address, like this.
3253
Doing these ip lookups in real-time can slow the process of fetching your mail.
3254
You can disable the whole thing by omiting, or commenting out, the ipblack= line in your config file.
3257
IP filtering only works for hyperlinks.
3258
If an email has an online form that is submitted to a forbidden site, I don't detect that.
3259
I should though - as these are the most dangerous emails of all.
3260
They pretend to come from your bank, then send your account numbers to a thief in Russia.
3261
So yes, this form of ip blocking is on my list of fun things to do.
3264
Like spam keywording, ip blocking is no panacea.
3265
For example, a spammer with half a brain can sign up for http redirection at no cost.
3266
Suddenly the domain in the email does not reflect the true destination at all.
3267
I could add software to pull down the html page and test for redirection,
3268
but that would <em>really</em> slow down the interactive mail process.
3269
Beyond this, a spammer can use javascript to assemble his destination url on the fly,
3270
and as you know, there is no way to anticipate the actions of a javascript program and pre-determine the destination url.
3271
And so, the arms race continues,
3272
and just like the real world, the offensive team will always have the upper hand.
3274
<H3 align=center> <A NAME=mailfmt> Formatted Mail </A> </H3>
3276
By default, incoming mail is formatted for readability.
2309
3277
If you want to save a copy of the mail, exactly as it was received (unformatted),
2310
type u at the interactive prompt.
3278
type u at the interactive prompt.
2311
3279
If you don't want the formatting at all, use the -u option on the command line,
2312
as in `perl edbrowse -um0'.
2315
Mail headers and mime section headers are detected,
2316
and most of this header information is discarded.
2317
Each header is consolodated down to:
2318
subject, from, reply-path, and send-date.
2319
That's all you really want to read anyways.
2322
The body of the mail message, or mime section,
2323
is then decoded, if it was encoded using quoted-printable
2324
or base64 mime standard.
2325
Sections encoded via base64 are assumed to be binary attachments.
2326
They are never displayed, but you can save them to files if you wish.
2327
The interactive program prompts you for this.
2330
Sometimes a mail message is replicated, in plain text and in html.
2331
You'll see both versions, separated by a dashed line.
2332
The second version has the braces and angle brackets associated with browsable text,
2333
but you can't really activate any of the links.
2334
You're not in the editor after all.
2335
If you plan to browse this email,
2336
and fill out the form or follow some of the links therein,
2337
save it unformatted to a file.
2338
When the mail session is complete,
2339
edit that file and browse it.
2340
You now have the full power of html at your disposal.
2341
This is perhaps not as fuly integrated as Netscape,
2342
but it's the best I can do.
2345
If the mail is plain text,
2346
we can perform some additional processing for readability.
2347
Leading > signs, which indicate nested text, are stripped away,
2348
and the words "indent n" are placed at the top of the
2349
paragraph, to indicate the number of times the paragraph was > indented.
2350
This software is much harder than it first seems,
2351
because email servers sometimes break lines longer than 80 characters,
2352
and the dangling fragments will not have the leading > characters.
2353
The fragment must be inferred from context --
2354
> lines before and after it.
2355
Then, a user might prepend > to the entire mess,
2356
and send the mail again, whence a server might break some of the lines,
2357
which are now longer than 80 characters, thanks to the new > signs.
2358
At other times a user might deliberately inject a short comment
2359
(which looks like a broken fragment)
2360
into a block of someone else's indented text.
2361
As you can see, decisions are made by heuristics,
2362
and the algorithm is not 100% accurate.
2363
It's barely 80% accurate, but it's better than nothing.
2366
A trailing paragraph that begins "to unsubscribe", and is not too long, is removed,
2367
because this is usually listmaintenance that you don't need to read
2369
This paragraph may appear at the end of the mail message, or an internal mime section.
2371
<H4 align=center> Annoy File </H4>
2373
The annoy file, as specified in your .ebrc file,
2374
contains lines that annoy you, usually commercials
2375
that you don't want to read again and again.
2376
Here are some examples.
2378
<P><PRE><font size=4 face=Arial,Helvetica,sans-serif>This is a multi-part message in MIME format.
2379
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
2384
Email lines that match the lines in this file, exactly, are culled,
2385
so you don't have to read them.
2386
You maintain this file yourself, manually.
2387
If a mail message has commercials that you don't want to hear again,
2388
save it somewhere, and edit it, leaving only the commercials.
2389
Then add these commercials to your growing annoy file.
2390
You'll never see them again.
2393
The lines in the annoy file are hashed, so you can include
2394
hundreds of lines of text (if you wish) without degrading performance.
2396
<H4 align=center> Two Letter Command Summary </H4>
2398
The two-letter commands are unique to edbrowse -
2399
there's nothing like them in ed.
2400
Let's review them here.
2402
<P><PRE><font size=4 face=Arial,Helvetica,sans-serif>qt: quit the program now, whether you've written your files or not
2403
db: debug level [0-7]
2404
cd: change directory
2405
lc: convert line to lower case
2406
uc: convert line to upper case
2407
mc: convert line to mixed case
2408
bl: break line into sentences and phrases
2409
sg: substitution strings are global across sessions
2410
sl: substitution strings are local to their sessions
2411
ci: searches and substitutions are case insensitive
2412
cs: searches and substitutions are case sensitive
2413
dr: directory is readonly
2414
dw: directory is writable, and d moves files to your recycle bin
2415
dx: directory is writable, and d deletes files
2416
dp: delete-print, print line after each delete (toggle)
2418
el: show end markers ^$ when a line is listed
2419
ep: show end markers when a line is listed or printed
2421
f/: retain only the lass component of the filename
2422
w/: write to the lass component of the filename
2423
w+: append to a file
2424
ft: show the title of the current web page
2425
fd: show the description of the current web page
2426
fk: show the keywords of the current web page
2427
ph: auto-convert pdf files to html (toggle)
2428
rh: redirect html (toggle)
2429
ff: fetch frames automatically (toggle)
2430
vs: verify secure connections (toggle)
2431
tn: send dos-style newlines on lines in textareas (toggle)
2432
ac: accept cookies from web servers (toggle)
2433
sr: send refering web page (toggle)
2434
pm: run ftp in passive mode (toggle)
2435
rf: refresh the web page or directory listing
2436
et: edit this web page as pure text
2437
ws: strip this web page relative to its parent
2438
us: unstrip this web page, inverse of ws
2439
sm: send mail [account number]
2442
<H4 align=center> Mailing List </H4>
2444
There is a mailing list for users of edbrowse and other command line utilities.
2445
You can join by sending mail to
2446
<A HREF=mailto:commandline-subscribe@yahoogroups.com?subject=Subscribe>
2447
commandline-subscribe@yahoogroups.com</A>.
3280
as in `e -um1'.
3281
This is occasionally necessary,
3282
if a bug in my formatting routine causes edbrowse to blow up.
3283
You still want to get your mail,
3284
(and send me a copy so I can fix the bug),
3285
so use the -u option to bypass formatting.
3288
When an html mail message is rendered, javascript is disabled.
3289
Thus the mail appears sooner, and the mail client is less likely to crash due to a bug in the javascript machinery.
3290
There really isn't much loss here, because you couldn't activate the links or fill out the form anyways.
3291
If you want to "interact" with this email message,
3292
you have to save it unformatted to a file,
3293
finish your email session, edit that file,
3294
and type b to browse.
3295
Now the html is active, as though you were looking at a web page on somebody's site.
3298
There is a reason for this falderal.
3299
When you are running edbrowse as a fetchmail client, there is a time limit, imposed by your pop3 server.
3300
You have about 20 seconds to decide the fate of each message.
3301
Throw it away, skip it, save it to a file, etc.
3302
If you doddle, the mail server hangs up and you have to start all over again.
3303
This is not the time to interact with your message;
3304
this is not the time to fill out forms or follow hyperlinks to other interesting websites.
3305
If you are that interested, save the message to a file and move on.
3308
Your sighted friend, running Outlook Express,
3309
doesn't have to worry about this, because every message is saved to a file automatically.
3310
When he scans his mail, he is actually looking at files that have been transferred to his computer
3311
some time in the past.
3312
He is not in the middle of a pop3 session, and there are no time limits.
3313
This may be a better approach; I don't know.
3314
Someday I may add a feature to grab all your messages and copy them to local files in your mail directory.
3315
You could then use edbrowse in directory mode to step through each file in turn.
3316
Personally, I get a lot of silly little emails, and spam too,
3317
so I am happy to delete the majority of my messages as they come,
3319
and save the few that are interesting.
3320
Other filtering options can simplify this process.
3321
For instance, mail from my friend Dorothy will always be saved in a particular place,
3322
because I always want to read that at my leisure.
3323
this is described in the next section.
3325
<H3 align=center> <A NAME=filter> Mail Filtering </A> </H3>
3327
Your config file supports a modest level of mail filtering.
3328
You can redirect incoming mail
3329
based upon the sender, the receiver, or the subject.
3330
These parameters are established in your config file.
3331
A mail filtering rule has the form:
3333
matchString > destinationFile
3336
Actually the > is a bit misleading.
3337
If the file exists, the email is appended to the end; the file is not truncated.
3338
So perhaps we should use >>,
3339
but I didn't want to bother with the extra greater, over and over again.
3342
The destination file is interpreted relative to the mail directory,
3343
which is set in your config file.
3344
Of course you can override with an absolute path if you wish.
3347
A mail filtering rule always occurs in the context of a filter block.
3348
For instance, if you wish to redirect mail from certain people, do this.
3349
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>fromfilter {
3350
fred flintstone > fredmail
3351
fred.flintstone@bedrock.us > fredmail
3352
jerk@hotmail.com > x
3358
You can specify the sender's name, or his email address.
3359
It's not a bad idea to do both,
3360
in case he sends mail from some other account etc.
3363
Notice that I didn't capitalize Fred Flintstone.
3364
Matches are case insensitive.
3367
The file name "x" is special; it discards the mail entirely.
3368
You can use this to throw away mail from people
3369
who are constantly harassing you, or sending you spam.
3372
The last entry sends mail to -wod.
3373
The leading - is special;
3374
it means the mail should be saved to wod unformatted.
3375
This happens to be the word of the day from Merriam Webster.
3376
I like to save it unformatted, so I can browse it,
3377
and click on {audio} to hear the word pronounced.
3378
If an email contains hyperlinks,
3379
you may want to save it unformatted,
3380
so you can browse it later.
3383
You can also filter mail based on the to: field.
3384
This is useful if you have several mail accounts,
3385
or mail aliases that are forwarded to your primary account.
3386
Here is a sample block.
3387
<P><PRE><font size=3 face=Arial,Helvetica,sans-serif>tofilter {
3388
support@my-side-business.com > support
3389
sales@my-side-business.com > sales
3390
@my-side-business.com > business
3391
me@my-regular-dayjob.com > work
3396
The third entry is a catchall address,
3397
saving any mail that is sent to that domain.
3398
Since rules are applied in order,
3399
support requests are stored in a file called "support",
3400
sales are stored in a file called "sales",
3401
and all other emails sent to your business are stored in "business".
3404
You can use catchall addresses in the fromfilter block as well.
3405
Anything from this domain goes here, etc.
3408
You can filter based on subject, using the subjfilter{...} block.
3409
This can close the door on the virus de jure.
3410
If a virus uses a subject line of "Come Kiss Me",
3411
you can redirect "come kiss me" to x, and it's gone.
3414
You can also use this feature to block warnings from other ISPs,
3415
complaining that you sent them emails with virus attachments.
3416
You didn't, of course, because you run linux.
3417
You're immune!
3418
Your reply address was forged, so the virus warning was sent back to you,
3419
but you really had nothing to do with it.
3420
Lines like this one can throw these spurious warnings away.
3427
Net Integrator Virus Alert > x
3432
Finally, the reply address is checked against your address book.
3433
If there is a match, the mail is saved in a file whose name is the email alias.
3434
Consider a line in your address book that looks like fred:Fred.Flintstone@SomeDomain.com.
3435
When you receive email from this particular address, it is saved to the file fred.
3436
Thus you don't have to enter and maintain redundant entries in the filter.
3437
There is no need to include Fred.Flintstone@SomeDomain.com > fred.
3441
If you want to save mail from Fred unformatted, place a minus sign,
3442
i.e. -fred, in your address book.
3443
This is the same convention as the from filter.
3444
If you don't want mail from Fred to be redirected,
3445
but you still want to use the alias fred when sending mail,
3446
place an exclamation mark at the start, i.e. !fred.
3449
Note that mail filtering occurs before spam detection.
3450
Thus mail from your friend,
3451
or to your business,
3452
will always be saved in a file,
3453
even if it references a forbidden website.
3456
If an email is redirected to a file, and it includes attachments,
3457
edbrowse will ask you what to do with those attachments,
3458
as though you had used the w command to save the mail yourself.
3459
If your friend has send you a program (attached) that he wants you to look at, just hit return
3460
to save it to the default filename.
3461
If your friend's mail has some kind of logo, or background image, that you don't care about,
3462
just type x and it will go away.
3463
If the image has a recognizable suffix, such as gif, I discard it automatically.
3464
If you really want these images, you'll have to save the email unformatted, and browse it later.
3467
Use the -p option to pass over the filters, as in `e -pm1'.
3468
This also stops spam detection.
3469
I set this when looking at other people's mail, such as my wife's account.
3470
I don't want her mail sent somewhere else because it matches one of my filter rules.
3472
<H3 align=center> <A NAME=end> Wrap up </A> </H3>
3474
That concludes the user's guide.
3475
As you can see, edbrowse is a difficult program to master, but an easy program to use.
3476
I believe this is the key to success for any blind user or programmer.
3477
One can certainly paste a screen reader on top of an existing 2 dimensional program
3478
such as emacs or lynx, and get "up and running" quickly,
3479
but to be truly competitive in the workplace, or efficient at home,
3480
you need a <A HREF=http://www.eklhad.net/cli.html>command line interface</a>.
3481
Edbrowse is an important step in this direction.
3482
It doesn't address the speech adapter, or other common applications such as spreadsheets, finances, or audio systems,
3483
but it does provide a high quality text editor and a decent browser and mail client.
3487
<A HREF=#top>Back to top</A>