~ubuntu-branches/ubuntu/jaunty/edbrowse/jaunty-security

« back to all changes in this revision

Viewing changes to doc/sample.ebrc

  • Committer: Bazaar Package Importer
  • Author(s): Kapil Hari Paranjape
  • Date: 2008-04-09 18:55:23 UTC
  • mfrom: (1.1.4 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080409185523-dqokcloumyn1ibn4
Tags: 3.3.4-1
* New upstream version (3.3.4).
 - Convert between iso8859-1 and utf-8 on the fly.
 - Support reading of pdf using pdftohtml.
 - French translation of html documentation.
 - Old html documentation renamed to usersguide.
 - Additional documentation on philosophy.
* debian/control:
 - Changed homepage to sourcefource site.
 - Moved homepage from description to its own field.
 - Added "poppler-utils | xpdf-utils" to Recommends.
 - Added "www-browser", "mail-reader" and "editor" to Provides. 
 - Removed "XS-" from Vcs-Svn tag.
 - Standards-Version: 3.7.3
* debian/docs: Added new documentation files
  from "doc/" subdirectory.
* debian/watch: Updated to use sourceforge site.
* debian/edbrowse.doc-base:
  - Changed name of upstream provided html documentation from
    "ebdoc.html" to "usersguide.html".
  - Changed section from "net" to "Network/Web Browsing".
* debian/install: Compiled binary is now in "src/".

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#  .ebrc: the configuration file for edbrowse (version 2.2 or above)
 
2
#  This is a sample file.
 
3
#  This file contains passwords - make sure it is not readable by others.
 
4
#  chmod 600 .ebrc
 
5
#  (Of course this public file has no real passwords, but yours will.)
 
6
 
 
7
#  First the email accounts; I have several.
 
8
#  My primary account, from my ISP.
 
9
#  Access this account via -m1.
 
10
#  The next account is -m2, and so on.
 
11
mail {
 
12
#  The pop3 server and the smtp server, they need not be the same.
 
13
inserver = mail.comcast.net
 
14
outserver = smtp.comcast.net
 
15
#  login and password
 
16
login = kdahlke189603
 
17
password = elephant
 
18
#  Who is this mail from?  Your name, and a reply address.
 
19
#  Note, it is now illegal to forge email, so make sure your name
 
20
#  is really yours, or your business, and make sure the reply address
 
21
#  is one of your email accounts, or is forwarded to you.
 
22
from = Karl Dahlke
 
23
reply = kdahlke189603@comcast.net
 
24
}
 
25
 
 
26
#  My personal email account.
 
27
#  This is a subaccount under my primary ISP account.
 
28
mail {
 
29
inserver = mail.comcast.net
 
30
outserver = smtp.comcast.net
 
31
#  When I send mail out, this is the default account.
 
32
default
 
33
login = eklhad
 
34
password = zebra
 
35
from = Karl Dahlke
 
36
reply = eklhad@comcast.net
 
37
}
 
38
 
 
39
#  My wife's account.
 
40
#  I check on it once in a while, with her permission of course.
 
41
mail {
 
42
inserver = mail.comcast.net
 
43
outserver = smtp.comcast.net
 
44
login = kdwife
 
45
password = kangaroo
 
46
from = Wendy Dahlke
 
47
reply = kdwife@comcast.net
 
48
}
 
49
 
 
50
#  My work account.
 
51
mail {
 
52
#  The shortcut eyemail is defined in /etc/hosts.
 
53
#  You can do it this way, or use a full domain name,
 
54
#  as I did with comcast.
 
55
inserver = eyemail
 
56
outserver = eyemail
 
57
login = karl.dahlke@my-work-domain.com
 
58
password = cheetah
 
59
from = Karl Dahlke
 
60
reply = karl.dahlke@my-work-domain.com
 
61
}
 
62
 
 
63
#  Mail that looks like it came from my other web sites.
 
64
#  Let's start with the math site.
 
65
mail {
 
66
inserver = mail.comcast.net
 
67
outserver = mail.comcast.net
 
68
login = eklhad
 
69
password = zebra
 
70
from = Karl Dahlke
 
71
#  All MathReference email is forwarded to me.
 
72
reply = webmaster@mathreference.com
 
73
}
 
74
 
 
75
mail {
 
76
inserver = mail.comcast.net
 
77
outserver = mail.comcast.net
 
78
login = eklhad
 
79
password = zebra
 
80
#  My wife and I work on this site together.
 
81
from = Karl and Wendy Dahlke
 
82
reply = webmaster@scrapsayings.com
 
83
}
 
84
 
 
85
#  An email associated with my private domain, independent of my ISP
 
86
#  This is forwarded to my ISP.
 
87
mail {
 
88
inserver = mail.comcast.net
 
89
outserver = mail.comcast.net
 
90
login = eklhad
 
91
password = zebra
 
92
from = Karl Dahlke
 
93
reply = eklhad@comcast.net
 
94
}
 
95
 
 
96
#  That's all the mail accounts.
 
97
#  Here is my address book.
 
98
#  Format    is alias:email:other fields.
 
99
adbook=/home/eklhad/outside/adbook
 
100
 
 
101
#  Move to this directory when fetching mail.
 
102
maildir = /home/eklhad/mbox
 
103
 
 
104
#  ip addresses on the blacklist
 
105
ipblack=/home/eklhad/outside/ipblack
 
106
 
 
107
#  The cookie jar - where we store the http cookies.
 
108
#  This file contains passwords, make sure it is 0600.
 
109
#  Do not hand edit this file, unless you know what you are doing!
 
110
jar = /home/eklhad/outside/cookies
 
111
 
 
112
#  file of ssl certificates
 
113
#  If you put your file here, it will be shared with lynx, and perhaps other browsers.
 
114
certfile = /etc/ssl/cert.pem
 
115
 
 
116
#  wait 30 seconds for a response from a web server
 
117
webtimer = 30
 
118
#  wait 3 minutes for a response from a mail server
 
119
mailtimer = 180
 
120
 
 
121
#  Write spam messages here.  I use a file in my trash bin,
 
122
#  so I know it gets cleaned out every week.
 
123
spamcan = /home/eklhad/.Trash/spamcan
 
124
 
 
125
#  Redirect mail based on the sender, or the destination account.
 
126
fromfilter {
 
127
fred flintstone > fredmail
 
128
fred.flintstone@bedrock.us > fredmail
 
129
jerk@hotmail.com > x
 
130
word@m-w.com > -wod
 
131
}
 
132
 
 
133
tofilter {
 
134
support@my-side-business.com > support
 
135
sales@my-side-business.com > sales
 
136
@my-side-business.com > business
 
137
me@my-regular-dayjob.com > work
 
138
}
 
139
 
 
140
#  Describe the mime types and the programs to run them.
 
141
#  For obvious reasons, I'm only worried about the audio -
 
142
#  though there may be some application files that could be meaningfully processed.
 
143
mime {
 
144
type = audio/basic
 
145
desc = audio file in a wave format
 
146
suffix = wav,voc,au
 
147
#  The star is replaced with the suffix at runtime
 
148
program = play -t * -
 
149
}
 
150
 
 
151
mime {
 
152
type = audio/mp3
 
153
desc = audio file in mp3 format
 
154
suffix = mp3
 
155
#program = mpg123 -q -
 
156
#  The above line works, but can be inconvenient, depending on the player.
 
157
#  Some mp3 players don't work as well
 
158
#  when they get their input from a pipe.
 
159
#  When it comes from a file, they respond better to keyboard commands,
 
160
#  to pause, back up, etc.
 
161
#  So I invented a special % character at the end,
 
162
#  which becomes a temp file with the proper suffix.
 
163
program = mpg123 -q %
 
164
#  And we could have done the same with play above.
 
165
#program = play %
 
166
#  Then you wouldn't need the -t *
 
167
#  because the temp file has the right suffix, and play understands.
 
168
}
 
169
 
 
170
mime {
 
171
#  the < forces it to be a stream, hence the url is passed to the program
 
172
type = <audio/x-pn-realaudio
 
173
desc = streaming audio
 
174
suffix = rm,ra,ram
 
175
protocol = rtsp,pnm
 
176
program = trplayer
 
177
}
 
178
 
 
179
 
 
180
#  Database access - specify the database, login, and password.
 
181
database = retail,mylogin,mypassword
 
182
 
 
183
#  Sections of the customers table in the retail database.
 
184
#  See the edbrowse documentation for more details.
 
185
table {
 
186
    tname = customers
 
187
#  cnm is my cryptic shorthand for customer name
 
188
#  I want to be cryptic here, cause I'm going to be typing this a lot.
 
189
    tshort = cnm
 
190
    cols = custnum,firstname,lastname
 
191
#  Specify the primary key, in this case, the first column selected.
 
192
    keycol = 1
 
193
}
 
194
 
 
195
table {
 
196
    tname = customers
 
197
#  All I care about here is customer and birthdate.
 
198
    tshort = cbd
 
199
    cols = birthdate,custnum
 
200
    keycol = 2
 
201
}
 
202
 
 
203
 
 
204
#  Plenty of sites use javascript solely for visual effect.
 
205
#  And this javascript tends to be complicated, which means I usually
 
206
#  don't parse it properly, and you get lots of annoying errors.
 
207
#  You can disable it per site.
 
208
#  Note, better to say space.com, instead of www.space.com,
 
209
#  unless there is a foo.space.com where you really need the javascript.
 
210
nojs = space.com
 
211
nojs = nasa.gov
 
212
nojs = google.com
 
213
nojs = paypal.com
 
214
 
 
215
#  Every time you fetch a web page from the internet,
 
216
#  your browser identifies itself to the host.
 
217
#  This is done automatically.
 
218
#  Edbrose identifies itself as "edbrowse/2.1.3",
 
219
#  where the number after the slash indicates the current version of edbrowse.
 
220
#  All well and good, but some websites have no respect for edbrowse,
 
221
#  or lynx for that matter.
 
222
#  They won't let you in the door unless you look like Explorere or Netscape.
 
223
#  Clickbank.com, a major credit card processor, is one example.
 
224
#  So what do we do?  We lie!
 
225
#  You can specify different agents in this config file,
 
226
#  and activate them with the `ua' (user agent) command.
 
227
#  With the following lines in your config file,
 
228
#  you can type ua1 to pretend to bee lynx, and ua2 to pretend to be Mozilla.
 
229
#  Type ua0 to resurrect the standard edbrowse identification.
 
230
 
 
231
agent = Lynx/2.8.4rel.1 libwww-FM/2.14
 
232
agent = Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)
 
