summaryrefslogtreecommitdiff
path: root/bits/bbdb-filters/doc/main.texinfo
blob: 7edb94860731cb704edc8a3fd124758e9ff7b0d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
% This is really LaTeXInfo, but some time LaTeX mode is more useful -*- LaTeX  -*-
% This is really LaTeXInfo, but some time LaTeX mode is more useful -*- Latexinfo  -*-
%
%  Revision:  main.texinfo,v 1.1.1.1 1995/08/07 08:43:10 mohsen Exp
%
%\documentstyle[12pt,latexinfo,format,smallverb,tabular]{book}
%\documentstyle[12pt,latexinfo,format]{book}
\documentstyle[12pt,format,hyperlatex,latexinfo]{book}
%\documentstyle[12pt,times,latexinfo,format]{book}
%\documentstyle[12pt,avantgarde,latexinfo,format]{book}
%\documentstyle[12pt,palatino,latexinfo,format]{book}
%\documentstyle[10pt,avantgarde,latexinfo,format]{book}

\pagestyle{empty}

\c \input{transfig}  \c Used with eepic -- not needed when using psfig.
\input{epsf}

\begin{document}

\c \bibliographystyle{alpha}  \c [banan92]
\c \bibliographystyle{plain}   \c Numbers [1]

\c \textwidth 5.2in \c for .tty generation

\htmldirectory{bbdbFilters}
\htmlname{bbdbFilters}
\htmltitle{BBDB Filters}
\htmlmathitalics
\htmladdress{\htmlrule{}info@neda.com}

\c Declare which indices you want to make use of.
\newindex{cp}
\newindex{fn}

\title{BBDB Input and Output Filters\\
        \vspace{0.25in} {\large DRAFT}\\
        {\normalsize Version 0.2}}  

\author{{\normalsize Prepared by}\\
        Mohsen Banan \\
        \code{mohsen@neda.com}\\
        Neda Communications, Inc.\\
        17005 SE 31st Place\\
        Bellevue, WA 98008}

\c (current-time-string)
\date{July 26, 1995}
\c \date{\today}

\maketitle

\c The following commands start the copyright page for the printed manual.
\clearpage
\vspace*{0pt plus 1filll}


\bigskip
\bigskip
\bigskip


This document describes the ``BBDB Input and Output Filters'' package,
a utility which translates BBDB information to and from various other
formats.

\begin{display}

Copyright \copyright 1995 Neda Communications, Inc.

Published by:
Neda Communications, Inc.
17005 SE 31st Place, 
Bellevue, WA 98008 USA

\end{display}


Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be stated in a
translation approved by the Foundation.

\bigskip
\bigskip

\clearpage
\pagestyle{headings}

\c Use roman numerals for the page numbers and Insert the Table of Contents.
\pagenumbering{roman}
\tableofcontents

\c \listoftables
\c \listoffigures

\c End the Table of Contents and start numbering from 1 with Arabic numbers

\clearpage
\pagenumbering{arabic}

\c Anything before the setfilename will not appear in the Info file.
\setfilename{INFOFILE}

\topnode{BBDB Filters}

\htmlmenu{6}

\begin{ifinfo}
Copyright \copyright \var{1995} \var{Neda Communications, Inc.}
\end{ifinfo}

\c The Top node contains the master menu for the Info file.
\c This appears only in the Info file, not the printed manual.

\chapter{Introduction}

Over time much valuable data has been gathered in BBDB database files.
Many wish to share parts or all of this information with others.  They
also wish to have access to this same information from other systems
(like personal digital assistants) lacking straightforward BBDB
access.

For these reasons, we have prepared a family of filters that convert
the information in BBDB to and from a variety of other
formats. ``Output filters'' export BBDB information to other formats
while ``input filters'' import information from other formats into
BBDB.

Our hope is that over time this collection of BBDB filters will grow
through contributed code.

\section{About This Package}

This package is a collection of filters and is called ``BBDB Input and
Output Filters''.  It has been somewhat tested with BBDB version 1.50.
The present state of the software is still preliminary although it has
proved useful.

\section{About This Manual}

This documentation applies to Version 0.2 of the ``BBDB Input and
Output Filters'' package.  The documentation is presently skeletal and
very preliminary.  It mostly provides the user with instructions for
use, and very little background is included.  Familiarity with Emacs
Lisp is assumed for some sections.

\chapter{Output Filters}

``Output filters'' are used to export BBDB information into formats 
used by other systems.

In general, an output filter uses the contents of your
\code{*BBDB*} buffer as input.  Note that output filters do not use
BBDB files (typically `\code{~/.bbdb}') directly.

An output filter is invoked by executing its associated lisp function.
The name of the function is conventionally named \code{bbdb-<system>-output} 
(e.g., \code{M-x bbdb-hp200lx-output}).

The result of running an output filter is to create a new buffer that
contains the \code{*BBDB*} information appropriately transformed into a
format suitable for use by the target system.  The new buffer is given
a file name that you specify.

\section{HP 200LX Phone Book}

\cindex{HP 200LX Connectivity Pack}
This package has only been tested on HP 200LX palmtop systems.  It
also requires the ``HP 200LX Connectivity Pack'' for converting
comma-delimited ASCII files into binary .PDB files which are read by
the HP 200LX Phone Book application.  Version 1.00 of the ``HP 200LX
Connectivty Pack'' was used for testing.

The HP 200LX output filter is in file \code{bbdb-hp200lx.el}.

\begin{enumerate}

\findex{bbdb-hp200lx-output}

\item Invoke \code{M-x bbdb} to populate the \code{*BBDB*} buffer
with the contents you wish to export.

\item Invoke \code{ bbdb-hp200lx-output} to create an ASCII .CDF 
(Comma Delimited File). \cindex{.CDF file, HP 200LX Phone Book}

\item Using Xlate/Merge option of HP Connectivity Pack convert the
.CDF file into a binary .PDB file used by the Phone Book program.
\cindex{.PDF file, HP 200LX Phone Book}

\item Download the .PDB file to your palmtop's internal disk and
ensure that the Phone Book program is set use the newly downloaded
.PDB file.

\end{enumerate}

\section{PC Eudora}

BBDB information can be exported to PC Eudora in two formats--as a
nickname database file and as a recipients database file.

The PC Eudora output filter is in file \code{bbdb-eudora.el}.

\subsection{PC Eudora Nickname Database}

\begin{enumerate}

\item Invoke \code{M-x bbdb} to populate the \code{*BBDB*} buffer
with the contents you wish to export.

\findex{bbdb-eudora-nndbase-output}
\item Invoke \code{bbdb-eudora-nndbase-output} to create a PC Eudora
Nickname database file.

\item Make the file accessible to PC Eudora.

\end{enumerate}

\subsection{PC Eudora Recipient Database}

\begin{enumerate}

\item Invoke \code{M-x bbdb} to populate the \code{*BBDB*} buffer
with the contents you wish to export.

\findex{bbdb-eudora-rcpdbase-output}
\item Invoke \code{bbdb-eudora-rcpdbase-output} to create a PC Eudora 
recipient's database file.

\item Make the file accessible to PC Eudora.

\end{enumerate}

\section{Lotus cc:Mail Nicknames}

The Lotus cc:Mail output filter is in file \code{bbdb-ccmail.el}.

\begin{enumerate}

\item Invoke \code{M-x bbdb} to populate the \code{*BBDB*} buffer
with the contents you wish to export.

\findex{bbdb-ccmail-output}
\item Invoke \code{ bbdb-ccmail-output} to create a cc:Mail Nicknames file.

\item Make the file accessible to cc:Mail. 

\end{enumerate}

\section{PH}

The PH output filter is in file \code{bbdb-ph.el}.

\begin{enumerate}

\item Invoke \code{M-x bbdb} to populate the \code{*BBDB*} buffer
with the contents you wish to export.

\findex{bbdb-ph-output}
\item Invoke \code{bbdb-ph-output} to create a \code{ph} data file for 
use with the  \code{maked} program.

\item Make the file accessible to \code{ph}.

\end{enumerate}

\section{Emacs Lisp Export}

The Emacs Lisp Export output filter is in file \code{bbdb-export.el}.

This output filter uses the current contents of your
\code{*BBDB*} buffer to generate a new buffer (\code{*BBDB* Export}) 
that contains a single lisp \code{(progn ...)} expression.  For
example, a \code{*BBDB*} buffer containing two records would result in
the following \code{*BBDB* Export} buffer:

\begin{example}
;;; ======= Start of Exported BBDB Records =======
(progn  
  (require 'bbdb-com)
  (defun bbdb-maybe-create (name company net &optional addrs phones notes)
    "Try to add a record to BBDB if it does not already exist."
    (condition-case err
        (progn
          (bbdb-create-internal name company net addrs phones notes)
          (message "%s %s added." name (if net (concat "<" net ">") ""))
          (sleep-for 1))    
      (error (ding)
             (message "%s %s skipped. (%s)"
                      name
                      (if net (concat "<" net ">") "")
                      (car (cdr err)))
             (sleep-for 1))))

  (bbdb-maybe-create "Jill Doe--IMPORTED"
                     "CBS Corporation"
                     '("jilld@cbs.com")
                     '(
                       ["Home"
                        "368 222ND PL"
                        ""
                        ""
                        "Springfield"
                        "MA" 2117]
                       )
                     '(
                       ["Office" 617 555 9983 0]
                       ) '"Movie Mogul")
  (bbdb-maybe-create "John Doe--IMPORTED"
                     "ABC Incorporated"
                     '("jdoe@abc.com")
                     '(
                       ["Office"
                        "123 Any Street"
                        ""
                        ""
                        "Any Town"
                        "WA" (98027 7758)]
                       )
                     '(
                       ["Office" 206 555 1234 0]
                       ) '"TV Producer")
  )
;;; ======= End of Exported BBDB Records =======
\end{example}

\cindex{Sending BBDB records via email}
This lisp expression can then be sent via email or some other
text-based messaging facility to another user who can then evaluate
the expression which will add the \code{BBDB} records to the
recipient's
\code{BBDB} database.  

Only new records are added.  A record with the same name or net
address as one already existing in the \code{BBDB} is skipped
entirely.

In the sample contents of a \code{*BBDB* Export} buffer presented, two
records are being exported--one for ``John Doe'' and the other for
``Jill Doe''.  Notice that their names have been appended with
\code{--IMPORTED}.  This string can be used to quick locate each record
that is added to the database using this mechanism.

The following steps are for exporting BBDB records into Emacs Lisp:

\begin{enumerate}

\item Invoke \code{M-x bbdb} to populate the \code{*BBDB*} buffer
with the contents you wish to export.

\findex{bbdb-export}
\item Invoke \code{bbdb-export} to create a \code{*BBDB* Export} buffer which contains a
single \code{(progn ...)} can be evaluated to add the records to the
existing \code{BBDB} database (if the records do not already exist).

\item Use the contents of \code{*BBDB* Export} in email and other messaging systems.

\end{enumerate}

The following steps are for a user wishing to import the contents of a
\code{*BBDB* Export} buffer's expression into his or her own database:

\begin{enumerate}

\item Evaluate the region bounded by the lines \\
 \code{;;; ======= Start of Exported BBDB Records =======} \\
and \\
 \code{;;; ======= End of Exported BBDB Records =======}. \\
You can use such commands as
\code{M-x eval-region} or \code{M-x eval-last-sexp}.

\item Review the newly imported entries.  To see them, invoke \code{M-x
bbdb} and specify \code{--IMPORTED} at the \code{Regular Expression}
prompt.  

\item After reviewing the contents of the imported records, you may
wish to remove the \code{--IMPORTED} that is appended to the name by
\code{bbdb-export}.

\end{enumerate}

\chapter{Input Filters}

``Input filters'' are used to import into BBDB information from a
foreign system's data file.

The name of the function is conventionally named
\code{bbdb-<system>-input} (e.g., \code{bbdb-passwd-input} is the name
of the Emacs Lisp function for the UNIX password file input filter).

In general, an ``input filter'' expects the foreign system's data to
be in the current buffer.  The contents of the current buffer are used
to create an Emacs Lisp file which when loaded will add new records
into your BBDB database if they don't yet exist--existing BBDB records
will not be modified.

\section{General Facilities for Input Filtering}

The result of running an input filter is to produce a new buffer a
series of \code{bif-create-record} \findex{bif-create-record}
expressions, each corresponding to a single user's record.  Notice
that input filters do not directly modify the contents of the BBDB
files (typically `\code{~/.bbdb}').

To actually modify the contents of the BBDB database, you must
evaluated the expressions in the resultant buffer created by the input
filter.  One way to do so is simply to invoke \code{M-x eval-buffer}.
Another way is to simply save the buffer to disk and load its contents
into Emacs Lisp using \code{M-x load-file}.

\section{UNIX Password Files}

The UNIX password file input filter is in file \code{bbdb-passwd.el}.

\begin{enumerate}

\item Use \code{M-x find-file} to visit the UNIX password file you wish to import.

\findex{bbdb-passwd-input}
\item With the password file in the current buffer, invoke the input 
filter \code{M-x bbdb-passwd-input}.  You will be prompted for the
domain name associated with that host's password file; an organization
name; as well as the file name to be associated with the buffer of
\code{bif-create-record} expressions.

\item Evaluate the contents of the input filter's buffer to add records 
into your BBDB database file.

\end{enumerate}

\chapter{Miscellany}

\section{TODO List}

\begin{itemize}

\item Move generic input filter functionality out of
\code{bbdb-passwd.el} and into, say, \code{bbdb-ifilt.el}.  
The generic functionality code has names typically prefixed with \code{bif-}.

\item Add support for \code{gdbload} (as an alternative to the 
Xlate/Merge application provided in the HP 200LX Connectivity Pack)
into the HP 200LX output filter.  This is based on input from Robert
Nicholson \code{<robert@steffi.dircon.co.uk>}.

\item Add documentation for variables in the various input and output filters.

\item Check and document all dependencies on other packages.

\end{itemize}

\section{Credits}

Pean Lim \code{<pean@neda.com>} wrote most of this package.  Mohsen
Banan \code{<mohsen@neda.com>} put it all together and guided the
work.  Neda Communications, Inc. sponsored the work.  The output
filters code is based on \code{bbdb-print} by Boris Goldowsky\\
\code{<boris@prodigal.psych.rochester.edu>}.

\c ;;;;;;;;;;;;;;;; Appendix Starts Here ;;;;;;;;;;;;;
\appendix

\mbinput{lgpl.tex}

\begin{tex}
%\bibliography{/usr/local/lib/bib/gnu,/usr/local/lib/bib/networking,/usr/local/lib/bib/directory,/usr/local/lib/bib/rfcs}
\end{tex}

\c \twocolumn
\node Concept Index, Top, First Chapter, Top
\unnumbered{Concept Index}

\printindex{cp}

\H \htmlprintindex

\node Command Index, Top, First Chapter, Top
\unnumbered{Command Index}

\printindex{fn}

\end{document}