233
 
 
234
#  Ok, we're ready to write our first script.
 
235
#  Let's start out with something simple.
 
236
#  undos and unword a file.
 
237
#  No doubt a Windows expert could help me with the latter.
 
238
function+ud {
 
239
,s/\r$//
 
240
}
 
241
 
 
242
function:uw {
 
243
#  Fix the apostrophe
 
244
,s/�/'/g
 
245
#  Strip out nonascii stuff.
 
246
#  Sorry to be so English-centric.
 
247
#  This will mess you up if you're reading a Spanish word document,
 
248
#  and you lose your nonascii letters.
 
249
,s/[\0-\11\13\14\16-\37\200-\377]//g
 
250
#  After the above, there'll be lots of blank lines.
 
251
g/^ *$/ d
 
252
#  Break lines at return boundaries.
 
253
,bl
 
254
#  Strip off trailing junk.
 
255
/^ !"#\$%&'()\*/,$d
 
256
}
 
257
 
 
258
#  How about a function to access google.
 
259
#  That's something everybody does all the time.
 
260
#  I went to the home page, put in some keywords, set db2,
 
261
#  and pressed search.
 
262
#  That gave me the url.
 
263
#  Here it is, with ~0 embedded.
 
264
#  ~0 stands for all the arguments, in other words, the rest of the line.
 
265
#  So   <gg elephants tigers   will call up google,
 
266
#  looking for "elephants tigers".
 
267
function+gg {
 
268
b www.google.com/search?q=~0&hl=n&btnG=Google+Search&meta=
 
269
#  Ok, we got the web page back.
 
270
#  How do we know?  Go back and look at the function line.
 
271
#  The + means stop if there are any errors.
 
272
#  We're still here, so I guess there weren't any errors.
 
273
#  Google has returned its results.
 
274
#  But there's lots of text that I don't care to read.
 
275
#  So I wrote a google cleanup function.
 
276
#  Let's call it now.
 
277
#  It's ok that this function hasn't been defined yet;
 
278
#  forward references are allowed.
 
279
<ggc
 
280
}
 
281
 
 
282
#  The google cleanup function.
 
283
#  This is called when you access google (above),
 
284
#  but you may want to call it again, when you ask for the next ten results,
 
285
#  and the next ten results, etc.
 
286
#  That's why I made it a separate function.
 
287
#  Look at the function definition and note the : instead of +
 
288
#  This means the function will march on, even if there are errors.
 
289
#  This lets us delete certain lines, if they are there.
 
290
#  And if they're not there, we get an error, and march on.
 
291
#  No big deal.
 
292
function:ggc {
 
293
#  get rid of pdf warnings
 
294
g/^Your browser may not have a PDF reader available.$/d
 
295
g/^{Similar pages}$/d
 
296
#  trailing lines, after "search next", can go away
 
297
/^{search Next}$/+,$d
 
298
#  initial lines and stats can go away
 
299
1,/Search took [\d.]+ seconds/d
 
300
#  move the "did you mean" line to the end; we need to keep this one
 
301
/^Did you mean:$/,/^Did you mean:$/+2m$
 
302
#  more stuff at the start that we don't need
 
303
1,/^Categor[iesy]+: *|/d
 
304
1,/{See your message here...}/d
 
305
1,/^|Sponsored Link$/d
 
306
#  First two nonblank lines and first blank line can go away
 
307
1g/./d
 
308
1g/./d
 
309
1g/^$/d
 
310
#  put the "did you mean" line back to the top, if it's there
 
311
/^Did you mean:$/,$m0
 
312
}
 
313
 
 
314
#  mariam-webster dictionary lookup
 
315
function+mw {
 
316
#  You can't see it, unless you list the line, but there is
 
317
#  a control a between dictionary and book.
 
318
#  This indicates post method, rather than get method.
 
319
b www.m-w.com/cgi-bin/dictionarybook=Dictionary&va=~1
 
320
<mwc
 
321
}
 
322
 
 
323
function:mwc {
 
324
/^{Get the Word of the Day/,$d
 
325
1,/^Click on the Collegiate Thesaurus tab to look up the current word/+2d
 
326
1,/^<>| *<Go>$/-d
 
327
1,/^One entry found for/+d
 
328
1,/^Suggestions for/-d
 
329
}
 
330
 
 
331
#  Clean up an article from www.space.com.
 
332
#  Now you're ready for the big time.
 
333
#  if(*) means proceed if the previous command succeeded.
 
334
#  if(?) means proceed if the previous command failed.
 
335
#  Get it ... ? as in the question mark of an error.
 
336
#  Similarly for while(*), until(*), etc.
 
337
#  There is also a loop(n) construct, to repeat something n times.
 
338
function:sca {
 
339
#  stuff at the end can go
 
340
/^{Add these headlines to your site}$/,$d
 
341
#  All the stuff at the top, before the word posted, can go
 
342
1,/^posted/d
 
343
if(*) {
 
344
#  now the top line is the date, don't need it
 
345
1g/ 20\d\d$/d
 
346
#  Now a blank line
 
347
1g/^$/d
 
348
}
 
349
#  We don't care about the section called images, which is inserted
 
350
#  after the first paragraph of the article.
 
351
/^| *Images\|More Stories$/d
 
352
if(*) {
 
353
#  delete some sections before this line, and after it.
 
354
?^|SCIENCE TUESDAY\||TECH WEDNESDAY$?,-d
 
355
.,/{>>Uplink your views}/d
 
356
if(*){
 
357
d
 
358
} else {
 
359
.,/^| *More Stories$/d
 
360
.,/^| *Related SPACE.com STORIES$/d
 
361
.,/^| *Related Links$/d
 
362
.,/^| *Multimedia$/d
 
363
until(?) {
 
364
d
 
365
.g/^|* *{.*}$/d
 
366
}
 
367
}
 
368
#  Now print the article
 
369
,p
 
370
}
 
371
}
 
372