summaryrefslogtreecommitdiff
path: root/bits
diff options
context:
space:
mode:
authorRonan Waide <waider@waider.ie>2000-05-01 22:32:39 +0000
committerRonan Waide <waider@waider.ie>2000-05-01 22:32:39 +0000
commit57d90ca8a2342ec93ffdc06ecebf9bd8a3620fb9 (patch)
tree43f143345980e7bfba0cb59b52d36b6b0c50f11f /bits
parent3b9eaa68f24f1f9f426722623e5267fa0adf1bec (diff)
Initial creation of the BITS tree
Diffstat (limited to 'bits')
-rw-r--r--bits/bbdb-filters/COPYING.LIB481
-rw-r--r--bits/bbdb-filters/README64
-rw-r--r--bits/bbdb-filters/bbdb-ccmail.el118
-rw-r--r--bits/bbdb-filters/bbdb-eudora.el284
-rw-r--r--bits/bbdb-filters/bbdb-export.el140
-rw-r--r--bits/bbdb-filters/bbdb-filters-0.2.sh4418
-rw-r--r--bits/bbdb-filters/bbdb-hp200lx.el348
-rw-r--r--bits/bbdb-filters/bbdb-passwd.el192
-rw-r--r--bits/bbdb-filters/bbdb-ph.el253
-rw-r--r--bits/bbdb-filters/doc/formatted/bbdb-filters.info1101
-rw-r--r--bits/bbdb-filters/doc/lgpl.tex552
-rw-r--r--bits/bbdb-filters/doc/main.texinfo492
-rw-r--r--bits/bbdb-filters/doc/makefile159
-rw-r--r--bits/bbdb-filters/makefile67
-rw-r--r--bits/bbdb-funcs.txt383
-rw-r--r--bits/bbdb-mail-folders.el121
-rw-r--r--bits/gnus-bbdb.el300
17 files changed, 9473 insertions, 0 deletions
diff --git a/bits/bbdb-filters/COPYING.LIB b/bits/bbdb-filters/COPYING.LIB
new file mode 100644
index 0000000..eb685a5
--- /dev/null
+++ b/bits/bbdb-filters/COPYING.LIB
@@ -0,0 +1,481 @@
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/bits/bbdb-filters/README b/bits/bbdb-filters/README
new file mode 100644
index 0000000..a88c2fc
--- /dev/null
+++ b/bits/bbdb-filters/README
@@ -0,0 +1,64 @@
+
+BBDB is a rolodex-like database program for GNU Emacs.
+BBDB stands for Insidious Big Brother Database. BBDB is written by:
+Jamie Zawinski <jwz@mcom.com>. My current version is 1.50.
+
+We have prepared a family of filters for BBDB. Currently the output
+filters include:
+
+ - bbdb --> emacs lisp exporting (for exchanging business cards)
+ - bbdb --> HP100/200 LX Phone Book
+ - bbdb --> PC Eudora Nicknames
+ - bbdb --> CC Mail Nicknames
+ - bbdb --> PH/QI
+
+There is presently only one input filter:
+
+ - bbdb <-- UNIX passwd files
+
+We hope that over time a variety of other input and output filters
+will be added to this collection.
+
+
+bbdb-export in particular, can be very useful over the net.
+It provides a convenient way for exchanging business cards.
+
+
+This is a preliminary release. This stuff has not been tested much
+outside of our office. We do use most of these filters on an going basis
+and they work fine for us.
+
+To install, just edit the makefile and run "make install".
+
+To run them, read the comments on top of each filter file.
+
+There is very skimpy documentation in latexinfo format. It is just
+meant to be a starting point.
+
+In addition to the attached shar file,
+you can also ftp this package from:
+ //anonymous@ftp.neda.com:/pub/eoe/bbdbPlus/bbdb-filters-0.2.tar
+ URL = ftp://ftp.neda.com/pub/eoe/bbdbPlus/bbdb-filters-0.2.tar
+
+Many of the filters require bbdb-tex-print package by:
+Boris Goldowsky <boris@prodigal.psych.rochester.edu>.
+
+The one that we use can be found in:
+ //anonymous@ftp.neda.com:/pub/eoe/bbdbPlus/bbdb-tex-3.0.tar
+ URL = ftp://ftp.neda.com/pub/eoe/bbdbPlus/bbdb-tex-3.0.tar
+
+You can checkout the overview of this package by
+browsing the manual (latex/info/html) at:
+ URL = http://www.neda.com/eoe/bbdbFilters/bbdbFilters.html
+
+
+Send bug-reports, comments and suggestions to:
+ Mohsen Banan-neda <mohsen@neda.com>
+and refer to:
+ bbdb-filters RCS: README,v 1.2 1995/08/08 02:59:15 mohsen Exp
+
+
+Hope you find this helpful.
+
+...Mohsen.
+
diff --git a/bits/bbdb-filters/bbdb-ccmail.el b/bits/bbdb-filters/bbdb-ccmail.el
new file mode 100644
index 0000000..d8ce4d9
--- /dev/null
+++ b/bits/bbdb-filters/bbdb-ccmail.el
@@ -0,0 +1,118 @@
+;;; This file is part of the BBDB Filters Package. BBDB Filters Package is a
+;;; collection of input and output filters for BBDB.
+;;;
+;;; Copyright (C) 1995 Neda Communications, Inc.
+;;; Prepared by Mohsen Banan (mohsen@neda.com)
+;;;
+;;; This library is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU Library General Public License as
+;;; published by the Free Software Foundation; either version 2 of the
+;;; License, or (at your option) any later version. This library is
+;;; distributed in the hope that it will be useful, but WITHOUT ANY
+;;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;;; License for more details. You should have received a copy of the GNU
+;;; Library General Public License along with this library; if not, write
+;;; to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+;;; USA.
+;;;
+;;; This is bbdb-eudora.el
+;;;
+;;;
+;;; RCS: bbdb-ccmail.el,v 1.1.1.1 1995/08/07 08:43:09 mohsen Exp
+;;;
+;;; a copy-and-edit job on bbdb-print.el
+
+;;; To use this, add the following to your .emacs
+;;; and strip ";;;XXX"
+;;;
+
+;;;XXX;; BBDB Filters
+;;;XXX(load "bbdb-ccmail")
+
+;;;XXX(setq bbdb-ccmail-filename "~/privdir.ini")
+;;;XXX;;; And then
+;;;XXX;;; (bbdb-ccmail-output)
+
+;;; TODO
+;;; Make the postoffice name optional as an argument
+;;;
+
+(require 'bbdb-print)
+
+(defvar bbdb-ccmail-filename "~/privdir.ini"
+ "*Default file name for bbdb-output-ccmail printouts of BBDB database.")
+
+(defun bbdb-ccmail-output (to-file)
+ "Print the selected BBDB entries"
+ (interactive (list (read-file-name "Print To File: " bbdb-ccmail-filename)))
+ (setq bbdb-ccmail-filename (expand-file-name to-file))
+ (let ((current-letter t)
+ (records (progn (set-buffer bbdb-buffer-name)
+ bbdb-records)))
+ (find-file bbdb-ccmail-filename)
+ (delete-region (point-min) (point-max))
+ (let* ((ccmail-count 0))
+ (while records
+ (setq current-letter
+ (boe-ccmail-format-record (car (car records))
+ current-letter))
+ (setq records (cdr records)))
+ (goto-char (point-min))
+ (insert (format "[smtpgate] \nEntryCount=%d \n" ccmail-count))
+ (goto-char (point-min)))))
+
+(defun boe-ccmail-output-this-record-p (name net)
+ "Examine NAME COMP NET PHONES ADDRS NOTES and return t if
+the current record is to be output by bbdb-output-ccmail."
+ ;; if name is non-nil, output it
+ (cond ((and name net) t)
+ (t nil))
+ )
+
+
+(defun boe-ccmail-format-record (record &optional current-letter brief)
+ "Insert the bbdb RECORD in Ccmail format.
+Optional CURRENT-LETTER is the section we're in -- if this is non-nil and
+the first letter of the sortkey of the record differs from it, a new section
+heading will be output \(an arg of t will always produce a heading).
+The new current-letter is the return value of this function.
+Someday, optional third arg BRIEF will produce one-line format."
+ (bbdb-debug (if (bbdb-record-deleted-p record)
+ (error "plus ungood: tex formatting deleted record")))
+
+ (let* ((bbdb-elided-display bbdb-print-elide)
+ (first-letter
+ (substring (concat (bbdb-record-sortkey record) "?") 0 1))
+ (name (and (bbdb-field-shown-p 'name)
+ (or (bbdb-record-getprop record 'tex-name)
+ (bbdb-print-tex-quote
+ (bbdb-record-name record)))))
+ (net (and (bbdb-field-shown-p 'net)
+ (bbdb-record-net record)))
+ (begin (point))
+ )
+
+ (if (and current-letter
+ (not (string-equal first-letter current-letter)))
+ (message "Now processing \"%s\" entries..." (upcase first-letter)))
+
+ (if (boe-ccmail-output-this-record-p name net)
+ (progn
+
+ ;; Email address -- just use their first address.
+ ;; Make all dots legal line-breaks.
+ ;;
+ ;; output in the following format: "<Pretty Name>" <email address>
+ (if net
+ (let ((net-addr (car net))
+ (start 0))
+ (setq ccmail-count (+ ccmail-count 1))
+ (insert (format "Entry%d=" ccmail-count))
+ (insert (format "\"%s\" <%s> \n" name net-addr))))
+ (setq current-letter first-letter))
+ )
+
+ ;; return current letter
+ current-letter))
+
diff --git a/bits/bbdb-filters/bbdb-eudora.el b/bits/bbdb-filters/bbdb-eudora.el
new file mode 100644
index 0000000..2c2f848
--- /dev/null
+++ b/bits/bbdb-filters/bbdb-eudora.el
@@ -0,0 +1,284 @@
+;;; This file is part of the BBDB Filters Package. BBDB Filters Package is a
+;;; collection of input and output filters for BBDB.
+;;;
+;;; Copyright (C) 1995 Neda Communications, Inc.
+;;; Prepared by Mohsen Banan (mohsen@neda.com)
+;;;
+;;; This library is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU Library General Public License as
+;;; published by the Free Software Foundation; either version 2 of the
+;;; License, or (at your option) any later version. This library is
+;;; distributed in the hope that it will be useful, but WITHOUT ANY
+;;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;;; License for more details. You should have received a copy of the GNU
+;;; Library General Public License along with this library; if not, write
+;;; to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+;;; USA.
+;;;
+;;; This is bbdb-eudora.el
+;;;
+;;;
+;;; RCS: bbdb-eudora.el,v 1.1.1.1 1995/08/07 08:43:09 mohsen Exp
+;;;
+;;; a copy-and-edit job on bbdb-print.el
+
+;;; To use this, add the following to your .emacs
+;;; and strip ";;;XXX"
+;;;
+
+;;;XXX;; BBDB Filters
+;;;XXX(load "bbdb-eudora")
+
+;;;XXX(setq bbdb-eudora-nndbase-filename
+;;;XXX (concat "/dos/m/eudora.mai/" (user-login-name) "/nndbase.txt"))
+;;;XXX;;; And then
+;;;XXX;; (bbdb-eudora-nndbase-output)
+
+;;;XXX(setq bbdb-eudora-rcpdbase-filename
+;;;XXX (concat "/dos/m/eudora.mai/" (user-login-name) "/rcpdbase.txt"))
+;;;XXX;;; And then
+;;;XXX;; (bbdb-eudora-rcpdbase-output)
+
+(require 'bbdb-print)
+(require 'basic-ext)
+
+(defvar bbdb-eudora-nndbase-filename "~/nndbase.txt"
+ "*Default file name for bbdb-output-eudora printouts of BBDB database.")
+
+(defun bbdb-eudora-nndbase-output (to-file)
+ "Print the selected BBDB entries"
+ (interactive (list (read-file-name "Print To File: " bbdb-eudora-nndbase-filename)))
+ (setq bbdb-eudora-nndbase-filename (expand-file-name to-file))
+ (let ((current-letter t)
+ (records (progn (set-buffer bbdb-buffer-name)
+ bbdb-records)))
+ (find-file bbdb-eudora-nndbase-filename)
+ (delete-region (point-min) (point-max))
+ (while records
+ (setq current-letter
+ (boe-format-record (car (car records)) current-letter))
+ (setq records (cdr records)))
+ (goto-char (point-min))
+ (message "Eudora nickname file %s generated." bbdb-eudora-nndbase-filename)))
+
+(defsubst boe-print-if-not-blank (string prepend-string &rest more)
+ "If STRING is not null, then return it with PREPEND-STRING in front and concatenated
+with rest of arguments. If it is null, then all arguments are
+ignored and the null string is returned."
+ (if (or (null string) (equal "" string))
+ ""
+ (apply 'concat prepend-string string more)))
+
+(defun boe-output-this-record-p (name comp net phones addrs notes)
+ "Examine NAME COMP NET PHONES ADDRS NOTES and return t if
+the current record is to be output by bbdb-output-eudora."
+ ;; if name is non-nil, output it
+ (cond ((and name net) t)
+ (t nil))
+ )
+
+
+(defun boe-format-record (record &optional current-letter brief)
+ "Insert the bbdb RECORD in Eudora format.
+Optional CURRENT-LETTER is the section we're in -- if this is non-nil and
+the first letter of the sortkey of the record differs from it, a new section
+heading will be output \(an arg of t will always produce a heading).
+The new current-letter is the return value of this function.
+Someday, optional third arg BRIEF will produce one-line format."
+ (bbdb-debug (if (bbdb-record-deleted-p record)
+ (error "plus ungood: formatting deleted record")))
+
+ (let* ((bbdb-elided-display bbdb-print-elide)
+ (first-letter
+ (substring (concat (bbdb-record-sortkey record) "?") 0 1))
+ (name (and (bbdb-field-shown-p 'name)
+ (or (bbdb-record-getprop record 'tex-name)
+ (bbdb-record-name record))))
+ (comp (and (bbdb-field-shown-p 'company)
+ (bbdb-record-company record)))
+ (net (and (bbdb-field-shown-p 'net)
+ (bbdb-record-net record)))
+ (phones (and (bbdb-field-shown-p 'phone)
+ (bbdb-record-phones record)))
+ (addrs (and (bbdb-field-shown-p 'address)
+ (bbdb-record-addresses record)))
+ (notes (bbdb-record-raw-notes record))
+ (begin (point))
+ (bare t))
+
+ ;; Section header, if neccessary.
+
+ (if (and current-letter (not (string-equal first-letter current-letter)))
+ (message "Now processing \"%s\" entries..." (upcase first-letter)))
+
+ (if (boe-output-this-record-p name comp net phones addrs notes)
+ (progn
+
+ ;; Eudora nickname in canonical form (e.g., mohsen.banan)
+ ;;
+ (if name
+ (insert (format "<%s> \n" name)))
+
+ ;; Email address -- just use their first address.
+ ;; Make all dots legal line-breaks.
+ ;;
+ ;; output in the following format: "<Pretty Name>" <email address>
+ (if net
+ (let ((net-addr (car net))
+ (start 0))
+ (insert (format ">\"%s\" <%s> \n" name net-addr))))
+
+ ;; start a Eudora nndbase.txt notes section for this nickname
+ ;; by inserting the nickname again
+
+ (if name
+ (insert (format "<%s> \n" name)))
+
+ ;; Company
+ ;;
+ (if comp
+ (insert (format "> Company: %s \n"
+ (boe-mangle-if-multi-line comp))))
+
+ ;; Phone numbers
+ ;;
+ (while phones
+ (let ((place (aref (car phones) 0))
+ (number (bbdb-phone-string (car phones))))
+ (setq bare nil)
+ (insert (format "> Telephone: %s%s \n"
+ (boe-print-if-not-blank place "" ": ")
+ number))
+ (setq phones (cdr phones))))
+
+ ;; Addresses
+ ;;
+ (while addrs
+ (let ((addr (car addrs)))
+ (setq bare nil)
+ (insert
+ (format
+ "> Address: \n%s"
+ (concat
+ (boe-print-if-not-blank (bbdb-address-street1 addr) "> " " \n")
+ (boe-print-if-not-blank (bbdb-address-street2 addr) "> " " \n")
+ (boe-print-if-not-blank (bbdb-address-street3 addr) "> ")
+ (boe-print-if-not-blank (bbdb-address-city addr) "> ")
+ (if (and (not (equal "" (bbdb-address-city addr)))
+ (not (equal "" (bbdb-address-state addr))))
+ ", ")
+ (boe-print-if-not-blank (bbdb-address-state addr) "" " ")
+ (boe-print-if-not-blank (bbdb-address-zip-string addr) "" " \n")))))
+ (setq addrs (cdr addrs)))
+
+ ;; BBDB Notes
+
+ (if (stringp notes)
+ (setq notes (list (cons 'notes notes))))
+ (while notes
+ (let ((thisnote (car notes)))
+ (if (bbdb-field-shown-p (car thisnote))
+ (progn
+ (setq bare nil)
+ (if (eq 'notes (car thisnote))
+ (insert (format "> Notes: %s \n"
+ (boe-mangle-if-multi-line (cdr thisnote))))
+ (insert (format "> Note [%s]: %s \n"
+ (symbol-name (car thisnote))
+ (boe-mangle-if-multi-line (cdr thisnote))))))))
+ (setq notes (cdr notes)))
+
+ ;; If record is bare, delete anything we may have inserted.
+ ;; otherwise, mark the end of this record.
+
+ (if bare
+ (delete-region begin (point))
+
+ (setq current-letter first-letter))
+
+ ))
+
+ ;; return current letter
+ current-letter))
+
+
+(defun boe-mangle-if-multi-line (string)
+ "If STRING is has multiple lines, mangle it for output to Eudora"
+ (if (string-match "\n" string)
+ (string-replace-regexp string "\n" " \n> ")
+ string))
+
+
+;;;;;;;;;;;; Eudora Receipient DataBase (rcpdbase.txt) ;;;;;;;;;;;
+
+;;;(setq bbdb-eudora-rcpdbase-filename "/dos/m/eudora.mai/mohsen/rcpdbase.txt")
+(defvar bbdb-eudora-rcpdbase-filename "~/rcpdbase.txt"
+ "*Default file name for bbdb-output-eudora printouts of BBDB database.")
+
+(defun bbdb-eudora-rcpdbase-output (to-file)
+ "Print the selected BBDB entries"
+ (interactive (list (read-file-name "Print To File: " bbdb-eudora-rcpdbase-filename)))
+ (setq bbdb-eudora-rcpdbase-filename (expand-file-name to-file))
+ (let ((current-letter t)
+ (records (progn (set-buffer bbdb-buffer-name)
+ bbdb-records)))
+ (find-file bbdb-eudora-rcpdbase-filename)
+ (delete-region (point-min) (point-max))
+ (while records
+ (setq current-letter
+ (boe-rcpdbase-format-record (car (car records)) current-letter))
+ (setq records (cdr records)))
+ (goto-char (point-min))
+ (message "Eudora rcpt. file %s generated." bbdb-eudora-nndbase-filename)))
+
+
+
+(defun boe-rcpdbase-format-record (record &optional current-letter brief)
+ "Insert the bbdb RECORD in Eudora format.
+Optional CURRENT-LETTER is the section we're in -- if this is non-nil and
+the first letter of the sortkey of the record differs from it, a new section
+heading will be output \(an arg of t will always produce a heading).
+The new current-letter is the return value of this function.
+Someday, optional third arg BRIEF will produce one-line format."
+ (bbdb-debug (if (bbdb-record-deleted-p record)
+ (error "plus ungood: formatting deleted record")))
+
+ (let* ((bbdb-elided-display bbdb-print-elide)
+ (first-letter
+ (substring (concat (bbdb-record-sortkey record) "?") 0 1))
+ (name (and (bbdb-field-shown-p 'name)
+ (or (bbdb-record-getprop record 'tex-name)
+ (bbdb-record-name record))))
+ (comp (and (bbdb-field-shown-p 'company)
+ (bbdb-record-company record)))
+ (net (and (bbdb-field-shown-p 'net)
+ (bbdb-record-net record)))
+ (phones (and (bbdb-field-shown-p 'phone)
+ (bbdb-record-phones record)))
+ (addrs (and (bbdb-field-shown-p 'address)
+ (bbdb-record-addresses record)))
+ (notes (bbdb-record-raw-notes record))
+ (begin (point))
+ (bare t))
+
+ ;; Section header, if neccessary.
+
+ (if (and current-letter
+ (not (string-equal first-letter current-letter)))
+ (message "Now processing \"%s\" entries..." (upcase first-letter)))
+
+ (if (boe-output-this-record-p name comp net phones addrs notes)
+ (progn
+
+ ;; Eudora nickname in canonical form (e.g., mohsen.banan)
+ ;;
+ (if name
+ (insert (format "%s \n" name)))
+
+ (setq current-letter first-letter)
+
+ ))
+
+ ;; return current letter
+ current-letter))
diff --git a/bits/bbdb-filters/bbdb-export.el b/bits/bbdb-filters/bbdb-export.el
new file mode 100644
index 0000000..279238a
--- /dev/null
+++ b/bits/bbdb-filters/bbdb-export.el
@@ -0,0 +1,140 @@
+;;; This file is part of the BBDB Filters Package. BBDB Filters Package is a
+;;; collection of input and output filters for BBDB.
+;;;
+;;; Copyright (C) 1995 Neda Communications, Inc.
+;;; Prepared by Mohsen Banan (mohsen@neda.com)
+;;;
+;;; This library is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU Library General Public License as
+;;; published by the Free Software Foundation; either version 2 of the
+;;; License, or (at your option) any later version. This library is
+;;; distributed in the hope that it will be useful, but WITHOUT ANY
+;;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;;; License for more details. You should have received a copy of the GNU
+;;; Library General Public License along with this library; if not, write
+;;; to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+;;; USA.
+;;;
+;;; This is bbdb-export.el
+;;;
+
+(defvar bbdb-export-buffer-name "*BBDB* Export"
+ "*Default buffer name for exporting the contents of the *BBDB* buffer.")
+
+
+(defvar bbdb-export-compactly nil
+ "If nil, the exported records are compactly printed.
+Otherwise the exported forms are indented for human-readability (at a
+cost of somewhat longer processing time for exporting records.
+The default value is nil.")
+
+
+(defun bbdb-export ()
+ "Print the selected BBDB entries"
+ (interactive)
+ (save-excursion
+ (let ((to-buffer (get-buffer-create bbdb-export-buffer-name))
+ (records (progn (set-buffer bbdb-buffer-name)
+ bbdb-records))
+ (current-letter ""))
+ ;; wipe to-buffer
+ (switch-to-buffer to-buffer)
+ (delete-region (point-min) (point-max))
+
+ ;; insert header, records, trailer
+ (bexp-buffer-insert-header)
+ (while records
+ (setq current-letter (bexp-do-record (car (car records)) current-letter))
+ (setq records (cdr records)))
+ (bexp-buffer-insert-trailer)
+
+ (goto-char (point-min))
+ (search-forward "(progn")
+ (search-backward "(progn")
+ (indent-sexp)
+ ))
+ (message "BBDB export buffer %s generated." bbdb-export-buffer-name))
+
+
+(defun bexp-do-record (record current-letter)
+ "Insert the bbdb RECORD in export format."
+ (let* ((name (bbdb-record-name record))
+ (comp (bbdb-record-company record))
+ (net (bbdb-record-net record))
+ (phones (bbdb-record-phones record))
+ (addrs (bbdb-record-addresses record))
+ (notes (bbdb-record-raw-notes record))
+ (first-letter (upcase (substring (concat (bbdb-record-sortkey record) "?") 0 1))))
+
+ (if (not (string-equal first-letter current-letter))
+ (progn (message "Now processing \"%s\" entries..." first-letter)
+ (sleep-for 1)))
+ (bexp-buffer-insert-record name comp net addrs phones notes)
+ first-letter))
+
+
+(defun bexp-buffer-insert-header()
+ (insert ";;; ======= Start of Exported BBDB Records =======\n")
+ (insert "(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))))\n\n")
+ (normal-mode))
+
+
+(defun bexp-buffer-insert-trailer()
+ (insert ")\n")
+ (insert ";;; ======= End of Exported BBDB Records =======\n"))
+
+
+(defun bexp-buffer-insert-record (name comp net addrs phones notes)
+ (let ((begin (point))
+ end)
+ (message "Exporting %s" name)
+ (insert (format "(bbdb-maybe-create %s %s '%s '%s '%s '%s)\n"
+ (prin1-to-string (concat name "--IMPORTED"))
+ (prin1-to-string comp)
+ (prin1-to-string net)
+ (prin1-to-string addrs)
+ (prin1-to-string phones)
+ (prin1-to-string notes)
+ ))
+ (setq end (point))
+ (if (not bbdb-export-compactly)
+ (progn
+ ;; format region
+ (narrow-to-region begin end)
+ (goto-char begin)
+ (replace-string " '(" "\n'(")
+ (goto-char begin)
+ (replace-string "\" \"" "\"\n\"")
+ (goto-char begin)
+ (replace-string "((" "(\n(")
+ (goto-char begin)
+ (replace-string "))" ")\n)")
+ (goto-char begin)
+ (replace-string "([" "(\n[")
+ (goto-char begin)
+ (replace-string "])" "]\n)")
+ (goto-char begin)
+ (replace-string ") (" ")\n(")
+ (goto-char begin)
+ (replace-string "] [" "]\n[")
+ (goto-char (point-max))
+ (lisp-indent-region begin (point))
+ (widen)))
+ ))
+
+(provide 'bbdb-export)
diff --git a/bits/bbdb-filters/bbdb-filters-0.2.sh b/bits/bbdb-filters/bbdb-filters-0.2.sh
new file mode 100644
index 0000000..87070d7
--- /dev/null
+++ b/bits/bbdb-filters/bbdb-filters-0.2.sh
@@ -0,0 +1,4418 @@
+#! /bin/sh
+# This is a shell archive. Remove anything before this line, then unpack
+# it by saving it into a file and typing "sh file". To overwrite existing
+# files, type "sh file -c". You can also feed this as standard input via
+# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
+# will see the following message at the end:
+# "End of shell archive."
+# Contents: bbdb-ccmail.el bbdb-eudora.el bbdb-export.el
+# bbdb-hp200lx.el bbdb-ph.el bbdb-passwd.el makefile COPYING.LIB
+# README doc doc/main.texinfo doc/lgpl.tex doc/makefile
+# doc/formatted doc/formatted/bbdb-filters.info
+# Wrapped by mohsen@arash on Tue Aug 8 03:09:07 1995
+PATH=/bin:/usr/bin:/usr/ucb ; export PATH
+if test -f 'bbdb-ccmail.el' -a "${1}" != "-c" ; then
+ echo shar: Will not clobber existing file \"'bbdb-ccmail.el'\"
+else
+echo shar: Extracting \"'bbdb-ccmail.el'\" \(4150 characters\)
+sed "s/^X//" >'bbdb-ccmail.el' <<'END_OF_FILE'
+X;;; This file is part of the BBDB Filters Package. BBDB Filters Package is a
+X;;; collection of input and output filters for BBDB.
+X;;;
+X;;; Copyright (C) 1995 Neda Communications, Inc.
+X;;; Prepared by Mohsen Banan (mohsen@neda.com)
+X;;;
+X;;; This library is free software; you can redistribute it and/or modify
+X;;; it under the terms of the GNU Library General Public License as
+X;;; published by the Free Software Foundation; either version 2 of the
+X;;; License, or (at your option) any later version. This library is
+X;;; distributed in the hope that it will be useful, but WITHOUT ANY
+X;;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+X;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+X;;; License for more details. You should have received a copy of the GNU
+X;;; Library General Public License along with this library; if not, write
+X;;; to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+X;;; USA.
+X;;;
+X;;; This is bbdb-eudora.el
+X;;;
+X;;;
+X;;; RCS: bbdb-ccmail.el,v 1.1.1.1 1995/08/07 08:43:09 mohsen Exp
+X;;;
+X;;; a copy-and-edit job on bbdb-print.el
+X
+X;;; To use this, add the following to your .emacs
+X;;; and strip ";;;XXX"
+X;;;
+X
+X;;;XXX;; BBDB Filters
+X;;;XXX(load "bbdb-ccmail")
+X
+X;;;XXX(setq bbdb-ccmail-filename "~/privdir.ini")
+X;;;XXX;;; And then
+X;;;XXX;;; (bbdb-ccmail-output)
+X
+X;;; TODO
+X;;; Make the postoffice name optional as an argument
+X;;;
+X
+X(require 'bbdb-print)
+X
+X(defvar bbdb-ccmail-filename "~/privdir.ini"
+X "*Default file name for bbdb-output-ccmail printouts of BBDB database.")
+X
+X(defun bbdb-ccmail-output (to-file)
+X "Print the selected BBDB entries"
+X (interactive (list (read-file-name "Print To File: " bbdb-ccmail-filename)))
+X (setq bbdb-ccmail-filename (expand-file-name to-file))
+X (let ((current-letter t)
+X (records (progn (set-buffer bbdb-buffer-name)
+X bbdb-records)))
+X (find-file bbdb-ccmail-filename)
+X (delete-region (point-min) (point-max))
+X (let* ((ccmail-count 0))
+X (while records
+X (setq current-letter
+X (boe-ccmail-format-record (car (car records))
+X current-letter))
+X (setq records (cdr records)))
+X (goto-char (point-min))
+X (insert (format "[smtpgate] \nEntryCount=%d \n" ccmail-count))
+X (goto-char (point-min)))))
+X
+X(defun boe-ccmail-output-this-record-p (name net)
+X "Examine NAME COMP NET PHONES ADDRS NOTES and return t if
+Xthe current record is to be output by bbdb-output-ccmail."
+X ;; if name is non-nil, output it
+X (cond ((and name net) t)
+X (t nil))
+X )
+X
+X
+X(defun boe-ccmail-format-record (record &optional current-letter brief)
+X "Insert the bbdb RECORD in Ccmail format.
+XOptional CURRENT-LETTER is the section we're in -- if this is non-nil and
+Xthe first letter of the sortkey of the record differs from it, a new section
+Xheading will be output \(an arg of t will always produce a heading).
+XThe new current-letter is the return value of this function.
+XSomeday, optional third arg BRIEF will produce one-line format."
+X (bbdb-debug (if (bbdb-record-deleted-p record)
+X (error "plus ungood: tex formatting deleted record")))
+X
+X (let* ((bbdb-elided-display bbdb-print-elide)
+X (first-letter
+X (substring (concat (bbdb-record-sortkey record) "?") 0 1))
+X (name (and (bbdb-field-shown-p 'name)
+X (or (bbdb-record-getprop record 'tex-name)
+X (bbdb-print-tex-quote
+X (bbdb-record-name record)))))
+X (net (and (bbdb-field-shown-p 'net)
+X (bbdb-record-net record)))
+X (begin (point))
+X )
+X
+X (if (and current-letter
+X (not (string-equal first-letter current-letter)))
+X (message "Now processing \"%s\" entries..." (upcase first-letter)))
+X
+X (if (boe-ccmail-output-this-record-p name net)
+X (progn
+X
+X ;; Email address -- just use their first address.
+X ;; Make all dots legal line-breaks.
+X ;;
+X ;; output in the following format: "<Pretty Name>" <email address>
+X (if net
+X (let ((net-addr (car net))
+X (start 0))
+X (setq ccmail-count (+ ccmail-count 1))
+X (insert (format "Entry%d=" ccmail-count))
+X (insert (format "\"%s\" <%s> \n" name net-addr))))
+X (setq current-letter first-letter))
+X )
+X
+X ;; return current letter
+X current-letter))
+X
+END_OF_FILE
+if test 4150 -ne `wc -c <'bbdb-ccmail.el'`; then
+ echo shar: \"'bbdb-ccmail.el'\" unpacked with wrong size!
+fi
+# end of 'bbdb-ccmail.el'
+fi
+if test -f 'bbdb-eudora.el' -a "${1}" != "-c" ; then
+ echo shar: Will not clobber existing file \"'bbdb-eudora.el'\"
+else
+echo shar: Extracting \"'bbdb-eudora.el'\" \(9916 characters\)
+sed "s/^X//" >'bbdb-eudora.el' <<'END_OF_FILE'
+X;;; This file is part of the BBDB Filters Package. BBDB Filters Package is a
+X;;; collection of input and output filters for BBDB.
+X;;;
+X;;; Copyright (C) 1995 Neda Communications, Inc.
+X;;; Prepared by Mohsen Banan (mohsen@neda.com)
+X;;;
+X;;; This library is free software; you can redistribute it and/or modify
+X;;; it under the terms of the GNU Library General Public License as
+X;;; published by the Free Software Foundation; either version 2 of the
+X;;; License, or (at your option) any later version. This library is
+X;;; distributed in the hope that it will be useful, but WITHOUT ANY
+X;;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+X;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+X;;; License for more details. You should have received a copy of the GNU
+X;;; Library General Public License along with this library; if not, write
+X;;; to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+X;;; USA.
+X;;;
+X;;; This is bbdb-eudora.el
+X;;;
+X;;;
+X;;; RCS: bbdb-eudora.el,v 1.1.1.1 1995/08/07 08:43:09 mohsen Exp
+X;;;
+X;;; a copy-and-edit job on bbdb-print.el
+X
+X;;; To use this, add the following to your .emacs
+X;;; and strip ";;;XXX"
+X;;;
+X
+X;;;XXX;; BBDB Filters
+X;;;XXX(load "bbdb-eudora")
+X
+X;;;XXX(setq bbdb-eudora-nndbase-filename
+X;;;XXX (concat "/dos/m/eudora.mai/" (user-login-name) "/nndbase.txt"))
+X;;;XXX;;; And then
+X;;;XXX;; (bbdb-eudora-nndbase-output)
+X
+X;;;XXX(setq bbdb-eudora-rcpdbase-filename
+X;;;XXX (concat "/dos/m/eudora.mai/" (user-login-name) "/rcpdbase.txt"))
+X;;;XXX;;; And then
+X;;;XXX;; (bbdb-eudora-rcpdbase-output)
+X
+X(require 'bbdb-print)
+X(require 'basic-ext)
+X
+X(defvar bbdb-eudora-nndbase-filename "~/nndbase.txt"
+X "*Default file name for bbdb-output-eudora printouts of BBDB database.")
+X
+X(defun bbdb-eudora-nndbase-output (to-file)
+X "Print the selected BBDB entries"
+X (interactive (list (read-file-name "Print To File: " bbdb-eudora-nndbase-filename)))
+X (setq bbdb-eudora-nndbase-filename (expand-file-name to-file))
+X (let ((current-letter t)
+X (records (progn (set-buffer bbdb-buffer-name)
+X bbdb-records)))
+X (find-file bbdb-eudora-nndbase-filename)
+X (delete-region (point-min) (point-max))
+X (while records
+X (setq current-letter
+X (boe-format-record (car (car records)) current-letter))
+X (setq records (cdr records)))
+X (goto-char (point-min))
+X (message "Eudora nickname file %s generated." bbdb-eudora-nndbase-filename)))
+X
+X(defsubst boe-print-if-not-blank (string prepend-string &rest more)
+X "If STRING is not null, then return it with PREPEND-STRING in front and concatenated
+Xwith rest of arguments. If it is null, then all arguments are
+Xignored and the null string is returned."
+X (if (or (null string) (equal "" string))
+X ""
+X (apply 'concat prepend-string string more)))
+X
+X(defun boe-output-this-record-p (name comp net phones addrs notes)
+X "Examine NAME COMP NET PHONES ADDRS NOTES and return t if
+Xthe current record is to be output by bbdb-output-eudora."
+X ;; if name is non-nil, output it
+X (cond ((and name net) t)
+X (t nil))
+X )
+X
+X
+X(defun boe-format-record (record &optional current-letter brief)
+X "Insert the bbdb RECORD in Eudora format.
+XOptional CURRENT-LETTER is the section we're in -- if this is non-nil and
+Xthe first letter of the sortkey of the record differs from it, a new section
+Xheading will be output \(an arg of t will always produce a heading).
+XThe new current-letter is the return value of this function.
+XSomeday, optional third arg BRIEF will produce one-line format."
+X (bbdb-debug (if (bbdb-record-deleted-p record)
+X (error "plus ungood: formatting deleted record")))
+X
+X (let* ((bbdb-elided-display bbdb-print-elide)
+X (first-letter
+X (substring (concat (bbdb-record-sortkey record) "?") 0 1))
+X (name (and (bbdb-field-shown-p 'name)
+X (or (bbdb-record-getprop record 'tex-name)
+X (bbdb-record-name record))))
+X (comp (and (bbdb-field-shown-p 'company)
+X (bbdb-record-company record)))
+X (net (and (bbdb-field-shown-p 'net)
+X (bbdb-record-net record)))
+X (phones (and (bbdb-field-shown-p 'phone)
+X (bbdb-record-phones record)))
+X (addrs (and (bbdb-field-shown-p 'address)
+X (bbdb-record-addresses record)))
+X (notes (bbdb-record-raw-notes record))
+X (begin (point))
+X (bare t))
+X
+X ;; Section header, if neccessary.
+X
+X (if (and current-letter (not (string-equal first-letter current-letter)))
+X (message "Now processing \"%s\" entries..." (upcase first-letter)))
+X
+X (if (boe-output-this-record-p name comp net phones addrs notes)
+X (progn
+X
+X ;; Eudora nickname in canonical form (e.g., mohsen.banan)
+X ;;
+X (if name
+X (insert (format "<%s> \n" name)))
+X
+X ;; Email address -- just use their first address.
+X ;; Make all dots legal line-breaks.
+X ;;
+X ;; output in the following format: "<Pretty Name>" <email address>
+X (if net
+X (let ((net-addr (car net))
+X (start 0))
+X (insert (format ">\"%s\" <%s> \n" name net-addr))))
+X
+X ;; start a Eudora nndbase.txt notes section for this nickname
+X ;; by inserting the nickname again
+X
+X (if name
+X (insert (format "<%s> \n" name)))
+X
+X ;; Company
+X ;;
+X (if comp
+X (insert (format "> Company: %s \n"
+X (boe-mangle-if-multi-line comp))))
+X
+X ;; Phone numbers
+X ;;
+X (while phones
+X (let ((place (aref (car phones) 0))
+X (number (bbdb-phone-string (car phones))))
+X (setq bare nil)
+X (insert (format "> Telephone: %s%s \n"
+X (boe-print-if-not-blank place "" ": ")
+X number))
+X (setq phones (cdr phones))))
+X
+X ;; Addresses
+X ;;
+X (while addrs
+X (let ((addr (car addrs)))
+X (setq bare nil)
+X (insert
+X (format
+X "> Address: \n%s"
+X (concat
+X (boe-print-if-not-blank (bbdb-address-street1 addr) "> " " \n")
+X (boe-print-if-not-blank (bbdb-address-street2 addr) "> " " \n")
+X (boe-print-if-not-blank (bbdb-address-street3 addr) "> ")
+X (boe-print-if-not-blank (bbdb-address-city addr) "> ")
+X (if (and (not (equal "" (bbdb-address-city addr)))
+X (not (equal "" (bbdb-address-state addr))))
+X ", ")
+X (boe-print-if-not-blank (bbdb-address-state addr) "" " ")
+X (boe-print-if-not-blank (bbdb-address-zip-string addr) "" " \n")))))
+X (setq addrs (cdr addrs)))
+X
+X ;; BBDB Notes
+X
+X (if (stringp notes)
+X (setq notes (list (cons 'notes notes))))
+X (while notes
+X (let ((thisnote (car notes)))
+X (if (bbdb-field-shown-p (car thisnote))
+X (progn
+X (setq bare nil)
+X (if (eq 'notes (car thisnote))
+X (insert (format "> Notes: %s \n"
+X (boe-mangle-if-multi-line (cdr thisnote))))
+X (insert (format "> Note [%s]: %s \n"
+X (symbol-name (car thisnote))
+X (boe-mangle-if-multi-line (cdr thisnote))))))))
+X (setq notes (cdr notes)))
+X
+X ;; If record is bare, delete anything we may have inserted.
+X ;; otherwise, mark the end of this record.
+X
+X (if bare
+X (delete-region begin (point))
+X
+X (setq current-letter first-letter))
+X
+X ))
+X
+X ;; return current letter
+X current-letter))
+X
+X
+X(defun boe-mangle-if-multi-line (string)
+X "If STRING is has multiple lines, mangle it for output to Eudora"
+X (if (string-match "\n" string)
+X (string-replace-regexp string "\n" " \n> ")
+X string))
+X
+X
+X;;;;;;;;;;;; Eudora Receipient DataBase (rcpdbase.txt) ;;;;;;;;;;;
+X
+X;;;(setq bbdb-eudora-rcpdbase-filename "/dos/m/eudora.mai/mohsen/rcpdbase.txt")
+X(defvar bbdb-eudora-rcpdbase-filename "~/rcpdbase.txt"
+X "*Default file name for bbdb-output-eudora printouts of BBDB database.")
+X
+X(defun bbdb-eudora-rcpdbase-output (to-file)
+X "Print the selected BBDB entries"
+X (interactive (list (read-file-name "Print To File: " bbdb-eudora-rcpdbase-filename)))
+X (setq bbdb-eudora-rcpdbase-filename (expand-file-name to-file))
+X (let ((current-letter t)
+X (records (progn (set-buffer bbdb-buffer-name)
+X bbdb-records)))
+X (find-file bbdb-eudora-rcpdbase-filename)
+X (delete-region (point-min) (point-max))
+X (while records
+X (setq current-letter
+X (boe-rcpdbase-format-record (car (car records)) current-letter))
+X (setq records (cdr records)))
+X (goto-char (point-min))
+X (message "Eudora rcpt. file %s generated." bbdb-eudora-nndbase-filename)))
+X
+X
+X
+X(defun boe-rcpdbase-format-record (record &optional current-letter brief)
+X "Insert the bbdb RECORD in Eudora format.
+XOptional CURRENT-LETTER is the section we're in -- if this is non-nil and
+Xthe first letter of the sortkey of the record differs from it, a new section
+Xheading will be output \(an arg of t will always produce a heading).
+XThe new current-letter is the return value of this function.
+XSomeday, optional third arg BRIEF will produce one-line format."
+X (bbdb-debug (if (bbdb-record-deleted-p record)
+X (error "plus ungood: formatting deleted record")))
+X
+X (let* ((bbdb-elided-display bbdb-print-elide)
+X (first-letter
+X (substring (concat (bbdb-record-sortkey record) "?") 0 1))
+X (name (and (bbdb-field-shown-p 'name)
+X (or (bbdb-record-getprop record 'tex-name)
+X (bbdb-record-name record))))
+X (comp (and (bbdb-field-shown-p 'company)
+X (bbdb-record-company record)))
+X (net (and (bbdb-field-shown-p 'net)
+X (bbdb-record-net record)))
+X (phones (and (bbdb-field-shown-p 'phone)
+X (bbdb-record-phones record)))
+X (addrs (and (bbdb-field-shown-p 'address)
+X (bbdb-record-addresses record)))
+X (notes (bbdb-record-raw-notes record))
+X (begin (point))
+X (bare t))
+X
+X ;; Section header, if neccessary.
+X
+X (if (and current-letter
+X (not (string-equal first-letter current-letter)))
+X (message "Now processing \"%s\" entries..." (upcase first-letter)))
+X
+X (if (boe-output-this-record-p name comp net phones addrs notes)
+X (progn
+X
+X ;; Eudora nickname in canonical form (e.g., mohsen.banan)
+X ;;
+X (if name
+X (insert (format "%s \n" name)))
+X
+X (setq current-letter first-letter)
+X
+X ))
+X
+X ;; return current letter
+X current-letter))
+END_OF_FILE
+if test 9916 -ne `wc -c <'bbdb-eudora.el'`; then
+ echo shar: \"'bbdb-eudora.el'\" unpacked with wrong size!
+fi
+# end of 'bbdb-eudora.el'
+fi
+if test -f 'bbdb-export.el' -a "${1}" != "-c" ; then
+ echo shar: Will not clobber existing file \"'bbdb-export.el'\"
+else
+echo shar: Extracting \"'bbdb-export.el'\" \(4676 characters\)
+sed "s/^X//" >'bbdb-export.el' <<'END_OF_FILE'
+X;;; This file is part of the BBDB Filters Package. BBDB Filters Package is a
+X;;; collection of input and output filters for BBDB.
+X;;;
+X;;; Copyright (C) 1995 Neda Communications, Inc.
+X;;; Prepared by Mohsen Banan (mohsen@neda.com)
+X;;;
+X;;; This library is free software; you can redistribute it and/or modify
+X;;; it under the terms of the GNU Library General Public License as
+X;;; published by the Free Software Foundation; either version 2 of the
+X;;; License, or (at your option) any later version. This library is
+X;;; distributed in the hope that it will be useful, but WITHOUT ANY
+X;;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+X;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+X;;; License for more details. You should have received a copy of the GNU
+X;;; Library General Public License along with this library; if not, write
+X;;; to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+X;;; USA.
+X;;;
+X;;; This is bbdb-export.el
+X;;;
+X
+X(defvar bbdb-export-buffer-name "*BBDB* Export"
+X "*Default buffer name for exporting the contents of the *BBDB* buffer.")
+X
+X
+X(defvar bbdb-export-compactly nil
+X "If nil, the exported records are compactly printed.
+XOtherwise the exported forms are indented for human-readability (at a
+Xcost of somewhat longer processing time for exporting records.
+XThe default value is nil.")
+X
+X
+X(defun bbdb-export ()
+X "Print the selected BBDB entries"
+X (interactive)
+X (save-excursion
+X (let ((to-buffer (get-buffer-create bbdb-export-buffer-name))
+X (records (progn (set-buffer bbdb-buffer-name)
+X bbdb-records))
+X (current-letter ""))
+X ;; wipe to-buffer
+X (switch-to-buffer to-buffer)
+X (delete-region (point-min) (point-max))
+X
+X ;; insert header, records, trailer
+X (bexp-buffer-insert-header)
+X (while records
+X (setq current-letter (bexp-do-record (car (car records)) current-letter))
+X (setq records (cdr records)))
+X (bexp-buffer-insert-trailer)
+X
+X (goto-char (point-min))
+X (search-forward "(progn")
+X (search-backward "(progn")
+X (indent-sexp)
+X ))
+X (message "BBDB export buffer %s generated." bbdb-export-buffer-name))
+X
+X
+X(defun bexp-do-record (record current-letter)
+X "Insert the bbdb RECORD in export format."
+X (let* ((name (bbdb-record-name record))
+X (comp (bbdb-record-company record))
+X (net (bbdb-record-net record))
+X (phones (bbdb-record-phones record))
+X (addrs (bbdb-record-addresses record))
+X (notes (bbdb-record-raw-notes record))
+X (first-letter (upcase (substring (concat (bbdb-record-sortkey record) "?") 0 1))))
+X
+X (if (not (string-equal first-letter current-letter))
+X (progn (message "Now processing \"%s\" entries..." first-letter)
+X (sleep-for 1)))
+X (bexp-buffer-insert-record name comp net addrs phones notes)
+X first-letter))
+X
+X
+X(defun bexp-buffer-insert-header()
+X (insert ";;; ======= Start of Exported BBDB Records =======\n")
+X (insert "(progn
+X(require 'bbdb-com)
+X(defun bbdb-maybe-create (name company net &optional addrs phones notes)
+X \"Try to add a record to BBDB if it does not already exist.\"
+X (condition-case err
+X (progn
+X (bbdb-create-internal name company net addrs phones notes)
+X (message \"%s %s added.\" name (if net (concat \"<\" net \">\") \"\"))
+X (sleep-for 1))
+X (error (ding)
+X (message \"%s %s skipped. (%s)\"
+X name
+X (if net (concat \"<\" net \">\") \"\")
+X (car (cdr err)))
+X (sleep-for 1))))\n\n")
+X (normal-mode))
+X
+X
+X(defun bexp-buffer-insert-trailer()
+X (insert ")\n")
+X (insert ";;; ======= End of Exported BBDB Records =======\n"))
+X
+X
+X(defun bexp-buffer-insert-record (name comp net addrs phones notes)
+X (let ((begin (point))
+X end)
+X (message "Exporting %s" name)
+X (insert (format "(bbdb-maybe-create %s %s '%s '%s '%s '%s)\n"
+X (prin1-to-string (concat name "--IMPORTED"))
+X (prin1-to-string comp)
+X (prin1-to-string net)
+X (prin1-to-string addrs)
+X (prin1-to-string phones)
+X (prin1-to-string notes)
+X ))
+X (setq end (point))
+X (if (not bbdb-export-compactly)
+X (progn
+X ;; format region
+X (narrow-to-region begin end)
+X (goto-char begin)
+X (replace-string " '(" "\n'(")
+X (goto-char begin)
+X (replace-string "\" \"" "\"\n\"")
+X (goto-char begin)
+X (replace-string "((" "(\n(")
+X (goto-char begin)
+X (replace-string "))" ")\n)")
+X (goto-char begin)
+X (replace-string "([" "(\n[")
+X (goto-char begin)
+X (replace-string "])" "]\n)")
+X (goto-char begin)
+X (replace-string ") (" ")\n(")
+X (goto-char begin)
+X (replace-string "] [" "]\n[")
+X (goto-char (point-max))
+X (lisp-indent-region begin (point))
+X (widen)))
+X ))
+X
+X(provide 'bbdb-export)
+END_OF_FILE
+if test 4676 -ne `wc -c <'bbdb-export.el'`; then
+ echo shar: \"'bbdb-export.el'\" unpacked with wrong size!
+fi
+# end of 'bbdb-export.el'
+fi
+if test -f 'bbdb-hp200lx.el' -a "${1}" != "-c" ; then
+ echo shar: Will not clobber existing file \"'bbdb-hp200lx.el'\"
+else
+echo shar: Extracting \"'bbdb-hp200lx.el'\" \(10757 characters\)
+sed "s/^X//" >'bbdb-hp200lx.el' <<'END_OF_FILE'
+X;;; This file is part of the BBDB Filters Package. BBDB Filters Package is a
+X;;; collection of input and output filters for BBDB.
+X;;;
+X;;; Copyright (C) 1995 Neda Communications, Inc.
+X;;; Prepared by Mohsen Banan (mohsen@neda.com)
+X;;;
+X;;; This library is free software; you can redistribute it and/or modify
+X;;; it under the terms of the GNU Library General Public License as
+X;;; published by the Free Software Foundation; either version 2 of the
+X;;; License, or (at your option) any later version. This library is
+X;;; distributed in the hope that it will be useful, but WITHOUT ANY
+X;;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+X;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+X;;; License for more details. You should have received a copy of the GNU
+X;;; Library General Public License along with this library; if not, write
+X;;; to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+X;;; USA.
+X;;;
+X;;; This is bbdb-hp200lx.el
+X;;;
+X;;;
+X;;; RCS: bbdb-hp200lx.el,v 1.1.1.1 1995/08/07 08:43:09 mohsen Exp
+X;;;
+X;;; a copy-and-edit job on bbdb-print.el
+X
+X
+X;;; To use this, add the following to your .emacs
+X;;; and strip ";;;XXX"
+X;;;
+X
+X;;;XXX;; BBDB HP200LX Filter
+X;;;XXX(load "bbdb-hp200lx")
+X
+X;;;XXX(setq bbdb-hp200lx-filename
+X;;;XXX (concat "/dos/u/" (user-login-name) "/bb-phone.cdf"))
+X;;;XXX;;; - to output the *BBDB* buffer in HP200LX comma-delimited-file (.CDF)
+X;;;XXX;;; format, invoke M-x bbdb-hp200lx-output
+X;;;XXX;;;
+X;;;XXX;;; - you may also want to modify default values of the following (use
+X;;;XXX;;; M-x describe-variable for details):
+X;;;XXX;;; bbdb-hp200lx-output-elide
+X;;;XXX;;; bbdb-hp200lx-output-requires
+X;;;XXX;;; bbdb-hp200lx-output-no-bare-names
+X
+X
+X(require 'bbdb-print)
+X(require 'basic-ext)
+X
+X
+X(defvar bbdb-hp200lx-filename "~/bb-phone.cdf"
+X "*Default file name for bbdb-output-hp200lx printouts of BBDB database.")
+X
+X
+X(defvar bbdb-hp200lx-output-elide '(net creation-date timestamp mail-alias)
+X "*List of symbols denoting BBDB fields NOT to be output.
+XValid symbols are: name comp net phones addrs. You can also use the
+Xtags for notes (e.g., creation-date).
+X e.g.: '(net creation-date)
+XSee also variable bbdb-hp200lx-output-requires.")
+X
+X
+X(defvar bbdb-hp200lx-output-requires '(or name comp)
+X "*A boolean expression of 'and' and 'or' to be evaluated to determine if
+Xthe current record should be output. Valid symbols for use
+Xin the boolean expression are: name comp net phones addrs notes.
+X e.g.: (and name (or comp addrs))
+XSee also variable bbdb-hp200lx-output-elide.
+X")
+X
+X
+X(defvar bbdb-hp200lx-output-no-bare-names t
+X "*A bare name is one with no information other than
+Xthat in bbdb-hp200lx-output-requires. To avoid printing
+Xthese set this variable to t")
+X
+X
+X(defun bbdb-hp200lx-output (to-file)
+X "Print the selected BBDB entries"
+X (interactive (list (read-file-name "Print To File: " bbdb-hp200lx-filename)))
+X (setq bbdb-hp200lx-filename (expand-file-name to-file))
+X (let ((current-letter t)
+X (records (progn (set-buffer bbdb-buffer-name)
+X bbdb-records)))
+X (find-file bbdb-hp200lx-filename)
+X (delete-region (point-min) (point-max))
+X (while records
+X (setq current-letter
+X (boh-maybe-format-record (car (car records)) current-letter))
+X (setq records (cdr records)))
+X (goto-char (point-min))
+X (message "HP 200LX comma-delimited phonebook file %s generated." bbdb-hp200lx-filename)))
+X
+X
+X(defun boh-maybe-format-record (record &optional current-letter brief)
+X "Insert the bbdb RECORD in Hp200lx format.
+XOptional CURRENT-LETTER is the section we're in -- if this is non-nil and
+Xthe first letter of the sortkey of the record differs from it, a new section
+Xheading will be output \(an arg of t will always produce a heading).
+XThe new current-letter is the return value of this function.
+XSomeday, optional third arg BRIEF will produce one-line format."
+X (bbdb-debug (if (bbdb-record-deleted-p record)
+X (error "plus ungood: formatting deleted record")))
+X
+X
+X (let* ((bbdb-elided-display bbdb-hp200lx-output-elide)
+X (first-letter
+X (substring (concat (bbdb-record-sortkey record) "?") 0 1))
+X (name (and (bbdb-field-shown-p 'name)
+X (or (bbdb-record-getprop record 'tex-name)
+X (bbdb-record-name record))))
+X (comp (and (bbdb-field-shown-p 'company)
+X (bbdb-record-company record)))
+X (net (and (bbdb-field-shown-p 'net)
+X (bbdb-record-net record)))
+X (phones (and (bbdb-field-shown-p 'phone)
+X (bbdb-record-phones record)))
+X (addrs (and (bbdb-field-shown-p 'address)
+X (bbdb-record-addresses record)))
+X (notes (bbdb-record-raw-notes record))
+X (begin (point))
+X (bare t))
+X
+X
+X ;; Section header, if neccessary.
+X
+X
+X (if (and current-letter (not (string-equal first-letter current-letter)))
+X (message "Now processing \"%s\" entries..." (upcase first-letter)))
+X
+X
+X (if (eval bbdb-hp200lx-output-requires)
+X (let (more-phones)
+X
+X
+X ;; HP 200LX last name field (maxlen 86 ??) -- used for BBDB name
+X ;;
+X (insert (format "\"%s\"," (boh-maybe-truncate name 86)))
+X
+X
+X ;; HP 200LX first name field (maxlen ??) -- unused
+X (insert ",")
+X
+X
+X ;; HP 200LX middle name field (maxlen ??) -- unused
+X ;;
+X (insert ",")
+X
+X
+X ;; Phone numbers
+X ;;
+X (let (business-phone home-phone fax-phone saved-case-fold)
+X (setq saved-case-fold case-fold-search
+X case-fold-search t)
+X (while phones
+X (let ((place (aref (car phones) 0))
+X (number (bbdb-phone-string (car phones))))
+X (cond ((or (string-match place "office")
+X (string-match place "work"))
+X (if (null business-phone)
+X (setq business-phone (list place number))
+X (setq more-phones (cons (list place number) more-phones))))
+X ((string-match place "home")
+X (if (null home-phone)
+X (setq home-phone (list place number))
+X (setq more-phones (cons (list place number) more-phones))))
+X ((or (string-match place "fax")
+X (string-match place "facsimile"))
+X (if (null fax-phone)
+X (setq fax-phone (list place number))
+X (setq more-phones (cons (list place number) more-phones))))
+X (t
+X (setq more-phones (cons (list place number) more-phones)))))
+X (setq phones (cdr phones)))
+X
+X
+X (setq case-fold-search saved-case-fold)
+X
+X
+X ;; HP 200LX business phone field (maxlen 29)
+X (if business-phone
+X (progn
+X (insert (format "\"%s\"," (boh-maybe-truncate
+X (format "%s" (car (cdr business-phone)))
+X 29)))
+X (setq bare nil))
+X (insert ","))
+X
+X
+X ;; HP 200LX home phone field (maxlen 29)
+X (if home-phone
+X (progn
+X (insert (format "\"%s\"," (boh-maybe-truncate
+X (format "%s" (car (cdr home-phone)))
+X 29)))
+X (setq bare nil))
+X (insert ","))
+X
+X
+X ;; HP 200LX alternate phone field (maxlen 29) -- unused
+X (insert ",")
+X
+X
+X ;; HP 200LX fax phone field (maxlen 29)
+X (if fax-phone
+X (progn
+X (insert (format "\"%s\"," (boh-maybe-truncate
+X (format "%s" (car (cdr fax-phone))) ; the description
+X 29)))
+X (setq bare nil))
+X (insert ","))
+X )
+X
+X
+X ;; HP 200LX title field (maxlen 38) -- unused
+X (insert ",")
+X
+X
+X ;; HP 200LX category field (maxlen 127) -- unused
+X (insert ",")
+X
+X
+X ;; HP 200LX company field (maxlen 82) -- used for BBDB company
+X (if comp
+X (insert (format "\"%s\"," (boh-maybe-truncate comp 82)))
+X (insert ","))
+X
+X
+X ;; Addresses
+X ;;
+X (let ((addr (car addrs)) ;just take the first bbdb address
+X hp-addr1 hp-addr2 hp-city hp-state hp-zip)
+X
+X (if addr
+X (progn
+X (setq hp-addr1 (bbdb-address-street1 addr))
+X (setq hp-addr2 (concat (bbdb-address-street2 addr)
+X (if (and (> (length (bbdb-address-street2 addr)) 0)
+X (> (length (bbdb-address-street3 addr)) 0))
+X ", " "")
+X (bbdb-address-street3 addr)))
+X (setq hp-city (bbdb-address-city addr))
+X (setq hp-state (bbdb-address-state addr))
+X (setq hp-zip (bbdb-address-zip-string addr))))
+X
+X ;; HP 200LX address 1 field (maxlen 82)
+X (if hp-addr1
+X (progn
+X (insert (format "\"%s\"," (boh-maybe-truncate hp-addr1 82)))
+X (setq bare nil))
+X (insert ","))
+X
+X ;; HP 200LX address 2 field (maxlen 82)
+X (if hp-addr2
+X (progn
+X (insert (format "\"%s\"," (boh-maybe-truncate hp-addr2 82)))
+X (setq bare nil))
+X (insert ","))
+X
+X ;; HP 200LX city field (maxlen 34)
+X (if hp-city
+X (progn
+X (insert (format "\"%s\"," (boh-maybe-truncate hp-city 34)))
+X (setq bare nil))
+X (insert ","))
+X
+X ;; HP 200LX state field (maxlen 39)
+X (if hp-state
+X (progn
+X (insert (format "\"%s\"," (boh-maybe-truncate hp-state 39)))
+X (setq bare nil))
+X (insert ","))
+X
+X ;; HP 200LX zip field (maxlen 16)
+X (if hp-zip
+X (progn
+X (insert (format "\"%s\"," (boh-maybe-truncate hp-zip 16)))
+X (setq bare nil))
+X (insert ","))
+X )
+X
+X ;; BBDB Notes
+X
+X (let (hp-note)
+X (save-excursion
+X (set-buffer (get-buffer-create " *boh-scratch*"))
+X (kill-region (point-min) (point-max))
+X
+X (while more-phones
+X (insert (format "%s: %s\t"
+X (car (car more-phones)) ; the tag
+X (car (cdr (car more-phones)))) ; the number
+X )
+X (setq bare nil)
+X (setq more-phones (cdr more-phones)))
+X
+X ;; output BBDB email-addresses
+X (while net
+X (insert (format "%s\t" (car net)))
+X (setq bare nil)
+X (setq net (cdr net)))
+X
+X (if (stringp notes)
+X (setq notes (list (cons 'notes notes))))
+X
+X (while notes
+X (let ((thisnote (car notes)))
+X (if (bbdb-field-shown-p (car thisnote))
+X (progn
+X (setq bare nil)
+X (if (eq 'notes (car thisnote))
+X (insert (format "Notes: %s\t" (boh-mangle-if-multi-line (cdr thisnote))))
+X (insert (format "Note [%s]: %s\t"
+X (symbol-name (car thisnote))
+X (boh-mangle-if-multi-line (cdr thisnote))))))))
+X (setq notes (cdr notes)))
+X
+X (setq hp-note (buffer-string)))
+X
+X ;; HP 200LX notes field (32K for the entire record)
+X (if (> (length hp-note) 0)
+X (progn
+X (insert (format "\"%s\"" hp-note))
+X (setq bare nil)))
+X )
+X
+X ;; If record is bare, delete anything we may have inserted.
+X ;; otherwise, mark the end of this record.
+X (if (and bare bbdb-hp200lx-output-no-bare-names)
+X (delete-region begin (point))
+X (insert " \n")) ; HP 200LX end of record
+X ))
+X
+X ;; return current letter
+X current-letter))
+X
+X
+X(defun boh-maybe-truncate (string maxlen)
+X "If STRING is longer than MAXLEN, returns a truncated version."
+X (if (> (length string) maxlen)
+X (substring string 0 maxlen)
+X string))
+X
+X
+X(defun boh-mangle-if-multi-line (string)
+X "If STRING is has multiple lines, mangle it for output to HP200LX"
+X (if (string-match "\n" string)
+X (string-replace-regexp string "\n" "\t") ; tabs are used to denote new lines in the .cdf file
+X string))
+END_OF_FILE
+if test 10757 -ne `wc -c <'bbdb-hp200lx.el'`; then
+ echo shar: \"'bbdb-hp200lx.el'\" unpacked with wrong size!
+fi
+# end of 'bbdb-hp200lx.el'
+fi
+if test -f 'bbdb-ph.el' -a "${1}" != "-c" ; then
+ echo shar: Will not clobber existing file \"'bbdb-ph.el'\"
+else
+echo shar: Extracting \"'bbdb-ph.el'\" \(8467 characters\)
+sed "s/^X//" >'bbdb-ph.el' <<'END_OF_FILE'
+X;;; This file is part of the BBDB Filters Package. BBDB Filters Package is a
+X;;; collection of input and output filters for BBDB.
+X;;;
+X;;; Copyright (C) 1995 Neda Communications, Inc.
+X;;; Prepared by Mohsen Banan (mohsen@neda.com)
+X;;;
+X;;; This library is free software; you can redistribute it and/or modify
+X;;; it under the terms of the GNU Library General Public License as
+X;;; published by the Free Software Foundation; either version 2 of the
+X;;; License, or (at your option) any later version. This library is
+X;;; distributed in the hope that it will be useful, but WITHOUT ANY
+X;;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+X;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+X;;; License for more details. You should have received a copy of the GNU
+X;;; Library General Public License along with this library; if not, write
+X;;; to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+X;;; USA.
+X;;;
+X;;; This is bbdb-ph.el
+X;;;
+X;;;
+X;;; RCS: bbdb-ph.el,v 1.1.1.1 1995/08/07 08:43:08 mohsen Exp
+X;;;
+X;;; a copy-and-edit job on bbdb-print.el
+X
+X
+X;;; To use this, add the following to your .emacs
+X;;; and strip ";;;XXX"
+X;;;
+X
+X;;;XXX;; BBDB PH Filter
+X;;;XXX(load "bbdb-ph")
+X
+X;;;XXX(setq bbdb-ph-filename
+X;;;XXX (concat "/dos/u/" (user-login-name) "/bb-phone.cdf"))
+X;;;XXX;;; - to output the *BBDB* buffer in PH tab-delimited-file (.CDF)
+X;;;XXX;;; format, invoke M-x bbdb-ph-output
+X;;;XXX;;;
+X;;;XXX;;; - you may also want to modify default values of the following (use
+X;;;XXX;;; M-x describe-variable for details):
+X;;;XXX;;; bbdb-ph-output-elide
+X;;;XXX;;; bbdb-ph-output-requires
+X;;;XXX;;; bbdb-ph-output-no-bare-names
+X
+X
+X(require 'bbdb-print)
+X(require 'basic-ext)
+X
+X
+X(defvar bbdb-ph-filename "~/data.out"
+X "*Default file name for bbdb-output-ph printouts of BBDB database.")
+X
+X
+X(defvar bbdb-ph-output-elide '(creation-date timestamp mail-alias)
+X "*List of symbols denoting BBDB fields NOT to be output.
+XValid symbols are: name comp net phones addrs. You can also use the
+Xtags for notes (e.g., creation-date).
+X e.g.: '(net creation-date)
+XSee also variable bbdb-ph-output-requires.")
+X
+X
+X(defvar bbdb-ph-output-requires '(and name net)
+X "*A boolean expression of 'and' and 'or' to be evaluated to determine if
+Xthe current record should be output. Valid symbols for use
+Xin the boolean expression are: name comp net phones addrs notes.
+X e.g.: (and name (or comp addrs))
+XSee also variable bbdb-ph-output-elide.
+X")
+X
+X
+X(defvar bbdb-ph-output-no-bare-names t
+X "*A bare name is one with no information other than
+Xthat in bbdb-ph-output-requires. To avoid printing
+Xthese set this variable to t")
+X
+X
+X(defun bbdb-ph-output (to-file)
+X "Print the selected BBDB entries"
+X (interactive (list (read-file-name "Print To File: " bbdb-ph-filename)))
+X (setq bbdb-ph-filename (expand-file-name to-file))
+X (let ((current-letter t)
+X (records (progn (set-buffer bbdb-buffer-name)
+X bbdb-records)))
+X (find-file bbdb-ph-filename)
+X (delete-region (point-min) (point-max))
+X (while records
+X (setq current-letter
+X (boph-maybe-format-record (car (car records)) current-letter))
+X (setq records (cdr records)))
+X (goto-char (point-min))
+X (message "PH tag and tab-delimited file %s generated." bbdb-ph-filename)))
+X
+X
+X(defun boph-maybe-format-record (record &optional current-letter brief)
+X "Insert the bbdb RECORD in Ph format.
+XOptional CURRENT-LETTER is the section we're in -- if this is non-nil and
+Xthe first letter of the sortkey of the record differs from it, a new section
+Xheading will be output \(an arg of t will always produce a heading).
+XThe new current-letter is the return value of this function.
+XSomeday, optional third arg BRIEF will produce one-line format."
+X (bbdb-debug (if (bbdb-record-deleted-p record)
+X (error "plus ungood: formatting deleted record")))
+X
+X (let* ((bbdb-elided-display bbdb-ph-output-elide)
+X (first-letter
+X (substring (concat (bbdb-record-sortkey record) "?") 0 1))
+X (name (and (bbdb-field-shown-p 'name)
+X (or (bbdb-record-getprop record 'tex-name)
+X (bbdb-record-name record))))
+X (comp (and (bbdb-field-shown-p 'company)
+X (bbdb-record-company record)))
+X (net (and (bbdb-field-shown-p 'net)
+X (bbdb-record-net record)))
+X (phones (and (bbdb-field-shown-p 'phone)
+X (bbdb-record-phones record)))
+X (addrs (and (bbdb-field-shown-p 'address)
+X (bbdb-record-addresses record)))
+X (notes (bbdb-record-raw-notes record))
+X (begin (point))
+X (bare t)
+X ph-name ph-email ph-office-phone ph-skypager ph-portable
+X ph-title-notes-part
+X saved-case-fold)
+X
+X
+X ;; Section header, if neccessary.
+X
+X (if (and current-letter (not (string-equal first-letter current-letter)))
+X (message "Now processing \"%s\" entries..." (upcase first-letter)))
+X
+X
+X (if (eval bbdb-ph-output-requires)
+X (progn
+X
+X ;; =============================================================
+X ;; grovel through BBDB record collecting ph-relevant information
+X ;; =============================================================
+X
+X ;; grovel through name
+X ;;
+X (setq ph-name name)
+X
+X ;; grovel through phone numbers
+X ;;
+X (progn
+X (setq saved-case-fold case-fold-search
+X case-fold-search t)
+X (while phones
+X (let ((place (aref (car phones) 0))
+X (number (bbdb-phone-string (car phones))))
+X (cond ((or (string-match place "office")
+X (string-match place "work"))
+X (if (null ph-office-phone)
+X (setq ph-office-phone number)))
+X ((or (string-match place "mobile")
+X (string-match place "cellular"))
+X (if (null ph-portable)
+X (setq ph-portable number)))
+X (t nil)))
+X (setq phones (cdr phones)))
+X
+X
+X (setq case-fold-search saved-case-fold)
+X )
+X
+X ;; grovel through BBDB email-addresses
+X ;;
+X (if net
+X (setq ph-email (car net)))
+X
+X ;; grovel through BBDB Notes
+X ;;
+X (progn
+X
+X (if (stringp notes)
+X (setq notes (list (cons 'notes notes))))
+X
+X (while notes
+X (let ((curr-note (car notes)))
+X (if (bbdb-field-shown-p (car curr-note))
+X (cond ((member (car curr-note) '(skypage pager))
+X (setq ph-skypager (boph-mangle-if-multi-line (cdr curr-note))))
+X ((equal (car curr-note) 'mobile)
+X (setq ph-portable (boph-mangle-if-multi-line (cdr curr-note))))
+X ((equal (car curr-note) 'notes)
+X (setq ph-title-notes-part (boph-mangle-if-multi-line (cdr curr-note))))
+X (t nil))
+X ))
+X (setq notes (cdr notes)))
+X )
+X
+X ;; grovel through comp
+X ;;
+X (setq ph-title-coname-part comp)
+X (setq ph-title (concat (or ph-title-coname-part "")
+X (if (and ph-title-coname-part ph-title-notes-part) " " "")
+X (if ph-title-notes-part (concat "[" ph-title-notes-part "]") "")))
+X
+X ;; ====================
+X ;; now output PH record
+X ;; ====================
+X
+X ;; PH 'name' field (maxlen 256)
+X ;;
+X (insert (format "3:%s\t" (boph-maybe-truncate (or name "") 256)))
+X
+X ;; PH 'email' field (maxlen 25) (should be 128?) ** NOT YET **
+X (if ph-email (setq bare nil))
+X (insert (format "2:%s\t" (boph-maybe-truncate (or ph-email "") 25)))
+X
+X ;; PH 'office_phone' field (max len 60)
+X ;;
+X (if ph-office-phone (setq bare nil))
+X (insert (format "32:%s\t" (boph-maybe-truncate (or ph-office-phone "") 60)))
+X
+X ;; PH 'title' field (maxlen 120)
+X (insert (format "98:%s\t" (boph-maybe-truncate ph-title 120)))
+X
+X ;; PH 'portable' field (maxlen 60)
+X (if ph-portable (setq bare nil))
+X (insert (format "97:%s\t" (boph-maybe-truncate (or ph-portable "") 60)))
+X
+X ;; PH 'skypager' field (maxlen 64)
+X (if ph-skypager (setq bare nil))
+X (insert (format "27:%s\t" (boph-maybe-truncate (or ph-skypager "") 64)))
+X
+X ;; ==========
+X ;; bare check
+X ;; ==========
+X
+X ;; If record is bare, delete anything we may have inserted.
+X ;; otherwise, mark the end of this record.
+X (if (and bare bbdb-ph-output-no-bare-names)
+X (delete-region begin (point))
+X (insert "\n")) ; PH end of record
+X ))
+X
+X ;; return current letter
+X current-letter))
+X
+X
+X(defun boph-maybe-truncate (string maxlen)
+X "If STRING is longer than MAXLEN, returns a truncated version."
+X (if (> (length string) maxlen)
+X (substring string 0 maxlen)
+X string))
+X
+X
+X(defun boph-mangle-if-multi-line (string)
+X "If STRING is has multiple lines, mangle it for output to PH"
+X (if (string-match "\n" string)
+X (string-replace-regexp string "\n" "\t") ; tabs are used to denote new lines in the .cdf file
+X string))
+END_OF_FILE
+if test 8467 -ne `wc -c <'bbdb-ph.el'`; then
+ echo shar: \"'bbdb-ph.el'\" unpacked with wrong size!
+fi
+# end of 'bbdb-ph.el'
+fi
+if test -f 'bbdb-passwd.el' -a "${1}" != "-c" ; then
+ echo shar: Will not clobber existing file \"'bbdb-passwd.el'\"
+else
+echo shar: Extracting \"'bbdb-passwd.el'\" \(6613 characters\)
+sed "s/^X//" >'bbdb-passwd.el' <<'END_OF_FILE'
+X;;; This file is part of the BBDB Filters Package. BBDB Filters Package is a
+X;;; collection of input and output filters for BBDB.
+X;;;
+X;;; Copyright (C) 1995 Neda Communications, Inc.
+X;;; Prepared by Mohsen Banan (mohsen@neda.com)
+X;;;
+X;;; This library is free software; you can redistribute it and/or modify
+X;;; it under the terms of the GNU Library General Public License as
+X;;; published by the Free Software Foundation; either version 2 of the
+X;;; License, or (at your option) any later version. This library is
+X;;; distributed in the hope that it will be useful, but WITHOUT ANY
+X;;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+X;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+X;;; License for more details. You should have received a copy of the GNU
+X;;; Library General Public License along with this library; if not, write
+X;;; to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+X;;; USA.
+X
+X;;; This is bbdb-passwd.el
+X
+X;;; This file is a bbdb filter. It converts passwd files to the
+X;;; canonical bbdb input filter format (i.e., a file of
+X;;; bif-create-record expressions
+X
+X
+X(defvar bpf-default-bif-file "~/passwd-bif.el"
+X "*Default file name for bbdb-passwd-input.")
+X
+X
+X(defvar bpf-default-domain-name (if (boundp '*eoe-site-name*) *eoe-site-name*)
+X "*Default domain name for bbdb-passwd-input.")
+X
+X
+X(defvar bpf-default-org-name (if (boundp 'gnus-local-organization) gnus-local-organization
+X bpf-default-domain-name)
+X "*Default organization name for bbdb-passwd-input.")
+X
+X
+X(defvar bpf-omit-uid-limit 100
+X "Skip UIDs below this value. Default is 100.")
+X
+X(defvar bpf-omit-user-name-regexp "\\(sl-\\\|guest\\)"
+X "Skip usernames that match this regular expression.
+XE.g., \"\\\\(sl-\\\\\\|guest\\\\)\"
+X")
+X
+X(defvar bpf-omit-user-name-list '("nobody" "noaccess")
+X "Skip usernames in this list.
+XE.g., '(\"noaccess\" \"nobody\")
+X")
+X
+X(defvar bpf-omit-pretty-name-regexp "\\(Slip \\\|Listserv\\\|PPP\\)"
+X "Skip pretty names that match this regular expression.
+XE.g., \"\\\\(Slip \\\\\\|Listserv\\\\\\|PPP\\\\)\"
+X")
+X
+X(defvar bpf-omit-pretty-name-list '()
+X "Skip pretty names that match this regular expression.
+XE.g., '(\"John Q. Public\")
+X")
+X
+X
+X(defun bbdb-passwd-input (domain-name org-name to-file)
+X "Parse current buffer which contains a UNIX passwd file to generate a .bif format file"
+X (interactive (list (setq bpf-default-domain-name (read-string "Domain name: "
+X bpf-default-domain-name))
+X (setq bpf-default-org-name (read-string "Organization name: "
+X bpf-default-org-name))
+X (setq bpf-default-bif-file
+X (read-file-name "Output To File: "
+X (concat
+X (file-name-directory bpf-default-bif-file)
+X (concat "bif-" bpf-default-domain-name ".el"))
+X (concat
+X (file-name-directory bpf-default-bif-file)
+X (concat "bif-" bpf-default-domain-name ".el"))))))
+X (let (to-buffer)
+X (save-excursion
+X (message (expand-file-name to-file))
+X (set-buffer (find-file (expand-file-name to-file)))
+X (delete-region (point-min) (point-max))
+X (bif-buffer-insert-header)
+X (setq to-buffer (current-buffer)))
+X
+X ;; walk the passwd file in the current buffer
+X (goto-char (point-min))
+X (while (not (eobp))
+X (beginning-of-line)
+X (bpf-parse-line domain-name org-name to-buffer)
+X (forward-line 1))
+X
+X (message "Done.")
+X (set-buffer to-buffer)
+X ))
+X
+X
+X(defun bif-buffer-insert-header ()
+X (insert "(require 'bbdb-passwd)\n\n"))
+X
+X
+X(defun bif-buffer-insert-record (pretty-name org-name email)
+X (insert (format "(bif-create-record"))
+X
+X (insert (format " \"%s\"" pretty-name)) ; NAME string
+X
+X (insert (format " \"%s\"" org-name)) ; COMPANY is a string or nil
+X
+X (insert (format " \"%s\"" email)) ; NET is a comma-separated list of email address,
+X ; or a list of strings
+X
+X ;; (insert " nil") ; ADDRS is a list of address objects.
+X ; An address is a vector of the form
+X ; ["location" "line1" "line2" "line3" "City" "State" zip]
+X
+X ;; (insert " nil") ; PHONES is a list of phone-number objects.
+X ; A phone-number is a vector of the form
+X ; ["location" areacode prefix suffix extension-or-nil]
+X ; or
+X ; ["location" "phone-number"]
+X
+X ;; (insert " nil") ; NOTES is a string, or an alist associating symbols with
+X ; strings.
+X
+X (insert ")\n")
+X )
+X
+X(defun bpf-parse-line (domain-name org-name to-buffer)
+X "Parse the passwd file line. Point is assumed to be at the beginning of line."
+X (let (record-string uid user-name pretty-name email)
+X (setq record-string (buffer-substring (point)
+X (progn (end-of-line) (point))))
+X
+X (message "Processing record: %s" record-string)
+X
+X ;; (setq record-string "mohsen:x:100:10:Mohsen Banan:/home/arash/mohsen:/bin/csh")
+X
+X ;; check for a valid and qualifying uid on line, else skip
+X (cond ((and
+X ;;
+X ;; extract and test uid
+X ;;
+X (string-match "^\\w*:\\w*:\\([0-9]+\\):" record-string)
+X (setq uid (read (substring record-string
+X (match-beginning 1)
+X (match-end 1))))
+X (>= uid bpf-omit-uid-limit)
+X ;;
+X ;; extract and test user name
+X ;;
+X (string-match "^\\([^:]+\\):" record-string)
+X (setq user-name (substring record-string (match-beginning 1) (match-end 1)))
+X (or (null bpf-omit-user-name-regexp)
+X (not (string-match bpf-omit-user-name-regexp user-name)))
+X (or (null bpf-omit-user-name-list)
+X (not (member user-name bpf-omit-user-name-list)))
+X ;;
+X ;; extract and test pretty name
+X ;;
+X (string-match "^[^:]*:[^:]*:[^:]*:[^:]*:\\([^:]+\\):" record-string)
+X (setq pretty-name (substring record-string (match-beginning 1) (match-end 1)))
+X (or (null bpf-omit-pretty-name-regexp)
+X (not (string-match bpf-omit-pretty-name-regexp pretty-name)))
+X (or (null bpf-omit-pretty-name-list)
+X (not (member pretty-name bpf-omit-pretty-name-list)))
+X )
+X
+X ;; synthesize email address
+X (setq email (concat user-name "@" domain-name))
+X
+X ;; output bif record
+X (save-excursion
+X (set-buffer to-buffer)
+X (bif-buffer-insert-record pretty-name org-name email)
+X )
+X )
+X (t
+X ;; not a valid line, skip
+X nil))
+X ))
+X
+X(defun bif-create-record (name company net &optional addrs phones notes)
+X "Try to add a record to BBDB; if one does not already exist."
+X (condition-case err
+X (progn
+X (bbdb-create-internal name company net addrs phones notes)
+X (message "%s <%s> added." name net))
+X (error (message "%s" (car (cdr err)))
+X (sleep-for 1))))
+X
+X
+X(provide 'bbdb-passwd)
+X
+END_OF_FILE
+if test 6613 -ne `wc -c <'bbdb-passwd.el'`; then
+ echo shar: \"'bbdb-passwd.el'\" unpacked with wrong size!
+fi
+# end of 'bbdb-passwd.el'
+fi
+if test -f 'makefile' -a "${1}" != "-c" ; then
+ echo shar: Will not clobber existing file \"'makefile'\"
+else
+echo shar: Extracting \"'makefile'\" \(1977 characters\)
+sed "s/^X//" >'makefile' <<'END_OF_FILE'
+X# This file is part of the BBDB Filters Package. BBDB Filters Package is a
+X# collection of input and output filters for BBDB.
+X#
+X# Copyright (C) 1995 Neda Communications, Inc.
+X# Prepared by Mohsen Banan (mohsen@neda.com)
+X#
+X# This library is free software; you can redistribute it and/or modify
+X# it under the terms of the GNU Library General Public License as
+X# published by the Free Software Foundation; either version 2 of the
+X# License, or (at your option) any later version. This library is
+X# distributed in the hope that it will be useful, but WITHOUT ANY
+X# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+X# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+X# License for more details. You should have received a copy of the GNU
+X# Library General Public License along with this library; if not, write
+X# to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+X# USA.
+X#
+X#
+X
+X# Makefile for the Insidious Big Brother Database -- Input and Output Filters
+X#
+X# RCS makefile,v 1.2 1995/08/08 01:20:32 mohsen Exp
+X#
+X
+XEOEBASE = /usr/public/eoe/lisp/public/bbdbPlus
+XEOEINFO = /usr/public/eoe/info
+XEMACS = xemacs
+X
+X
+X# You shouldn't need to change anything after this point.
+X
+XSRCS = bbdb-ccmail.el bbdb-eudora.el bbdb-export.el bbdb-hp200lx.el bbdb-ph.el bbdb-passwd.el
+X
+XSHELL=/bin/sh
+X
+X.SUFFIXES:
+X.SUFFIXES: .elc .el
+X
+X.el.elc:
+X $(EMACS) -batch -q -f batch-byte-compile $(@:.elc=.el)
+X
+Xdefault:
+X @echo Targets: install clean shar
+X
+Xinstall:
+X cp $(SRCS) $(EOEBASE)
+X cd doc; make EOEBASE=$(EOEBASE) EOEINFO=$(EOEINFO) install
+X
+Xclean:
+X -/bin/rm *.elc package.shar
+X cd doc; make EOEBASE=$(EOEBASE) EOEINFO=$(EOEINFO) clean
+X
+X
+Xshar: $(SRCS) makefile
+X shar -o package.shar $(SRCS) makefile COPYING.LIB README \
+X doc doc/main.texinfo doc/lgpl.tex doc/makefile \
+X doc/formatted doc/formatted/bbdb-filters.info
+X
+X
+XFORFTPING = /h8/var/ftp/pub/eoe/bbdbPlus/bbdb-filters-0.2.tar
+X
+Xtar: $(SRCS) makefile
+X tar cvf $(FORFTPING) .
+X
+X
+X
+END_OF_FILE
+if test 1977 -ne `wc -c <'makefile'`; then
+ echo shar: \"'makefile'\" unpacked with wrong size!
+fi
+# end of 'makefile'
+fi
+if test -f 'COPYING.LIB' -a "${1}" != "-c" ; then
+ echo shar: Will not clobber existing file \"'COPYING.LIB'\"
+else
+echo shar: Extracting \"'COPYING.LIB'\" \(25265 characters\)
+sed "s/^X//" >'COPYING.LIB' <<'END_OF_FILE'
+X GNU LIBRARY GENERAL PUBLIC LICENSE
+X Version 2, June 1991
+X
+X Copyright (C) 1991 Free Software Foundation, Inc.
+X 675 Mass Ave, Cambridge, MA 02139, USA
+X Everyone is permitted to copy and distribute verbatim copies
+X of this license document, but changing it is not allowed.
+X
+X[This is the first released version of the library GPL. It is
+X numbered 2 because it goes with version 2 of the ordinary GPL.]
+X
+X Preamble
+X
+X The licenses for most software are designed to take away your
+Xfreedom to share and change it. By contrast, the GNU General Public
+XLicenses are intended to guarantee your freedom to share and change
+Xfree software--to make sure the software is free for all its users.
+X
+X This license, the Library General Public License, applies to some
+Xspecially designated Free Software Foundation software, and to any
+Xother libraries whose authors decide to use it. You can use it for
+Xyour libraries, too.
+X
+X When we speak of free software, we are referring to freedom, not
+Xprice. Our General Public Licenses are designed to make sure that you
+Xhave the freedom to distribute copies of free software (and charge for
+Xthis service if you wish), that you receive source code or can get it
+Xif you want it, that you can change the software or use pieces of it
+Xin new free programs; and that you know you can do these things.
+X
+X To protect your rights, we need to make restrictions that forbid
+Xanyone to deny you these rights or to ask you to surrender the rights.
+XThese restrictions translate to certain responsibilities for you if
+Xyou distribute copies of the library, or if you modify it.
+X
+X For example, if you distribute copies of the library, whether gratis
+Xor for a fee, you must give the recipients all the rights that we gave
+Xyou. You must make sure that they, too, receive or can get the source
+Xcode. If you link a program with the library, you must provide
+Xcomplete object files to the recipients so that they can relink them
+Xwith the library, after making changes to the library and recompiling
+Xit. And you must show them these terms so they know their rights.
+X
+X Our method of protecting your rights has two steps: (1) copyright
+Xthe library, and (2) offer you this license which gives you legal
+Xpermission to copy, distribute and/or modify the library.
+X
+X Also, for each distributor's protection, we want to make certain
+Xthat everyone understands that there is no warranty for this free
+Xlibrary. If the library is modified by someone else and passed on, we
+Xwant its recipients to know that what they have is not the original
+Xversion, so that any problems introduced by others will not reflect on
+Xthe original authors' reputations.
+X
+X Finally, any free program is threatened constantly by software
+Xpatents. We wish to avoid the danger that companies distributing free
+Xsoftware will individually obtain patent licenses, thus in effect
+Xtransforming the program into proprietary software. To prevent this,
+Xwe have made it clear that any patent must be licensed for everyone's
+Xfree use or not licensed at all.
+X
+X Most GNU software, including some libraries, is covered by the ordinary
+XGNU General Public License, which was designed for utility programs. This
+Xlicense, the GNU Library General Public License, applies to certain
+Xdesignated libraries. This license is quite different from the ordinary
+Xone; be sure to read it in full, and don't assume that anything in it is
+Xthe same as in the ordinary license.
+X
+X The reason we have a separate public license for some libraries is that
+Xthey blur the distinction we usually make between modifying or adding to a
+Xprogram and simply using it. Linking a program with a library, without
+Xchanging the library, is in some sense simply using the library, and is
+Xanalogous to running a utility program or application program. However, in
+Xa textual and legal sense, the linked executable is a combined work, a
+Xderivative of the original library, and the ordinary General Public License
+Xtreats it as such.
+X
+X Because of this blurred distinction, using the ordinary General
+XPublic License for libraries did not effectively promote software
+Xsharing, because most developers did not use the libraries. We
+Xconcluded that weaker conditions might promote sharing better.
+X
+X However, unrestricted linking of non-free programs would deprive the
+Xusers of those programs of all benefit from the free status of the
+Xlibraries themselves. This Library General Public License is intended to
+Xpermit developers of non-free programs to use free libraries, while
+Xpreserving your freedom as a user of such programs to change the free
+Xlibraries that are incorporated in them. (We have not seen how to achieve
+Xthis as regards changes in header files, but we have achieved it as regards
+Xchanges in the actual functions of the Library.) The hope is that this
+Xwill lead to faster development of free libraries.
+X
+X The precise terms and conditions for copying, distribution and
+Xmodification follow. Pay close attention to the difference between a
+X"work based on the library" and a "work that uses the library". The
+Xformer contains code derived from the library, while the latter only
+Xworks together with the library.
+X
+X Note that it is possible for a library to be covered by the ordinary
+XGeneral Public License rather than by this special one.
+X
+X GNU LIBRARY GENERAL PUBLIC LICENSE
+X TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+X
+X 0. This License Agreement applies to any software library which
+Xcontains a notice placed by the copyright holder or other authorized
+Xparty saying it may be distributed under the terms of this Library
+XGeneral Public License (also called "this License"). Each licensee is
+Xaddressed as "you".
+X
+X A "library" means a collection of software functions and/or data
+Xprepared so as to be conveniently linked with application programs
+X(which use some of those functions and data) to form executables.
+X
+X The "Library", below, refers to any such software library or work
+Xwhich has been distributed under these terms. A "work based on the
+XLibrary" means either the Library or any derivative work under
+Xcopyright law: that is to say, a work containing the Library or a
+Xportion of it, either verbatim or with modifications and/or translated
+Xstraightforwardly into another language. (Hereinafter, translation is
+Xincluded without limitation in the term "modification".)
+X
+X "Source code" for a work means the preferred form of the work for
+Xmaking modifications to it. For a library, complete source code means
+Xall the source code for all modules it contains, plus any associated
+Xinterface definition files, plus the scripts used to control compilation
+Xand installation of the library.
+X
+X Activities other than copying, distribution and modification are not
+Xcovered by this License; they are outside its scope. The act of
+Xrunning a program using the Library is not restricted, and output from
+Xsuch a program is covered only if its contents constitute a work based
+Xon the Library (independent of the use of the Library in a tool for
+Xwriting it). Whether that is true depends on what the Library does
+Xand what the program that uses the Library does.
+X
+X 1. You may copy and distribute verbatim copies of the Library's
+Xcomplete source code as you receive it, in any medium, provided that
+Xyou conspicuously and appropriately publish on each copy an
+Xappropriate copyright notice and disclaimer of warranty; keep intact
+Xall the notices that refer to this License and to the absence of any
+Xwarranty; and distribute a copy of this License along with the
+XLibrary.
+X
+X You may charge a fee for the physical act of transferring a copy,
+Xand you may at your option offer warranty protection in exchange for a
+Xfee.
+X
+X 2. You may modify your copy or copies of the Library or any portion
+Xof it, thus forming a work based on the Library, and copy and
+Xdistribute such modifications or work under the terms of Section 1
+Xabove, provided that you also meet all of these conditions:
+X
+X a) The modified work must itself be a software library.
+X
+X b) You must cause the files modified to carry prominent notices
+X stating that you changed the files and the date of any change.
+X
+X c) You must cause the whole of the work to be licensed at no
+X charge to all third parties under the terms of this License.
+X
+X d) If a facility in the modified Library refers to a function or a
+X table of data to be supplied by an application program that uses
+X the facility, other than as an argument passed when the facility
+X is invoked, then you must make a good faith effort to ensure that,
+X in the event an application does not supply such function or
+X table, the facility still operates, and performs whatever part of
+X its purpose remains meaningful.
+X
+X (For example, a function in a library to compute square roots has
+X a purpose that is entirely well-defined independent of the
+X application. Therefore, Subsection 2d requires that any
+X application-supplied function or table used by this function must
+X be optional: if the application does not supply it, the square
+X root function must still compute square roots.)
+X
+XThese requirements apply to the modified work as a whole. If
+Xidentifiable sections of that work are not derived from the Library,
+Xand can be reasonably considered independent and separate works in
+Xthemselves, then this License, and its terms, do not apply to those
+Xsections when you distribute them as separate works. But when you
+Xdistribute the same sections as part of a whole which is a work based
+Xon the Library, the distribution of the whole must be on the terms of
+Xthis License, whose permissions for other licensees extend to the
+Xentire whole, and thus to each and every part regardless of who wrote
+Xit.
+X
+XThus, it is not the intent of this section to claim rights or contest
+Xyour rights to work written entirely by you; rather, the intent is to
+Xexercise the right to control the distribution of derivative or
+Xcollective works based on the Library.
+X
+XIn addition, mere aggregation of another work not based on the Library
+Xwith the Library (or with a work based on the Library) on a volume of
+Xa storage or distribution medium does not bring the other work under
+Xthe scope of this License.
+X
+X 3. You may opt to apply the terms of the ordinary GNU General Public
+XLicense instead of this License to a given copy of the Library. To do
+Xthis, you must alter all the notices that refer to this License, so
+Xthat they refer to the ordinary GNU General Public License, version 2,
+Xinstead of to this License. (If a newer version than version 2 of the
+Xordinary GNU General Public License has appeared, then you can specify
+Xthat version instead if you wish.) Do not make any other change in
+Xthese notices.
+X
+X Once this change is made in a given copy, it is irreversible for
+Xthat copy, so the ordinary GNU General Public License applies to all
+Xsubsequent copies and derivative works made from that copy.
+X
+X This option is useful when you wish to copy part of the code of
+Xthe Library into a program that is not a library.
+X
+X 4. You may copy and distribute the Library (or a portion or
+Xderivative of it, under Section 2) in object code or executable form
+Xunder the terms of Sections 1 and 2 above provided that you accompany
+Xit with the complete corresponding machine-readable source code, which
+Xmust be distributed under the terms of Sections 1 and 2 above on a
+Xmedium customarily used for software interchange.
+X
+X If distribution of object code is made by offering access to copy
+Xfrom a designated place, then offering equivalent access to copy the
+Xsource code from the same place satisfies the requirement to
+Xdistribute the source code, even though third parties are not
+Xcompelled to copy the source along with the object code.
+X
+X 5. A program that contains no derivative of any portion of the
+XLibrary, but is designed to work with the Library by being compiled or
+Xlinked with it, is called a "work that uses the Library". Such a
+Xwork, in isolation, is not a derivative work of the Library, and
+Xtherefore falls outside the scope of this License.
+X
+X However, linking a "work that uses the Library" with the Library
+Xcreates an executable that is a derivative of the Library (because it
+Xcontains portions of the Library), rather than a "work that uses the
+Xlibrary". The executable is therefore covered by this License.
+XSection 6 states terms for distribution of such executables.
+X
+X When a "work that uses the Library" uses material from a header file
+Xthat is part of the Library, the object code for the work may be a
+Xderivative work of the Library even though the source code is not.
+XWhether this is true is especially significant if the work can be
+Xlinked without the Library, or if the work is itself a library. The
+Xthreshold for this to be true is not precisely defined by law.
+X
+X If such an object file uses only numerical parameters, data
+Xstructure layouts and accessors, and small macros and small inline
+Xfunctions (ten lines or less in length), then the use of the object
+Xfile is unrestricted, regardless of whether it is legally a derivative
+Xwork. (Executables containing this object code plus portions of the
+XLibrary will still fall under Section 6.)
+X
+X Otherwise, if the work is a derivative of the Library, you may
+Xdistribute the object code for the work under the terms of Section 6.
+XAny executables containing that work also fall under Section 6,
+Xwhether or not they are linked directly with the Library itself.
+X
+X 6. As an exception to the Sections above, you may also compile or
+Xlink a "work that uses the Library" with the Library to produce a
+Xwork containing portions of the Library, and distribute that work
+Xunder terms of your choice, provided that the terms permit
+Xmodification of the work for the customer's own use and reverse
+Xengineering for debugging such modifications.
+X
+X You must give prominent notice with each copy of the work that the
+XLibrary is used in it and that the Library and its use are covered by
+Xthis License. You must supply a copy of this License. If the work
+Xduring execution displays copyright notices, you must include the
+Xcopyright notice for the Library among them, as well as a reference
+Xdirecting the user to the copy of this License. Also, you must do one
+Xof these things:
+X
+X a) Accompany the work with the complete corresponding
+X machine-readable source code for the Library including whatever
+X changes were used in the work (which must be distributed under
+X Sections 1 and 2 above); and, if the work is an executable linked
+X with the Library, with the complete machine-readable "work that
+X uses the Library", as object code and/or source code, so that the
+X user can modify the Library and then relink to produce a modified
+X executable containing the modified Library. (It is understood
+X that the user who changes the contents of definitions files in the
+X Library will not necessarily be able to recompile the application
+X to use the modified definitions.)
+X
+X b) Accompany the work with a written offer, valid for at
+X least three years, to give the same user the materials
+X specified in Subsection 6a, above, for a charge no more
+X than the cost of performing this distribution.
+X
+X c) If distribution of the work is made by offering access to copy
+X from a designated place, offer equivalent access to copy the above
+X specified materials from the same place.
+X
+X d) Verify that the user has already received a copy of these
+X materials or that you have already sent this user a copy.
+X
+X For an executable, the required form of the "work that uses the
+XLibrary" must include any data and utility programs needed for
+Xreproducing the executable from it. However, as a special exception,
+Xthe source code distributed need not include anything that is normally
+Xdistributed (in either source or binary form) with the major
+Xcomponents (compiler, kernel, and so on) of the operating system on
+Xwhich the executable runs, unless that component itself accompanies
+Xthe executable.
+X
+X It may happen that this requirement contradicts the license
+Xrestrictions of other proprietary libraries that do not normally
+Xaccompany the operating system. Such a contradiction means you cannot
+Xuse both them and the Library together in an executable that you
+Xdistribute.
+X
+X 7. You may place library facilities that are a work based on the
+XLibrary side-by-side in a single library together with other library
+Xfacilities not covered by this License, and distribute such a combined
+Xlibrary, provided that the separate distribution of the work based on
+Xthe Library and of the other library facilities is otherwise
+Xpermitted, and provided that you do these two things:
+X
+X a) Accompany the combined library with a copy of the same work
+X based on the Library, uncombined with any other library
+X facilities. This must be distributed under the terms of the
+X Sections above.
+X
+X b) Give prominent notice with the combined library of the fact
+X that part of it is a work based on the Library, and explaining
+X where to find the accompanying uncombined form of the same work.
+X
+X 8. You may not copy, modify, sublicense, link with, or distribute
+Xthe Library except as expressly provided under this License. Any
+Xattempt otherwise to copy, modify, sublicense, link with, or
+Xdistribute the Library is void, and will automatically terminate your
+Xrights under this License. However, parties who have received copies,
+Xor rights, from you under this License will not have their licenses
+Xterminated so long as such parties remain in full compliance.
+X
+X 9. You are not required to accept this License, since you have not
+Xsigned it. However, nothing else grants you permission to modify or
+Xdistribute the Library or its derivative works. These actions are
+Xprohibited by law if you do not accept this License. Therefore, by
+Xmodifying or distributing the Library (or any work based on the
+XLibrary), you indicate your acceptance of this License to do so, and
+Xall its terms and conditions for copying, distributing or modifying
+Xthe Library or works based on it.
+X
+X 10. Each time you redistribute the Library (or any work based on the
+XLibrary), the recipient automatically receives a license from the
+Xoriginal licensor to copy, distribute, link with or modify the Library
+Xsubject to these terms and conditions. You may not impose any further
+Xrestrictions on the recipients' exercise of the rights granted herein.
+XYou are not responsible for enforcing compliance by third parties to
+Xthis License.
+X
+X 11. If, as a consequence of a court judgment or allegation of patent
+Xinfringement or for any other reason (not limited to patent issues),
+Xconditions are imposed on you (whether by court order, agreement or
+Xotherwise) that contradict the conditions of this License, they do not
+Xexcuse you from the conditions of this License. If you cannot
+Xdistribute so as to satisfy simultaneously your obligations under this
+XLicense and any other pertinent obligations, then as a consequence you
+Xmay not distribute the Library at all. For example, if a patent
+Xlicense would not permit royalty-free redistribution of the Library by
+Xall those who receive copies directly or indirectly through you, then
+Xthe only way you could satisfy both it and this License would be to
+Xrefrain entirely from distribution of the Library.
+X
+XIf any portion of this section is held invalid or unenforceable under any
+Xparticular circumstance, the balance of the section is intended to apply,
+Xand the section as a whole is intended to apply in other circumstances.
+X
+XIt is not the purpose of this section to induce you to infringe any
+Xpatents or other property right claims or to contest validity of any
+Xsuch claims; this section has the sole purpose of protecting the
+Xintegrity of the free software distribution system which is
+Ximplemented by public license practices. Many people have made
+Xgenerous contributions to the wide range of software distributed
+Xthrough that system in reliance on consistent application of that
+Xsystem; it is up to the author/donor to decide if he or she is willing
+Xto distribute software through any other system and a licensee cannot
+Ximpose that choice.
+X
+XThis section is intended to make thoroughly clear what is believed to
+Xbe a consequence of the rest of this License.
+X
+X 12. If the distribution and/or use of the Library is restricted in
+Xcertain countries either by patents or by copyrighted interfaces, the
+Xoriginal copyright holder who places the Library under this License may add
+Xan explicit geographical distribution limitation excluding those countries,
+Xso that distribution is permitted only in or among countries not thus
+Xexcluded. In such case, this License incorporates the limitation as if
+Xwritten in the body of this License.
+X
+X 13. The Free Software Foundation may publish revised and/or new
+Xversions of the Library General Public License from time to time.
+XSuch new versions will be similar in spirit to the present version,
+Xbut may differ in detail to address new problems or concerns.
+X
+XEach version is given a distinguishing version number. If the Library
+Xspecifies a version number of this License which applies to it and
+X"any later version", you have the option of following the terms and
+Xconditions either of that version or of any later version published by
+Xthe Free Software Foundation. If the Library does not specify a
+Xlicense version number, you may choose any version ever published by
+Xthe Free Software Foundation.
+X
+X 14. If you wish to incorporate parts of the Library into other free
+Xprograms whose distribution conditions are incompatible with these,
+Xwrite to the author to ask for permission. For software which is
+Xcopyrighted by the Free Software Foundation, write to the Free
+XSoftware Foundation; we sometimes make exceptions for this. Our
+Xdecision will be guided by the two goals of preserving the free status
+Xof all derivatives of our free software and of promoting the sharing
+Xand reuse of software generally.
+X
+X NO WARRANTY
+X
+X 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+XWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+XEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+XOTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+XKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+XIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+XPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+XLIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+XTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+X
+X 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+XWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+XAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+XFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+XCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+XLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+XRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+XFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+XSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+XDAMAGES.
+X
+X END OF TERMS AND CONDITIONS
+X
+X Appendix: How to Apply These Terms to Your New Libraries
+X
+X If you develop a new library, and you want it to be of the greatest
+Xpossible use to the public, we recommend making it free software that
+Xeveryone can redistribute and change. You can do so by permitting
+Xredistribution under these terms (or, alternatively, under the terms of the
+Xordinary General Public License).
+X
+X To apply these terms, attach the following notices to the library. It is
+Xsafest to attach them to the start of each source file to most effectively
+Xconvey the exclusion of warranty; and each file should have at least the
+X"copyright" line and a pointer to where the full notice is found.
+X
+X <one line to give the library's name and a brief idea of what it does.>
+X Copyright (C) <year> <name of author>
+X
+X This library is free software; you can redistribute it and/or
+X modify it under the terms of the GNU Library General Public
+X License as published by the Free Software Foundation; either
+X version 2 of the License, or (at your option) any later version.
+X
+X This library is distributed in the hope that it will be useful,
+X but WITHOUT ANY WARRANTY; without even the implied warranty of
+X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+X Library General Public License for more details.
+X
+X You should have received a copy of the GNU Library General Public
+X License along with this library; if not, write to the Free
+X Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+X
+XAlso add information on how to contact you by electronic and paper mail.
+X
+XYou should also get your employer (if you work as a programmer) or your
+Xschool, if any, to sign a "copyright disclaimer" for the library, if
+Xnecessary. Here is a sample; alter the names:
+X
+X Yoyodyne, Inc., hereby disclaims all copyright interest in the
+X library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+X
+X <signature of Ty Coon>, 1 April 1990
+X Ty Coon, President of Vice
+X
+XThat's all there is to it!
+END_OF_FILE
+if test 25265 -ne `wc -c <'COPYING.LIB'`; then
+ echo shar: \"'COPYING.LIB'\" unpacked with wrong size!
+fi
+# end of 'COPYING.LIB'
+fi
+if test -f 'README' -a "${1}" != "-c" ; then
+ echo shar: Will not clobber existing file \"'README'\"
+else
+echo shar: Extracting \"'README'\" \(2011 characters\)
+sed "s/^X//" >'README' <<'END_OF_FILE'
+X
+XBBDB is a rolodex-like database program for GNU Emacs.
+XBBDB stands for Insidious Big Brother Database. BBDB is written by:
+XJamie Zawinski <jwz@mcom.com>. My current version is 1.50.
+X
+XWe have prepared a family of filters for BBDB. Currently the output
+Xfilters include:
+X
+X - bbdb --> emacs lisp exporting (for exchanging business cards)
+X - bbdb --> HP100/200 LX Phone Book
+X - bbdb --> PC Eudora Nicknames
+X - bbdb --> CC Mail Nicknames
+X - bbdb --> PH/QI
+X
+XThere is presently only one input filter:
+X
+X - bbdb <-- UNIX passwd files
+X
+XWe hope that over time a variety of other input and output filters
+Xwill be added to this collection.
+X
+X
+Xbbdb-export in particular, can be very useful over the net.
+XIt provides a convenient way for exchanging business cards.
+X
+X
+XThis is a preliminary release. This stuff has not been tested much
+Xoutside of our office. We do use most of these filters on an going basis
+Xand they work fine for us.
+X
+XTo install, just edit the makefile and run "make install".
+X
+XTo run them, read the comments on top of each filter file.
+X
+XThere is very skimpy documentation in latexinfo format. It is just
+Xmeant to be a starting point.
+X
+XIn addition to the attached shar file,
+Xyou can also ftp this package from:
+X //anonymous@ftp.neda.com:/pub/eoe/bbdbPlus/bbdb-filters-0.2.tar
+X URL = ftp://ftp.neda.com/pub/eoe/bbdbPlus/bbdb-filters-0.2.tar
+X
+XMany of the filters require bbdb-tex-print package by:
+XBoris Goldowsky <boris@prodigal.psych.rochester.edu>.
+X
+XThe one that we use can be found in:
+X //anonymous@ftp.neda.com:/pub/eoe/bbdbPlus/bbdb-tex-3.0.tar
+X URL = ftp://ftp.neda.com/pub/eoe/bbdbPlus/bbdb-tex-3.0.tar
+X
+XYou can checkout the overview of this package by
+Xbrowsing the manual (latex/info/html) at:
+X URL = http://www.neda.com/eoe/bbdbFilters/bbdbFilters.html
+X
+X
+XSend bug-reports, comments and suggestions to:
+X Mohsen Banan-neda <mohsen@neda.com>
+Xand refer to:
+X bbdb-filters RCS: README,v 1.2 1995/08/08 02:59:15 mohsen Exp
+X
+X
+XHope you find this helpful.
+X
+X...Mohsen.
+X
+END_OF_FILE
+if test 2011 -ne `wc -c <'README'`; then
+ echo shar: \"'README'\" unpacked with wrong size!
+fi
+# end of 'README'
+fi
+if test ! -d 'doc' ; then
+ echo shar: Creating directory \"'doc'\"
+ mkdir 'doc'
+fi
+if test -f 'doc/main.texinfo' -a "${1}" != "-c" ; then
+ echo shar: Will not clobber existing file \"'doc/main.texinfo'\"
+else
+echo shar: Extracting \"'doc/main.texinfo'\" \(15557 characters\)
+sed "s/^X//" >'doc/main.texinfo' <<'END_OF_FILE'
+X% This is really LaTeXInfo, but some time LaTeX mode is more useful -*- LaTeX -*-
+X% This is really LaTeXInfo, but some time LaTeX mode is more useful -*- Latexinfo -*-
+X%
+X% Revision: main.texinfo,v 1.1.1.1 1995/08/07 08:43:10 mohsen Exp
+X%
+X%\documentstyle[12pt,latexinfo,format,smallverb,tabular]{book}
+X%\documentstyle[12pt,latexinfo,format]{book}
+X\documentstyle[12pt,format,hyperlatex,latexinfo]{book}
+X%\documentstyle[12pt,times,latexinfo,format]{book}
+X%\documentstyle[12pt,avantgarde,latexinfo,format]{book}
+X%\documentstyle[12pt,palatino,latexinfo,format]{book}
+X%\documentstyle[10pt,avantgarde,latexinfo,format]{book}
+X
+X\pagestyle{empty}
+X
+X\c \input{transfig} \c Used with eepic -- not needed when using psfig.
+X\input{epsf}
+X
+X\begin{document}
+X
+X\c \bibliographystyle{alpha} \c [banan92]
+X\c \bibliographystyle{plain} \c Numbers [1]
+X
+X\c \textwidth 5.2in \c for .tty generation
+X
+X\htmldirectory{bbdbFilters}
+X\htmlname{bbdbFilters}
+X\htmltitle{BBDB Filters}
+X\htmlmathitalics
+X\htmladdress{\htmlrule{}info@neda.com}
+X
+X\c Declare which indices you want to make use of.
+X\newindex{cp}
+X\newindex{fn}
+X
+X\title{BBDB Input and Output Filters\\
+X \vspace{0.25in} {\large DRAFT}\\
+X {\normalsize Version 0.2}}
+X
+X\author{{\normalsize Prepared by}\\
+X Mohsen Banan \\
+X \code{mohsen@neda.com}\\
+X Neda Communications, Inc.\\
+X 17005 SE 31st Place\\
+X Bellevue, WA 98008}
+X
+X\c (current-time-string)
+X\date{July 26, 1995}
+X\c \date{\today}
+X
+X\maketitle
+X
+X\c The following commands start the copyright page for the printed manual.
+X\clearpage
+X\vspace*{0pt plus 1filll}
+X
+X
+X\bigskip
+X\bigskip
+X\bigskip
+X
+X
+XThis document describes the ``BBDB Input and Output Filters'' package,
+Xa utility which translates BBDB information to and from various other
+Xformats.
+X
+X\begin{display}
+X
+XCopyright \copyright 1995 Neda Communications, Inc.
+X
+XPublished by:
+XNeda Communications, Inc.
+X17005 SE 31st Place,
+XBellevue, WA 98008 USA
+X
+X\end{display}
+X
+X
+XPermission is granted to make and distribute verbatim copies of this
+Xmanual provided the copyright notice and this permission notice are
+Xpreserved on all copies.
+X
+XPermission is granted to copy and distribute modified versions of this
+Xmanual under the conditions for verbatim copying, provided that the
+Xentire resulting derived work is distributed under the terms of a
+Xpermission notice identical to this one.
+X
+XPermission is granted to copy and distribute translations of this
+Xmanual into another language, under the above conditions for modified
+Xversions, except that this permission notice may be stated in a
+Xtranslation approved by the Foundation.
+X
+X\bigskip
+X\bigskip
+X
+X\clearpage
+X\pagestyle{headings}
+X
+X\c Use roman numerals for the page numbers and Insert the Table of Contents.
+X\pagenumbering{roman}
+X\tableofcontents
+X
+X\c \listoftables
+X\c \listoffigures
+X
+X\c End the Table of Contents and start numbering from 1 with Arabic numbers
+X
+X\clearpage
+X\pagenumbering{arabic}
+X
+X\c Anything before the setfilename will not appear in the Info file.
+X\setfilename{INFOFILE}
+X
+X\topnode{BBDB Filters}
+X
+X\htmlmenu{6}
+X
+X\begin{ifinfo}
+XCopyright \copyright \var{1995} \var{Neda Communications, Inc.}
+X\end{ifinfo}
+X
+X\c The Top node contains the master menu for the Info file.
+X\c This appears only in the Info file, not the printed manual.
+X
+X\chapter{Introduction}
+X
+XOver time much valuable data has been gathered in BBDB database files.
+XMany wish to share parts or all of this information with others. They
+Xalso wish to have access to this same information from other systems
+X(like personal digital assistants) lacking straightforward BBDB
+Xaccess.
+X
+XFor these reasons, we have prepared a family of filters that convert
+Xthe information in BBDB to and from a variety of other
+Xformats. ``Output filters'' export BBDB information to other formats
+Xwhile ``input filters'' import information from other formats into
+XBBDB.
+X
+XOur hope is that over time this collection of BBDB filters will grow
+Xthrough contributed code.
+X
+X\section{About This Package}
+X
+XThis package is a collection of filters and is called ``BBDB Input and
+XOutput Filters''. It has been somewhat tested with BBDB version 1.50.
+XThe present state of the software is still preliminary although it has
+Xproved useful.
+X
+X\section{About This Manual}
+X
+XThis documentation applies to Version 0.2 of the ``BBDB Input and
+XOutput Filters'' package. The documentation is presently skeletal and
+Xvery preliminary. It mostly provides the user with instructions for
+Xuse, and very little background is included. Familiarity with Emacs
+XLisp is assumed for some sections.
+X
+X\chapter{Output Filters}
+X
+X``Output filters'' are used to export BBDB information into formats
+Xused by other systems.
+X
+XIn general, an output filter uses the contents of your
+X\code{*BBDB*} buffer as input. Note that output filters do not use
+XBBDB files (typically `\code{~/.bbdb}') directly.
+X
+XAn output filter is invoked by executing its associated lisp function.
+XThe name of the function is conventionally named \code{bbdb-<system>-output}
+X(e.g., \code{M-x bbdb-hp200lx-output}).
+X
+XThe result of running an output filter is to create a new buffer that
+Xcontains the \code{*BBDB*} information appropriately transformed into a
+Xformat suitable for use by the target system. The new buffer is given
+Xa file name that you specify.
+X
+X\section{HP 200LX Phone Book}
+X
+X\cindex{HP 200LX Connectivity Pack}
+XThis package has only been tested on HP 200LX palmtop systems. It
+Xalso requires the ``HP 200LX Connectivity Pack'' for converting
+Xcomma-delimited ASCII files into binary .PDB files which are read by
+Xthe HP 200LX Phone Book application. Version 1.00 of the ``HP 200LX
+XConnectivty Pack'' was used for testing.
+X
+XThe HP 200LX output filter is in file \code{bbdb-hp200lx.el}.
+X
+X\begin{enumerate}
+X
+X\findex{bbdb-hp200lx-output}
+X
+X\item Invoke \code{M-x bbdb} to populate the \code{*BBDB*} buffer
+Xwith the contents you wish to export.
+X
+X\item Invoke \code{ bbdb-hp200lx-output} to create an ASCII .CDF
+X(Comma Delimited File). \cindex{.CDF file, HP 200LX Phone Book}
+X
+X\item Using Xlate/Merge option of HP Connectivity Pack convert the
+X.CDF file into a binary .PDB file used by the Phone Book program.
+X\cindex{.PDF file, HP 200LX Phone Book}
+X
+X\item Download the .PDB file to your palmtop's internal disk and
+Xensure that the Phone Book program is set use the newly downloaded
+X.PDB file.
+X
+X\end{enumerate}
+X
+X\section{PC Eudora}
+X
+XBBDB information can be exported to PC Eudora in two formats--as a
+Xnickname database file and as a recipients database file.
+X
+XThe PC Eudora output filter is in file \code{bbdb-eudora.el}.
+X
+X\subsection{PC Eudora Nickname Database}
+X
+X\begin{enumerate}
+X
+X\item Invoke \code{M-x bbdb} to populate the \code{*BBDB*} buffer
+Xwith the contents you wish to export.
+X
+X\findex{bbdb-eudora-nndbase-output}
+X\item Invoke \code{bbdb-eudora-nndbase-output} to create a PC Eudora
+XNickname database file.
+X
+X\item Make the file accessible to PC Eudora.
+X
+X\end{enumerate}
+X
+X\subsection{PC Eudora Recipient Database}
+X
+X\begin{enumerate}
+X
+X\item Invoke \code{M-x bbdb} to populate the \code{*BBDB*} buffer
+Xwith the contents you wish to export.
+X
+X\findex{bbdb-eudora-rcpdbase-output}
+X\item Invoke \code{bbdb-eudora-rcpdbase-output} to create a PC Eudora
+Xrecipient's database file.
+X
+X\item Make the file accessible to PC Eudora.
+X
+X\end{enumerate}
+X
+X\section{Lotus cc:Mail Nicknames}
+X
+XThe Lotus cc:Mail output filter is in file \code{bbdb-ccmail.el}.
+X
+X\begin{enumerate}
+X
+X\item Invoke \code{M-x bbdb} to populate the \code{*BBDB*} buffer
+Xwith the contents you wish to export.
+X
+X\findex{bbdb-ccmail-output}
+X\item Invoke \code{ bbdb-ccmail-output} to create a cc:Mail Nicknames file.
+X
+X\item Make the file accessible to cc:Mail.
+X
+X\end{enumerate}
+X
+X\section{PH}
+X
+XThe PH output filter is in file \code{bbdb-ph.el}.
+X
+X\begin{enumerate}
+X
+X\item Invoke \code{M-x bbdb} to populate the \code{*BBDB*} buffer
+Xwith the contents you wish to export.
+X
+X\findex{bbdb-ph-output}
+X\item Invoke \code{bbdb-ph-output} to create a \code{ph} data file for
+Xuse with the \code{maked} program.
+X
+X\item Make the file accessible to \code{ph}.
+X
+X\end{enumerate}
+X
+X\section{Emacs Lisp Export}
+X
+XThe Emacs Lisp Export output filter is in file \code{bbdb-export.el}.
+X
+XThis output filter uses the current contents of your
+X\code{*BBDB*} buffer to generate a new buffer (\code{*BBDB* Export})
+Xthat contains a single lisp \code{(progn ...)} expression. For
+Xexample, a \code{*BBDB*} buffer containing two records would result in
+Xthe following \code{*BBDB* Export} buffer:
+X
+X\begin{example}
+X;;; ======= Start of Exported BBDB Records =======
+X(progn
+X (require 'bbdb-com)
+X (defun bbdb-maybe-create (name company net &optional addrs phones notes)
+X "Try to add a record to BBDB if it does not already exist."
+X (condition-case err
+X (progn
+X (bbdb-create-internal name company net addrs phones notes)
+X (message "%s %s added." name (if net (concat "<" net ">") ""))
+X (sleep-for 1))
+X (error (ding)
+X (message "%s %s skipped. (%s)"
+X name
+X (if net (concat "<" net ">") "")
+X (car (cdr err)))
+X (sleep-for 1))))
+X
+X (bbdb-maybe-create "Jill Doe--IMPORTED"
+X "CBS Corporation"
+X '("jilld@cbs.com")
+X '(
+X ["Home"
+X "368 222ND PL"
+X ""
+X ""
+X "Springfield"
+X "MA" 2117]
+X )
+X '(
+X ["Office" 617 555 9983 0]
+X ) '"Movie Mogul")
+X (bbdb-maybe-create "John Doe--IMPORTED"
+X "ABC Incorporated"
+X '("jdoe@abc.com")
+X '(
+X ["Office"
+X "123 Any Street"
+X ""
+X ""
+X "Any Town"
+X "WA" (98027 7758)]
+X )
+X '(
+X ["Office" 206 555 1234 0]
+X ) '"TV Producer")
+X )
+X;;; ======= End of Exported BBDB Records =======
+X\end{example}
+X
+X\cindex{Sending BBDB records via email}
+XThis lisp expression can then be sent via email or some other
+Xtext-based messaging facility to another user who can then evaluate
+Xthe expression which will add the \code{BBDB} records to the
+Xrecipient's
+X\code{BBDB} database.
+X
+XOnly new records are added. A record with the same name or net
+Xaddress as one already existing in the \code{BBDB} is skipped
+Xentirely.
+X
+XIn the sample contents of a \code{*BBDB* Export} buffer presented, two
+Xrecords are being exported--one for ``John Doe'' and the other for
+X``Jill Doe''. Notice that their names have been appended with
+X\code{--IMPORTED}. This string can be used to quick locate each record
+Xthat is added to the database using this mechanism.
+X
+XThe following steps are for exporting BBDB records into Emacs Lisp:
+X
+X\begin{enumerate}
+X
+X\item Invoke \code{M-x bbdb} to populate the \code{*BBDB*} buffer
+Xwith the contents you wish to export.
+X
+X\findex{bbdb-export}
+X\item Invoke \code{bbdb-export} to create a \code{*BBDB* Export} buffer which contains a
+Xsingle \code{(progn ...)} can be evaluated to add the records to the
+Xexisting \code{BBDB} database (if the records do not already exist).
+X
+X\item Use the contents of \code{*BBDB* Export} in email and other messaging systems.
+X
+X\end{enumerate}
+X
+XThe following steps are for a user wishing to import the contents of a
+X\code{*BBDB* Export} buffer's expression into his or her own database:
+X
+X\begin{enumerate}
+X
+X\item Evaluate the region bounded by the lines \\
+X \code{;;; ======= Start of Exported BBDB Records =======} \\
+Xand \\
+X \code{;;; ======= End of Exported BBDB Records =======}. \\
+XYou can use such commands as
+X\code{M-x eval-region} or \code{M-x eval-last-sexp}.
+X
+X\item Review the newly imported entries. To see them, invoke \code{M-x
+Xbbdb} and specify \code{--IMPORTED} at the \code{Regular Expression}
+Xprompt.
+X
+X\item After reviewing the contents of the imported records, you may
+Xwish to remove the \code{--IMPORTED} that is appended to the name by
+X\code{bbdb-export}.
+X
+X\end{enumerate}
+X
+X\chapter{Input Filters}
+X
+X``Input filters'' are used to import into BBDB information from a
+Xforeign system's data file.
+X
+XThe name of the function is conventionally named
+X\code{bbdb-<system>-input} (e.g., \code{bbdb-passwd-input} is the name
+Xof the Emacs Lisp function for the UNIX password file input filter).
+X
+XIn general, an ``input filter'' expects the foreign system's data to
+Xbe in the current buffer. The contents of the current buffer are used
+Xto create an Emacs Lisp file which when loaded will add new records
+Xinto your BBDB database if they don't yet exist--existing BBDB records
+Xwill not be modified.
+X
+X\section{General Facilities for Input Filtering}
+X
+XThe result of running an input filter is to produce a new buffer a
+Xseries of \code{bif-create-record} \findex{bif-create-record}
+Xexpressions, each corresponding to a single user's record. Notice
+Xthat input filters do not directly modify the contents of the BBDB
+Xfiles (typically `\code{~/.bbdb}').
+X
+XTo actually modify the contents of the BBDB database, you must
+Xevaluated the expressions in the resultant buffer created by the input
+Xfilter. One way to do so is simply to invoke \code{M-x eval-buffer}.
+XAnother way is to simply save the buffer to disk and load its contents
+Xinto Emacs Lisp using \code{M-x load-file}.
+X
+X\section{UNIX Password Files}
+X
+XThe UNIX password file input filter is in file \code{bbdb-passwd.el}.
+X
+X\begin{enumerate}
+X
+X\item Use \code{M-x find-file} to visit the UNIX password file you wish to import.
+X
+X\findex{bbdb-passwd-input}
+X\item With the password file in the current buffer, invoke the input
+Xfilter \code{M-x bbdb-passwd-input}. You will be prompted for the
+Xdomain name associated with that host's password file; an organization
+Xname; as well as the file name to be associated with the buffer of
+X\code{bif-create-record} expressions.
+X
+X\item Evaluate the contents of the input filter's buffer to add records
+Xinto your BBDB database file.
+X
+X\end{enumerate}
+X
+X\chapter{Miscellany}
+X
+X\section{TODO List}
+X
+X\begin{itemize}
+X
+X\item Move generic input filter functionality out of
+X\code{bbdb-passwd.el} and into, say, \code{bbdb-ifilt.el}.
+XThe generic functionality code has names typically prefixed with \code{bif-}.
+X
+X\item Add support for \code{gdbload} (as an alternative to the
+XXlate/Merge application provided in the HP 200LX Connectivity Pack)
+Xinto the HP 200LX output filter. This is based on input from Robert
+XNicholson \code{<robert@steffi.dircon.co.uk>}.
+X
+X\item Add documentation for variables in the various input and output filters.
+X
+X\item Check and document all dependencies on other packages.
+X
+X\end{itemize}
+X
+X\section{Credits}
+X
+XPean Lim \code{<pean@neda.com>} wrote most of this package. Mohsen
+XBanan \code{<mohsen@neda.com>} put it all together and guided the
+Xwork. Neda Communications, Inc. sponsored the work. The output
+Xfilters code is based on \code{bbdb-print} by Boris Goldowsky\\
+X\code{<boris@prodigal.psych.rochester.edu>}.
+X
+X\c ;;;;;;;;;;;;;;;; Appendix Starts Here ;;;;;;;;;;;;;
+X\appendix
+X
+X\mbinput{lgpl.tex}
+X
+X\begin{tex}
+X%\bibliography{/usr/local/lib/bib/gnu,/usr/local/lib/bib/networking,/usr/local/lib/bib/directory,/usr/local/lib/bib/rfcs}
+X\end{tex}
+X
+X\c \twocolumn
+X\node Concept Index, Top, First Chapter, Top
+X\unnumbered{Concept Index}
+X
+X\printindex{cp}
+X
+X\H \htmlprintindex
+X
+X\node Command Index, Top, First Chapter, Top
+X\unnumbered{Command Index}
+X
+X\printindex{fn}
+X
+X\end{document}
+X
+END_OF_FILE
+if test 15557 -ne `wc -c <'doc/main.texinfo'`; then
+ echo shar: \"'doc/main.texinfo'\" unpacked with wrong size!
+fi
+# end of 'doc/main.texinfo'
+fi
+if test -f 'doc/lgpl.tex' -a "${1}" != "-c" ; then
+ echo shar: Will not clobber existing file \"'doc/lgpl.tex'\"
+else
+echo shar: Extracting \"'doc/lgpl.tex'\" \(25800 characters\)
+sed "s/^X//" >'doc/lgpl.tex' <<'END_OF_FILE'
+X\c This LGPL is meant to be included from other files.
+X\c To format a standalone LGPL, use liblic.texi.
+X
+X\chapter{GNU LIBRARY GENERAL PUBLIC LICENSE}
+X
+X\begin{center}
+XVersion 2, June 1991
+X\end{center}
+X
+X\begin{example}
+XCopyright \copyright{} 1991 Free Software Foundation, Inc.
+X675 Mass Ave, Cambridge, MA 02139, USA
+XEveryone is permitted to copy and distribute verbatim copies
+Xof this license document, but changing it is not allowed.
+X
+X[This is the first released version of the library GPL. It is
+X numbered 2 because it goes with version 2 of the ordinary GPL.]
+X\end{example}
+X
+X\section*{Preamble}
+X
+X The licenses for most software are designed to take away your
+Xfreedom to share and change it. By contrast, the GNU General Public
+XLicenses are intended to guarantee your freedom to share and change
+Xfree software---to make sure the software is free for all its users.
+X
+X This license, the Library General Public License, applies to some
+Xspecially designated Free Software Foundation software, and to any
+Xother libraries whose authors decide to use it. You can use it for
+Xyour libraries, too.
+X
+X When we speak of free software, we are referring to freedom, not
+Xprice. Our General Public Licenses are designed to make sure that you
+Xhave the freedom to distribute copies of free software (and charge for
+Xthis service if you wish), that you receive source code or can get it
+Xif you want it, that you can change the software or use pieces of it
+Xin new free programs; and that you know you can do these things.
+X
+X To protect your rights, we need to make restrictions that forbid
+Xanyone to deny you these rights or to ask you to surrender the rights.
+XThese restrictions translate to certain responsibilities for you if
+Xyou distribute copies of the library, or if you modify it.
+X
+X For example, if you distribute copies of the library, whether gratis
+Xor for a fee, you must give the recipients all the rights that we gave
+Xyou. You must make sure that they, too, receive or can get the source
+Xcode. If you link a program with the library, you must provide
+Xcomplete object files to the recipients so that they can relink them
+Xwith the library, after making changes to the library and recompiling
+Xit. And you must show them these terms so they know their rights.
+X
+X Our method of protecting your rights has two steps: (1) copyright
+Xthe library, and (2) offer you this license which gives you legal
+Xpermission to copy, distribute and/or modify the library.
+X
+X Also, for each distributor's protection, we want to make certain
+Xthat everyone understands that there is no warranty for this free
+Xlibrary. If the library is modified by someone else and passed on, we
+Xwant its recipients to know that what they have is not the original
+Xversion, so that any problems introduced by others will not reflect on
+Xthe original authors' reputations.
+X
+X Finally, any free program is threatened constantly by software
+Xpatents. We wish to avoid the danger that companies distributing free
+Xsoftware will individually obtain patent licenses, thus in effect
+Xtransforming the program into proprietary software. To prevent this,
+Xwe have made it clear that any patent must be licensed for everyone's
+Xfree use or not licensed at all.
+X
+X Most GNU software, including some libraries, is covered by the ordinary
+XGNU General Public License, which was designed for utility programs. This
+Xlicense, the GNU Library General Public License, applies to certain
+Xdesignated libraries. This license is quite different from the ordinary
+Xone; be sure to read it in full, and don't assume that anything in it is
+Xthe same as in the ordinary license.
+X
+X The reason we have a separate public license for some libraries is that
+Xthey blur the distinction we usually make between modifying or adding to a
+Xprogram and simply using it. Linking a program with a library, without
+Xchanging the library, is in some sense simply using the library, and is
+Xanalogous to running a utility program or application program. However, in
+Xa textual and legal sense, the linked executable is a combined work, a
+Xderivative of the original library, and the ordinary General Public License
+Xtreats it as such.
+X
+X Because of this blurred distinction, using the ordinary General
+XPublic License for libraries did not effectively promote software
+Xsharing, because most developers did not use the libraries. We
+Xconcluded that weaker conditions might promote sharing better.
+X
+X However, unrestricted linking of non-free programs would deprive the
+Xusers of those programs of all benefit from the free status of the
+Xlibraries themselves. This Library General Public License is intended to
+Xpermit developers of non-free programs to use free libraries, while
+Xpreserving your freedom as a user of such programs to change the free
+Xlibraries that are incorporated in them. (We have not seen how to achieve
+Xthis as regards changes in header files, but we have achieved it as regards
+Xchanges in the actual functions of the Library.) The hope is that this
+Xwill lead to faster development of free libraries.
+X
+X The precise terms and conditions for copying, distribution and
+Xmodification follow. Pay close attention to the difference between a
+X``work based on the library'' and a ``work that uses the library''. The
+Xformer contains code derived from the library, while the latter only
+Xworks together with the library.
+X
+X Note that it is possible for a library to be covered by the ordinary
+XGeneral Public License rather than by this special one.
+X
+X\begin{iftex}
+X\section*{TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION}
+X\end{iftex}
+X\begin{ifinfo}
+X\begin{center}
+XTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+X\end{center}
+X\end{ifinfo}
+X
+X\begin{enumerate}
+X\item
+XThis License Agreement applies to any software library which
+Xcontains a notice placed by the copyright holder or other authorized
+Xparty saying it may be distributed under the terms of this Library
+XGeneral Public License (also called ``this License''). Each licensee is
+Xaddressed as ``you''.
+X
+X A ``library'' means a collection of software functions and/or data
+Xprepared so as to be conveniently linked with application programs
+X(which use some of those functions and data) to form executables.
+X
+X The ``Library'', below, refers to any such software library or work
+Xwhich has been distributed under these terms. A ``work based on the
+XLibrary'' means either the Library or any derivative work under
+Xcopyright law: that is to say, a work containing the Library or a
+Xportion of it, either verbatim or with modifications and/or translated
+Xstraightforwardly into another language. (Hereinafter, translation is
+Xincluded without limitation in the term ``modification''.)
+X
+X ``Source code'' for a work means the preferred form of the work for
+Xmaking modifications to it. For a library, complete source code means
+Xall the source code for all modules it contains, plus any associated
+Xinterface definition files, plus the scripts used to control compilation
+Xand installation of the library.
+X
+X Activities other than copying, distribution and modification are not
+Xcovered by this License; they are outside its scope. The act of
+Xrunning a program using the Library is not restricted, and output from
+Xsuch a program is covered only if its contents constitute a work based
+Xon the Library (independent of the use of the Library in a tool for
+Xwriting it). Whether that is true depends on what the Library does
+Xand what the program that uses the Library does.
+X
+X\item
+XYou may copy and distribute verbatim copies of the Library's
+Xcomplete source code as you receive it, in any medium, provided that
+Xyou conspicuously and appropriately publish on each copy an
+Xappropriate copyright notice and disclaimer of warranty; keep intact
+Xall the notices that refer to this License and to the absence of any
+Xwarranty; and distribute a copy of this License along with the
+XLibrary.
+X
+X You may charge a fee for the physical act of transferring a copy,
+Xand you may at your option offer warranty protection in exchange for a
+Xfee.
+X
+X\item
+XYou may modify your copy or copies of the Library or any portion
+Xof it, thus forming a work based on the Library, and copy and
+Xdistribute such modifications or work under the terms of Section 1
+Xabove, provided that you also meet all of these conditions:
+X
+X\begin{enumerate}
+X\item
+XThe modified work must itself be a software library.
+X
+X\item
+XYou must cause the files modified to carry prominent notices
+Xstating that you changed the files and the date of any change.
+X
+X\item
+XYou must cause the whole of the work to be licensed at no
+Xcharge to all third parties under the terms of this License.
+X
+X\item
+XIf a facility in the modified Library refers to a function or a
+Xtable of data to be supplied by an application program that uses
+Xthe facility, other than as an argument passed when the facility
+Xis invoked, then you must make a good faith effort to ensure that,
+Xin the event an application does not supply such function or
+Xtable, the facility still operates, and performs whatever part of
+Xits purpose remains meaningful.
+X
+X(For example, a function in a library to compute square roots has
+Xa purpose that is entirely well-defined independent of the
+Xapplication. Therefore, Subsection 2d requires that any
+Xapplication-supplied function or table used by this function must
+Xbe optional: if the application does not supply it, the square
+Xroot function must still compute square roots.)
+X\end{enumerate}
+X
+XThese requirements apply to the modified work as a whole. If
+Xidentifiable sections of that work are not derived from the Library,
+Xand can be reasonably considered independent and separate works in
+Xthemselves, then this License, and its terms, do not apply to those
+Xsections when you distribute them as separate works. But when you
+Xdistribute the same sections as part of a whole which is a work based
+Xon the Library, the distribution of the whole must be on the terms of
+Xthis License, whose permissions for other licensees extend to the
+Xentire whole, and thus to each and every part regardless of who wrote
+Xit.
+X
+XThus, it is not the intent of this section to claim rights or contest
+Xyour rights to work written entirely by you; rather, the intent is to
+Xexercise the right to control the distribution of derivative or
+Xcollective works based on the Library.
+X
+XIn addition, mere aggregation of another work not based on the Library
+Xwith the Library (or with a work based on the Library) on a volume of
+Xa storage or distribution medium does not bring the other work under
+Xthe scope of this License.
+X
+X\item
+XYou may opt to apply the terms of the ordinary GNU General Public
+XLicense instead of this License to a given copy of the Library. To do
+Xthis, you must alter all the notices that refer to this License, so
+Xthat they refer to the ordinary GNU General Public License, version 2,
+Xinstead of to this License. (If a newer version than version 2 of the
+Xordinary GNU General Public License has appeared, then you can specify
+Xthat version instead if you wish.) Do not make any other change in
+Xthese notices.
+X
+X Once this change is made in a given copy, it is irreversible for
+Xthat copy, so the ordinary GNU General Public License applies to all
+Xsubsequent copies and derivative works made from that copy.
+X
+X This option is useful when you wish to copy part of the code of
+Xthe Library into a program that is not a library.
+X
+X\item
+XYou may copy and distribute the Library (or a portion or
+Xderivative of it, under Section 2) in object code or executable form
+Xunder the terms of Sections 1 and 2 above provided that you accompany
+Xit with the complete corresponding machine-readable source code, which
+Xmust be distributed under the terms of Sections 1 and 2 above on a
+Xmedium customarily used for software interchange.
+X
+X If distribution of object code is made by offering access to copy
+Xfrom a designated place, then offering equivalent access to copy the
+Xsource code from the same place satisfies the requirement to
+Xdistribute the source code, even though third parties are not
+Xcompelled to copy the source along with the object code.
+X
+X\item
+XA program that contains no derivative of any portion of the
+XLibrary, but is designed to work with the Library by being compiled or
+Xlinked with it, is called a ``work that uses the Library''. Such a
+Xwork, in isolation, is not a derivative work of the Library, and
+Xtherefore falls outside the scope of this License.
+X
+X However, linking a ``work that uses the Library'' with the Library
+Xcreates an executable that is a derivative of the Library (because it
+Xcontains portions of the Library), rather than a ``work that uses the
+Xlibrary''. The executable is therefore covered by this License.
+XSection 6 states terms for distribution of such executables.
+X
+X When a ``work that uses the Library'' uses material from a header file
+Xthat is part of the Library, the object code for the work may be a
+Xderivative work of the Library even though the source code is not.
+XWhether this is true is especially significant if the work can be
+Xlinked without the Library, or if the work is itself a library. The
+Xthreshold for this to be true is not precisely defined by law.
+X
+X If such an object file uses only numerical parameters, data
+Xstructure layouts and accessors, and small macros and small inline
+Xfunctions (ten lines or less in length), then the use of the object
+Xfile is unrestricted, regardless of whether it is legally a derivative
+Xwork. (Executables containing this object code plus portions of the
+XLibrary will still fall under Section 6.)
+X
+X Otherwise, if the work is a derivative of the Library, you may
+Xdistribute the object code for the work under the terms of Section 6.
+XAny executables containing that work also fall under Section 6,
+Xwhether or not they are linked directly with the Library itself.
+X
+X\item
+XAs an exception to the Sections above, you may also compile or
+Xlink a ``work that uses the Library'' with the Library to produce a
+Xwork containing portions of the Library, and distribute that work
+Xunder terms of your choice, provided that the terms permit
+Xmodification of the work for the customer's own use and reverse
+Xengineering for debugging such modifications.
+X
+X You must give prominent notice with each copy of the work that the
+XLibrary is used in it and that the Library and its use are covered by
+Xthis License. You must supply a copy of this License. If the work
+Xduring execution displays copyright notices, you must include the
+Xcopyright notice for the Library among them, as well as a reference
+Xdirecting the user to the copy of this License. Also, you must do one
+Xof these things:
+X
+X\begin{enumerate}
+X\item
+XAccompany the work with the complete corresponding
+Xmachine-readable source code for the Library including whatever
+Xchanges were used in the work (which must be distributed under
+XSections 1 and 2 above); and, if the work is an executable linked
+Xwith the Library, with the complete machine-readable ``work that
+Xuses the Library'', as object code and/or source code, so that the
+Xuser can modify the Library and then relink to produce a modified
+Xexecutable containing the modified Library. (It is understood
+Xthat the user who changes the contents of definitions files in the
+XLibrary will not necessarily be able to recompile the application
+Xto use the modified definitions.)
+X
+X\item
+XAccompany the work with a written offer, valid for at
+Xleast three years, to give the same user the materials
+Xspecified in Subsection 6a, above, for a charge no more
+Xthan the cost of performing this distribution.
+X
+X\item
+XIf distribution of the work is made by offering access to copy
+Xfrom a designated place, offer equivalent access to copy the above
+Xspecified materials from the same place.
+X
+X\item
+XVerify that the user has already received a copy of these
+Xmaterials or that you have already sent this user a copy.
+X\end{enumerate}
+X
+X For an executable, the required form of the ``work that uses the
+XLibrary'' must include any data and utility programs needed for
+Xreproducing the executable from it. However, as a special exception,
+Xthe source code distributed need not include anything that is normally
+Xdistributed (in either source or binary form) with the major
+Xcomponents (compiler, kernel, and so on) of the operating system on
+Xwhich the executable runs, unless that component itself accompanies
+Xthe executable.
+X
+X It may happen that this requirement contradicts the license
+Xrestrictions of other proprietary libraries that do not normally
+Xaccompany the operating system. Such a contradiction means you cannot
+Xuse both them and the Library together in an executable that you
+Xdistribute.
+X
+X\item
+XYou may place library facilities that are a work based on the
+XLibrary side-by-side in a single library together with other library
+Xfacilities not covered by this License, and distribute such a combined
+Xlibrary, provided that the separate distribution of the work based on
+Xthe Library and of the other library facilities is otherwise
+Xpermitted, and provided that you do these two things:
+X
+X\begin{enumerate}
+X\item
+XAccompany the combined library with a copy of the same work
+Xbased on the Library, uncombined with any other library
+Xfacilities. This must be distributed under the terms of the
+XSections above.
+X
+X\item
+XGive prominent notice with the combined library of the fact
+Xthat part of it is a work based on the Library, and explaining
+Xwhere to find the accompanying uncombined form of the same work.
+X\end{enumerate}
+X
+X\item
+XYou may not copy, modify, sublicense, link with, or distribute
+Xthe Library except as expressly provided under this License. Any
+Xattempt otherwise to copy, modify, sublicense, link with, or
+Xdistribute the Library is void, and will automatically terminate your
+Xrights under this License. However, parties who have received copies,
+Xor rights, from you under this License will not have their licenses
+Xterminated so long as such parties remain in full compliance.
+X
+X\item
+XYou are not required to accept this License, since you have not
+Xsigned it. However, nothing else grants you permission to modify or
+Xdistribute the Library or its derivative works. These actions are
+Xprohibited by law if you do not accept this License. Therefore, by
+Xmodifying or distributing the Library (or any work based on the
+XLibrary), you indicate your acceptance of this License to do so, and
+Xall its terms and conditions for copying, distributing or modifying
+Xthe Library or works based on it.
+X
+X\item
+XEach time you redistribute the Library (or any work based on the
+XLibrary), the recipient automatically receives a license from the
+Xoriginal licensor to copy, distribute, link with or modify the Library
+Xsubject to these terms and conditions. You may not impose any further
+Xrestrictions on the recipients' exercise of the rights granted herein.
+XYou are not responsible for enforcing compliance by third parties to
+Xthis License.
+X
+X\item
+XIf, as a consequence of a court judgment or allegation of patent
+Xinfringement or for any other reason (not limited to patent issues),
+Xconditions are imposed on you (whether by court order, agreement or
+Xotherwise) that contradict the conditions of this License, they do not
+Xexcuse you from the conditions of this License. If you cannot
+Xdistribute so as to satisfy simultaneously your obligations under this
+XLicense and any other pertinent obligations, then as a consequence you
+Xmay not distribute the Library at all. For example, if a patent
+Xlicense would not permit royalty-free redistribution of the Library by
+Xall those who receive copies directly or indirectly through you, then
+Xthe only way you could satisfy both it and this License would be to
+Xrefrain entirely from distribution of the Library.
+X
+XIf any portion of this section is held invalid or unenforceable under any
+Xparticular circumstance, the balance of the section is intended to apply,
+Xand the section as a whole is intended to apply in other circumstances.
+X
+XIt is not the purpose of this section to induce you to infringe any
+Xpatents or other property right claims or to contest validity of any
+Xsuch claims; this section has the sole purpose of protecting the
+Xintegrity of the free software distribution system which is
+Ximplemented by public license practices. Many people have made
+Xgenerous contributions to the wide range of software distributed
+Xthrough that system in reliance on consistent application of that
+Xsystem; it is up to the author/donor to decide if he or she is willing
+Xto distribute software through any other system and a licensee cannot
+Ximpose that choice.
+X
+XThis section is intended to make thoroughly clear what is believed to
+Xbe a consequence of the rest of this License.
+X
+X\item
+XIf the distribution and/or use of the Library is restricted in
+Xcertain countries either by patents or by copyrighted interfaces, the
+Xoriginal copyright holder who places the Library under this License may add
+Xan explicit geographical distribution limitation excluding those countries,
+Xso that distribution is permitted only in or among countries not thus
+Xexcluded. In such case, this License incorporates the limitation as if
+Xwritten in the body of this License.
+X
+X\item
+XThe Free Software Foundation may publish revised and/or new
+Xversions of the Library General Public License from time to time.
+XSuch new versions will be similar in spirit to the present version,
+Xbut may differ in detail to address new problems or concerns.
+X
+XEach version is given a distinguishing version number. If the Library
+Xspecifies a version number of this License which applies to it and
+X``any later version'', you have the option of following the terms and
+Xconditions either of that version or of any later version published by
+Xthe Free Software Foundation. If the Library does not specify a
+Xlicense version number, you may choose any version ever published by
+Xthe Free Software Foundation.
+X
+X\item
+XIf you wish to incorporate parts of the Library into other free
+Xprograms whose distribution conditions are incompatible with these,
+Xwrite to the author to ask for permission. For software which is
+Xcopyrighted by the Free Software Foundation, write to the Free
+XSoftware Foundation; we sometimes make exceptions for this. Our
+Xdecision will be guided by the two goals of preserving the free status
+Xof all derivatives of our free software and of promoting the sharing
+Xand reuse of software generally.
+X
+X\begin{iftex}
+X\section*{NO WARRANTY}
+X\end{iftex}
+X\begin{ifinfo}
+X\begin{center}
+XNO WARRANTY
+X\end{center}
+X\end{ifinfo}
+X
+X\item
+XBECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+XWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+XEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+XOTHER PARTIES PROVIDE THE LIBRARY ``AS IS'' WITHOUT WARRANTY OF ANY
+XKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+XIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+XPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+XLIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+XTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+X
+X\item
+XIN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+XWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+XAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+XFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+XCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+XLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+XRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+XFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+XSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+XDAMAGES.
+X\end{enumerate}
+X
+X\begin{iftex}
+X\section*{END OF TERMS AND CONDITIONS}
+X\end{iftex}
+X\begin{ifinfo}
+X\begin{center}
+XEND OF TERMS AND CONDITIONS
+X\end{center}
+X\end{ifinfo}
+X
+X\clearpage
+X
+X\section*{How to Apply These Terms to Your New Libraries}
+X
+X If you develop a new library, and you want it to be of the greatest
+Xpossible use to the public, we recommend making it free software that
+Xeveryone can redistribute and change. You can do so by permitting
+Xredistribution under these terms (or, alternatively, under the terms of the
+Xordinary General Public License).
+X
+X To apply these terms, attach the following notices to the library. It is
+Xsafest to attach them to the start of each source file to most effectively
+Xconvey the exclusion of warranty; and each file should have at least the
+X``copyright'' line and a pointer to where the full notice is found.
+X
+X\begin{smallexample}
+X\var{one line to give the library's name and an idea of what it does.}
+XCopyright (C) \var{year} \var{name of author}
+X
+XThis library is free software; you can redistribute it and/or
+Xmodify it under the terms of the GNU Library General Public
+XLicense as published by the Free Software Foundation; either
+Xversion 2 of the License, or (at your option) any later version.
+X
+XThis library is distributed in the hope that it will be useful,
+Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
+XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+XLibrary General Public License for more details.
+X
+XYou should have received a copy of the GNU Library General Public
+XLicense along with this library; if not, write to the
+XFree Software Foundation, Inc., 675 Mass Ave, Cambridge,
+XMA 02139, USA.
+X\end{smallexample}
+X
+XAlso add information on how to contact you by electronic and paper mail.
+X
+XYou should also get your employer (if you work as a programmer) or your
+Xschool, if any, to sign a ``copyright disclaimer'' for the library, if
+Xnecessary. Here is a sample; alter the names:
+X
+X\begin{example}
+XYoyodyne, Inc., hereby disclaims all copyright interest in
+Xthe library `Frob' (a library for tweaking knobs) written
+Xby James Random Hacker.
+X
+X\var{signature of Ty Coon}, 1 April 1990
+XTy Coon, President of Vice
+X\end{example}
+X
+XThat's all there is to it!
+END_OF_FILE
+if test 25800 -ne `wc -c <'doc/lgpl.tex'`; then
+ echo shar: \"'doc/lgpl.tex'\" unpacked with wrong size!
+fi
+# end of 'doc/lgpl.tex'
+fi
+if test -f 'doc/makefile' -a "${1}" != "-c" ; then
+ echo shar: Will not clobber existing file \"'doc/makefile'\"
+else
+echo shar: Extracting \"'doc/makefile'\" \(3859 characters\)
+sed "s/^X//" >'doc/makefile' <<'END_OF_FILE'
+X#
+X# RCS makefile,v 1.1.1.1 1995/08/07 08:43:10 mohsen Exp
+X#
+X
+X# The name of the file
+XMANUAL=main
+XINFOFILE= bbdb-filters.info
+X
+XTEXPARTS =
+X
+XEPSFIGS =
+X
+XTGRINDS =
+X
+XEOEBASE = /usr/public/eoe/lisp/public/bbdbPlus
+XEOEINFO = /usr/public/eoe/info
+X
+X# The name of your DVI to PS filter
+XDVIPS=dvips -f
+X
+X# The name of your GNU Emacs
+XEMACS= xemacs
+X
+XLATEXINFO= /usr/public/tex/latexinfo1.7
+X
+X###
+X### SHOUL NOT HAVE TO TOUCH ANYTHING BELOW HERE
+X###
+XSHELL=/bin/sh
+X
+X.SUFFIXES:
+X.SUFFIXES: .lpr .ps .tty .xdvi .dvi .tex .ptex .eps .fig .c
+X
+X.fig.eps:
+X fig2dev -L ps $< > $@
+X
+X.c.tex:
+X tgrind -f $< > $@
+X
+X
+X# DEFAULT TARGET
+X#all: $(INFOFILE) $(MANUAL).ps
+Xall: fast.ps
+X
+X$(INFOFILE): $(MANUAL).tex $(TEXPARTS)
+X rm -f makeinfo.el
+X sed -e "s+MANUAL+$(MANUAL)+" \
+X -e "s+LATEXINFO+$(LATEXINFO)+" $(LATEXINFO)/local/makeinfo.tmplt > makeinfo.el
+X $(EMACS) -batch -q -l makeinfo.el
+X #cp $(INFOFILE) /usr/public/eoe/info
+X
+X$(MANUAL).tex: $(MANUAL).texinfo $(TEXPARTS)
+X sed -e "s+INFOFILE+$(INFOFILE)+" $(MANUAL).texinfo | expand > $(MANUAL).tex
+X -rm -f maketex.el
+X sed -e "s+MANUAL+$(MANUAL)+" \
+X -e "s+LATEXINFO+$(LATEXINFO)+" $(LATEXINFO)/local/maketex.tmplt > maketex.el
+X $(EMACS) -batch -q -l maketex.el
+X
+X$(MANUAL).hyperlatex: $(MANUAL).texinfo $(TEXPARTS)
+X sed -e "s+INFOFILE+$(INFOFILE)+" $(MANUAL).texinfo | expand > $(MANUAL).hyperlatex
+X -rm -f makehyperlatex.el
+X sed -e "s+MANUAL+$(MANUAL)+" \
+X -e "s+LATEXINFO+$(LATEXINFO)+" $(LATEXINFO)/local/makehyperlatex.tmplt > makehyperlatex.el
+X $(EMACS) -batch -q -l makehyperlatex.el
+X
+X$(MANUAL).dvi: $(MANUAL).tex $(EPSFIGS) $(TGRINDS)
+X latex2dvi $(MANUAL).tex
+X
+X$(MANUAL).bbl:
+X latex $(MANUAL)
+X -bibtex $(MANUAL)
+X latex $(MANUAL)
+X
+X$(MANUAL).xdvi: $(MANUAL).dvi
+X xdvi $(MANUAL).dvi &
+X
+X$(MANUAL).ps: $(MANUAL).dvi
+X $(DVIPS) $(MANUAL) > $(MANUAL).ps
+X
+X$(MANUAL).lpr: $(MANUAL).ps
+X lpr $(MANUAL).ps
+X
+Xinfo: $(INFOFILE)
+X -echo Built $(INFOFILE)
+X
+X$(MANUAL).html: $(MANUAL)/$(MANUAL).html
+X -echo Building $(MANUAL)/$(MANUAL).html
+X
+X$(MANUAL)/$(MANUAL).html: $(MANUAL).dvi $(MANUAL).htmlTex
+X /usr/public/src/Sol-2/networking/www/latex2html-95.1/latex2html $(MANUAL).tex
+X
+XEMACSBASE = /opt/public/networking/www/hyperlatex-1.3/emacs
+X
+Xhtml: $(MANUAL).hyperlatex # $(MANUAL).dvi
+X -mkdir bbdbFilters
+X $(EMACS) -batch -no-init-file -no-site-file \
+X -l $(EMACSBASE)/hyperlatex1.el -funcall batch-hyperlatex-format $(MANUAL).hyperlatex
+X echo latex \'\\def\\makegifs{}\\input{$(MANUAL).hyperlatex}\' > dolatex.sh
+X #sh dolatex.sh ; /bin/rm dolatex.sh
+X #sh $(MANUAL).makegif
+X
+Xinstall: $(INFOFILE)
+X cp $(INFOFILE) $(EOEINFO)/$(INFOFILE)
+X
+X#
+X# Fast Processing
+X#
+X
+Xfast.tex: $(MANUAL).texinfo $(TEXPARTS)
+X sed -e "s+INFOFILE+$(INFOFILE)+" -e "s+mbinput+input+" $(MANUAL).texinfo | expand > fast.tex
+X
+Xfast.dvi: fast.tex $(EPSFIGS) $(TGRINDS)
+X latex fast.tex
+X
+Xfast.xdvi: fast.dvi
+X xdvi fast.dvi &
+X
+Xfast.ps: fast.dvi
+X $(DVIPS) fast > fast.ps
+X
+Xfast.xps: fast.ps
+X pageview fast.ps &
+X
+Xfast.lpr: fast.ps
+X lpr fast.ps
+X
+X
+X# TeX Figures for when dvi files are needed. Just an example
+X#XX.tex YY.tex: XX.fig YY.fig
+X# transfig -m 1.00 -L eepic -M fig.make XX.fig YY.fig
+X# make -f fig.make
+X
+X# Encapsulated PostScript figures -- Done by the Suffix rules
+X#XX.eps: XX.fig
+X# fig2dev -L ps -m 1.0 $< > $@
+X
+X# Src Code
+X#cot-calling.tex: cot-calling.c
+X# tgrind -f $< > $@
+X
+X
+Xshar::
+X split $(MANUAL).tex $(MANUAL)-
+X
+Xclean:
+X rm -f $(MANUAL).log $(MANUAL).blg makeinfo.el maketex.el *~ #~
+X
+Xveryclean: clean
+X rm -f $(MANUAL).ps $(MANUAL).dvi $(MANUAL).dlog $(MANUAL).info
+X
+Xrealclean: veryclean
+X rm -f $(MANUAL).aux $(MANUAL).bbl $(MANUAL).blg $(MANUAL).cp \
+X $(MANUAL).toc $(MANUAL).cps $(MANUAL).lot $(MANUAL).lof fig.make \
+X $(MANUAL).auxO $(MANUAL).fn $(MANUAL).fns \
+X transfig.tex $(MANUAL).tex $(INFOFILE) \
+X $(MANUAL).hyperlatex makehyperlatex.el dolatex.sh \
+X fast.aux fast.dvi fast.log fast.ps fast.tex fast.toc fast.cp fast.fn \
+X $(EPSFIGS) $(TGRINDS)
+X
+END_OF_FILE
+if test 3859 -ne `wc -c <'doc/makefile'`; then
+ echo shar: \"'doc/makefile'\" unpacked with wrong size!
+fi
+# end of 'doc/makefile'
+fi
+if test ! -d 'doc/formatted' ; then
+ echo shar: Creating directory \"'doc/formatted'\"
+ mkdir 'doc/formatted'
+fi
+if test -f 'doc/formatted/bbdb-filters.info' -a "${1}" != "-c" ; then
+ echo shar: Will not clobber existing file \"'doc/formatted/bbdb-filters.info'\"
+else
+echo shar: Extracting \"'doc/formatted/bbdb-filters.info'\" \(44122 characters\)
+sed "s/^X//" >'doc/formatted/bbdb-filters.info' <<'END_OF_FILE'
+XInfo file: bbdb-filters.info, -*-Text-*-
+Xproduced by latexinfo-format-buffer
+Xfrom file: main.tex
+X
+X
+X
+XFile: bbdb-filters.info Node: Top, Prev: (dir), Up: (dir), Next: Introduction
+X
+X{BBDB Filters}
+X
+X{6}
+X
+XCopyright (C)1995 NEDA COMMUNICATIONS, INC.
+X
+X
+X* Menu:
+X
+X* Introduction::
+X* Output Filters::
+X* Input Filters::
+X* Miscellany::
+X* GNU LIBRARY GENERAL PUBLIC LICENSE::
+X* Concept Index::
+X* Command Index::
+X
+X --- The Detailed Node Listing ---
+X
+XIntroduction
+X
+X* About This Package::
+X* About This Manual::
+X
+XOutput Filters
+X
+X* HP 200LX Phone Book::
+X* PC Eudora::
+X* Lotus cc:Mail Nicknames::
+X* PH::
+X* Emacs Lisp Export::
+X
+XPC Eudora
+X
+X* PC Eudora Nickname Database::
+X* PC Eudora Recipient Database::
+X
+XInput Filters
+X
+X* General Facilities for Input Filtering::
+X* UNIX Password Files::
+X
+XMiscellany
+X
+X* TODO List::
+X* Credits::
+X
+XGNU LIBRARY GENERAL PUBLIC LICENSE
+X
+X* Preamble::
+X* TERMS AND CONDITIONS FOR COPYING:: *
+X* NO WARRANTY::
+X* END OF TERMS AND CONDITIONS::
+X* How to Apply These Terms to Your New Libraries::
+X
+X
+X
+XFile: bbdb-filters.info Node: Introduction, Prev: Top, Up: Top, Next: Output Filters
+X
+XIntroduction
+X************
+X
+X
+XOver time much valuable data has been gathered in BBDB database files.
+XMany wish to share parts or all of this information with others. They
+Xalso wish to have access to this same information from other systems
+X(like personal digital assistants) lacking straightforward BBDB
+Xaccess.
+X
+XFor these reasons, we have prepared a family of filters that convert
+Xthe information in BBDB to and from a variety of other
+Xformats. "Output filters" export BBDB information to other formats
+Xwhile "input filters" import information from other formats into
+XBBDB.
+X
+XOur hope is that over time this collection of BBDB filters will grow
+Xthrough contributed code.
+X
+X
+X* Menu:
+X
+X* About This Package::
+X* About This Manual::
+X
+X
+X
+XFile: bbdb-filters.info Node: About This Package, Prev: Introduction, Up: Introduction, Next: About This Manual
+X
+XAbout This Package
+X==================
+X
+X
+XThis package is a collection of filters and is called "BBDB Input and
+XOutput Filters". It has been somewhat tested with BBDB version 1.50.
+XThe present state of the software is still preliminary although it has
+Xproved useful.
+X
+X
+XFile: bbdb-filters.info Node: About This Manual, Prev: About This Package, Up: Introduction
+X
+XAbout This Manual
+X=================
+X
+X
+XThis documentation applies to Version 0.2 of the "BBDB Input and
+XOutput Filters" package. The documentation is presently skeletal and
+Xvery preliminary. It mostly provides the user with instructions for
+Xuse, and very little background is included. Familiarity with Emacs
+XLisp is assumed for some sections.
+X
+X
+XFile: bbdb-filters.info Node: Output Filters, Prev: Introduction, Up: Top, Next: Input Filters
+X
+XOutput Filters
+X**************
+X
+X
+X"Output filters" are used to export BBDB information into formats
+Xused by other systems.
+X
+XIn general, an output filter uses the contents of your
+X`*BBDB*' buffer as input. Note that output filters do not use
+XBBDB files (typically ``~/.bbdb'') directly.
+X
+XAn output filter is invoked by executing its associated lisp function.
+XThe name of the function is conventionally named `bbdb-<system>-output'
+X(e.g., `M-x bbdb-hp200lx-output').
+X
+XThe result of running an output filter is to create a new buffer that
+Xcontains the `*BBDB*' information appropriately transformed into a
+Xformat suitable for use by the target system. The new buffer is given
+Xa file name that you specify.
+X
+X
+X* Menu:
+X
+X* HP 200LX Phone Book::
+X* PC Eudora::
+X* Lotus cc:Mail Nicknames::
+X* PH::
+X* Emacs Lisp Export::
+X
+X
+X
+XFile: bbdb-filters.info Node: HP 200LX Phone Book, Prev: Output Filters, Up: Output Filters, Next: PC Eudora
+X
+XHP 200LX Phone Book
+X===================
+X
+X
+XThis package has only been tested on HP 200LX palmtop systems. It
+Xalso requires the "HP 200LX Connectivity Pack" for converting
+Xcomma-delimited ASCII files into binary .PDB files which are read by
+Xthe HP 200LX Phone Book application. Version 1.00 of the "HP 200LX
+XConnectivty Pack" was used for testing.
+X
+XThe HP 200LX output filter is in file `bbdb-hp200lx.el'.
+X
+X
+X
+X 1. Invoke `M-x bbdb' to populate the `*BBDB*' buffer
+X with the contents you wish to export.
+X
+X 2. Invoke ` bbdb-hp200lx-output' to create an ASCII .CDF
+X (Comma Delimited File).
+X
+X 3. Using Xlate/Merge option of HP Connectivity Pack convert the
+X .CDF file into a binary .PDB file used by the Phone Book program.
+X
+X 4. Download the .PDB file to your palmtop's internal disk and
+X ensure that the Phone Book program is set use the newly downloaded
+X .PDB file.
+X
+X
+X
+X
+XFile: bbdb-filters.info Node: PC Eudora, Prev: HP 200LX Phone Book, Up: Output Filters, Next: Lotus cc:Mail Nicknames
+X
+XPC Eudora
+X=========
+X
+X
+XBBDB information can be exported to PC Eudora in two formats--as a
+Xnickname database file and as a recipients database file.
+X
+XThe PC Eudora output filter is in file `bbdb-eudora.el'.
+X
+X* Menu:
+X
+X* PC Eudora Nickname Database::
+X* PC Eudora Recipient Database::
+X
+X
+X
+XFile: bbdb-filters.info Node: PC Eudora Nickname Database, Prev: PC Eudora, Up: PC Eudora, Next: PC Eudora Recipient Database
+X
+XPC Eudora Nickname Database
+X---------------------------
+X
+X
+X
+X 1. Invoke `M-x bbdb' to populate the `*BBDB*' buffer
+X with the contents you wish to export.
+X
+X 2. Invoke `bbdb-eudora-nndbase-output' to create a PC Eudora
+X Nickname database file.
+X
+X 3. Make the file accessible to PC Eudora.
+X
+X
+X
+X
+XFile: bbdb-filters.info Node: PC Eudora Recipient Database, Prev: PC Eudora Nickname Database, Up: PC Eudora
+X
+XPC Eudora Recipient Database
+X----------------------------
+X
+X
+X
+X 1. Invoke `M-x bbdb' to populate the `*BBDB*' buffer
+X with the contents you wish to export.
+X
+X 2. Invoke `bbdb-eudora-rcpdbase-output' to create a PC Eudora
+X recipient's database file.
+X
+X 3. Make the file accessible to PC Eudora.
+X
+X
+X
+X
+XFile: bbdb-filters.info Node: Lotus cc:Mail Nicknames, Prev: PC Eudora, Up: Output Filters, Next: PH
+X
+XLotus cc:Mail Nicknames
+X=======================
+X
+X
+XThe Lotus cc:Mail output filter is in file `bbdb-ccmail.el'.
+X
+X
+X 1. Invoke `M-x bbdb' to populate the `*BBDB*' buffer
+X with the contents you wish to export.
+X
+X 2. Invoke ` bbdb-ccmail-output' to create a cc:Mail Nicknames file.
+X
+X 3. Make the file accessible to cc:Mail.
+X
+X
+X
+X
+XFile: bbdb-filters.info Node: PH, Prev: Lotus cc:Mail Nicknames, Up: Output Filters, Next: Emacs Lisp Export
+X
+XPH
+X==
+X
+X
+XThe PH output filter is in file `bbdb-ph.el'.
+X
+X
+X 1. Invoke `M-x bbdb' to populate the `*BBDB*' buffer
+X with the contents you wish to export.
+X
+X 2. Invoke `bbdb-ph-output' to create a `ph' data file for
+X use with the `maked' program.
+X
+X 3. Make the file accessible to `ph'.
+X
+X
+X
+X
+XFile: bbdb-filters.info Node: Emacs Lisp Export, Prev: PH, Up: Output Filters
+X
+XEmacs Lisp Export
+X=================
+X
+X
+XThe Emacs Lisp Export output filter is in file `bbdb-export.el'.
+X
+XThis output filter uses the current contents of your
+X`*BBDB*' buffer to generate a new buffer (`*BBDB* Export')
+Xthat contains a single lisp `(progn ...)' expression. For
+Xexample, a `*BBDB*' buffer containing two records would result in
+Xthe following `*BBDB* Export' buffer:
+X
+X
+X ;;; ======= Start of Exported BBDB Records =======
+X (progn
+X (require 'bbdb-com)
+X (defun bbdb-maybe-create (name company net &optional addrs phones notes)
+X "Try to add a record to BBDB if it does not already exist."
+X (condition-case err
+X (progn
+X (bbdb-create-internal name company net addrs phones notes)
+X (message "%s %s added." name (if net (concat "<" net ">") ""))
+X (sleep-for 1))
+X (error (ding)
+X (message "%s %s skipped. (%s)"
+X name
+X (if net (concat "<" net ">") "")
+X (car (cdr err)))
+X (sleep-for 1))))
+X
+X (bbdb-maybe-create "Jill Doe--IMPORTED"
+X "CBS Corporation"
+X '("jilld@cbs.com")
+X '(
+X ["Home"
+X "368 222ND PL"
+X ""
+X ""
+X "Springfield"
+X "MA" 2117]
+X )
+X '(
+X ["Office" 617 555 9983 0]
+X ) '"Movie Mogul")
+X (bbdb-maybe-create "John Doe--IMPORTED"
+X "ABC Incorporated"
+X '("jdoe@abc.com")
+X '(
+X ["Office"
+X "123 Any Street"
+X ""
+X ""
+X "Any Town"
+X "WA" (98027 7758)]
+X )
+X '(
+X ["Office" 206 555 1234 0]
+X ) '"TV Producer")
+X )
+X ;;; ======= End of Exported BBDB Records =======
+X
+X
+XThis lisp expression can then be sent via email or some other
+Xtext-based messaging facility to another user who can then evaluate
+Xthe expression which will add the `BBDB' records to the
+Xrecipient's
+X`BBDB' database.
+X
+XOnly new records are added. A record with the same name or net
+Xaddress as one already existing in the `BBDB' is skipped
+Xentirely.
+X
+XIn the sample contents of a `*BBDB* Export' buffer presented, two
+Xrecords are being exported--one for "John Doe" and the other for
+X"Jill Doe". Notice that their names have been appended with
+X`--IMPORTED'. This string can be used to quick locate each record
+Xthat is added to the database using this mechanism.
+X
+XThe following steps are for exporting BBDB records into Emacs Lisp:
+X
+X
+X 1. Invoke `M-x bbdb' to populate the `*BBDB*' buffer
+X with the contents you wish to export.
+X
+X 2. Invoke `bbdb-export' to create a `*BBDB* Export' buffer which contains a
+X single `(progn ...)' can be evaluated to add the records to the
+X existing `BBDB' database (if the records do not already exist).
+X
+X 3. Use the contents of `*BBDB* Export' in email and other messaging systems.
+X
+X
+X
+XThe following steps are for a user wishing to import the contents of a
+X`*BBDB* Export' buffer's expression into his or her own database:
+X
+X
+X 1. Evaluate the region bounded by the lines
+X `;;; ======= Start of Exported BBDB Records ======='
+X and
+X `;;; ======= End of Exported BBDB Records ======='.
+X You can use such commands as
+X `M-x eval-region' or `M-x eval-last-sexp'.
+X
+X 2. Review the newly imported entries. To see them, invoke `M-x
+X bbdb' and specify `--IMPORTED' at the `Regular Expression'
+X prompt.
+X
+X 3. After reviewing the contents of the imported records, you may
+X wish to remove the `--IMPORTED' that is appended to the name by
+X `bbdb-export'.
+X
+X
+X
+X
+XFile: bbdb-filters.info Node: Input Filters, Prev: Output Filters, Up: Top, Next: Miscellany
+X
+XInput Filters
+X*************
+X
+X
+X"Input filters" are used to import into BBDB information from a
+Xforeign system's data file.
+X
+XThe name of the function is conventionally named
+X`bbdb-<system>-input' (e.g., `bbdb-passwd-input' is the name
+Xof the Emacs Lisp function for the UNIX password file input filter).
+X
+XIn general, an "input filter" expects the foreign system's data to
+Xbe in the current buffer. The contents of the current buffer are used
+Xto create an Emacs Lisp file which when loaded will add new records
+Xinto your BBDB database if they don't yet exist--existing BBDB records
+Xwill not be modified.
+X
+X
+X* Menu:
+X
+X* General Facilities for Input Filtering::
+X* UNIX Password Files::
+X
+X
+X
+XFile: bbdb-filters.info Node: General Facilities for Input Filtering, Prev: Input Filters, Up: Input Filters, Next: UNIX Password Files
+X
+XGeneral Facilities for Input Filtering
+X======================================
+X
+X
+XThe result of running an input filter is to produce a new buffer a
+Xseries of `bif-create-record'
+Xexpressions, each corresponding to a single user's record. Notice
+Xthat input filters do not directly modify the contents of the BBDB
+Xfiles (typically ``~/.bbdb'').
+X
+XTo actually modify the contents of the BBDB database, you must
+Xevaluated the expressions in the resultant buffer created by the input
+Xfilter. One way to do so is simply to invoke `M-x eval-buffer'.
+XAnother way is to simply save the buffer to disk and load its contents
+Xinto Emacs Lisp using `M-x load-file'.
+X
+X
+XFile: bbdb-filters.info Node: UNIX Password Files, Prev: General Facilities for Input Filtering, Up: Input Filters
+X
+XUNIX Password Files
+X===================
+X
+X
+XThe UNIX password file input filter is in file `bbdb-passwd.el'.
+X
+X
+X 1. Use `M-x find-file' to visit the UNIX password file you wish to import.
+X
+X 2. With the password file in the current buffer, invoke the input
+X filter `M-x bbdb-passwd-input'. You will be prompted for the
+X domain name associated with that host's password file; an organization
+X name; as well as the file name to be associated with the buffer of
+X `bif-create-record' expressions.
+X
+X 3. Evaluate the contents of the input filter's buffer to add records
+X into your BBDB database file.
+X
+X
+X
+X
+XFile: bbdb-filters.info Node: Miscellany, Prev: Input Filters, Up: Top, Next: GNU LIBRARY GENERAL PUBLIC LICENSE
+X
+XMiscellany
+X**********
+X
+X
+X
+X* Menu:
+X
+X* TODO List::
+X* Credits::
+X
+X
+X
+XFile: bbdb-filters.info Node: TODO List, Prev: Miscellany, Up: Miscellany, Next: Credits
+X
+XTODO List
+X=========
+X
+X
+X
+X * Move generic input filter functionality out of
+X `bbdb-passwd.el' and into, say, `bbdb-ifilt.el'.
+X The generic functionality code has names typically prefixed with `bif-'.
+X
+X * Add support for `gdbload' (as an alternative to the
+X Xlate/Merge application provided in the HP 200LX Connectivity Pack)
+X into the HP 200LX output filter. This is based on input from Robert
+X Nicholson `<robert@steffi.dircon.co.uk>'.
+X
+X * Add documentation for variables in the various input and output filters.
+X
+X * Check and document all dependencies on other packages.
+X
+X
+X
+X
+XFile: bbdb-filters.info Node: Credits, Prev: TODO List, Up: Miscellany
+X
+XCredits
+X=======
+X
+X
+XPean Lim `<pean@neda.com>' wrote most of this package. Mohsen
+XBanan `<mohsen@neda.com>' put it all together and guided the
+Xwork. Neda Communications, Inc. sponsored the work. The output
+Xfilters code is based on `bbdb-print' by Boris Goldowsky
+X`<boris@prodigal.psych.rochester.edu>'.
+X
+X
+X
+XFile: bbdb-filters.info Node: GNU LIBRARY GENERAL PUBLIC LICENSE, Prev: Miscellany, Up: Top, Next: Concept Index
+X
+XGNU LIBRARY GENERAL PUBLIC LICENSE
+X**********************************
+X
+X
+X Version 2, June 1991
+X
+X
+X
+X Copyright (C) 1991 Free Software Foundation, Inc.
+X 675 Mass Ave, Cambridge, MA 02139, USA
+X Everyone is permitted to copy and distribute verbatim copies
+X of this license document, but changing it is not allowed.
+X
+X [This is the first released version of the library GPL. It is
+X numbered 2 because it goes with version 2 of the ordinary GPL.]
+X
+X
+X
+X* Menu:
+X
+X* Preamble::
+X* TERMS AND CONDITIONS FOR COPYING:: *
+X* NO WARRANTY::
+X* END OF TERMS AND CONDITIONS::
+X* How to Apply These Terms to Your New Libraries::
+X
+X
+X
+XFile: bbdb-filters.info Node: Preamble, Prev: GNU LIBRARY GENERAL PUBLIC LICENSE, Up: GNU LIBRARY GENERAL PUBLIC LICENSE, Next: TERMS AND CONDITIONS FOR COPYING
+X
+XPreamble
+X========
+X
+X
+X The licenses for most software are designed to take away your
+Xfreedom to share and change it. By contrast, the GNU General Public
+XLicenses are intended to guarantee your freedom to share and change
+Xfree software---to make sure the software is free for all its users.
+X
+X This license, the Library General Public License, applies to some
+Xspecially designated Free Software Foundation software, and to any
+Xother libraries whose authors decide to use it. You can use it for
+Xyour libraries, too.
+X
+X When we speak of free software, we are referring to freedom, not
+Xprice. Our General Public Licenses are designed to make sure that you
+Xhave the freedom to distribute copies of free software (and charge for
+Xthis service if you wish), that you receive source code or can get it
+Xif you want it, that you can change the software or use pieces of it
+Xin new free programs; and that you know you can do these things.
+X
+X To protect your rights, we need to make restrictions that forbid
+Xanyone to deny you these rights or to ask you to surrender the rights.
+XThese restrictions translate to certain responsibilities for you if
+Xyou distribute copies of the library, or if you modify it.
+X
+X For example, if you distribute copies of the library, whether gratis
+Xor for a fee, you must give the recipients all the rights that we gave
+Xyou. You must make sure that they, too, receive or can get the source
+Xcode. If you link a program with the library, you must provide
+Xcomplete object files to the recipients so that they can relink them
+Xwith the library, after making changes to the library and recompiling
+Xit. And you must show them these terms so they know their rights.
+X
+X Our method of protecting your rights has two steps: (1) copyright
+Xthe library, and (2) offer you this license which gives you legal
+Xpermission to copy, distribute and/or modify the library.
+X
+X Also, for each distributor's protection, we want to make certain
+Xthat everyone understands that there is no warranty for this free
+Xlibrary. If the library is modified by someone else and passed on, we
+Xwant its recipients to know that what they have is not the original
+Xversion, so that any problems introduced by others will not reflect on
+Xthe original authors' reputations.
+X
+X Finally, any free program is threatened constantly by software
+Xpatents. We wish to avoid the danger that companies distributing free
+Xsoftware will individually obtain patent licenses, thus in effect
+Xtransforming the program into proprietary software. To prevent this,
+Xwe have made it clear that any patent must be licensed for everyone's
+Xfree use or not licensed at all.
+X
+X Most GNU software, including some libraries, is covered by the ordinary
+XGNU General Public License, which was designed for utility programs. This
+Xlicense, the GNU Library General Public License, applies to certain
+Xdesignated libraries. This license is quite different from the ordinary
+Xone; be sure to read it in full, and don't assume that anything in it is
+Xthe same as in the ordinary license.
+X
+X The reason we have a separate public license for some libraries is that
+Xthey blur the distinction we usually make between modifying or adding to a
+Xprogram and simply using it. Linking a program with a library, without
+Xchanging the library, is in some sense simply using the library, and is
+Xanalogous to running a utility program or application program. However, in
+Xa textual and legal sense, the linked executable is a combined work, a
+Xderivative of the original library, and the ordinary General Public License
+Xtreats it as such.
+X
+X Because of this blurred distinction, using the ordinary General
+XPublic License for libraries did not effectively promote software
+Xsharing, because most developers did not use the libraries. We
+Xconcluded that weaker conditions might promote sharing better.
+X
+X However, unrestricted linking of non-free programs would deprive the
+Xusers of those programs of all benefit from the free status of the
+Xlibraries themselves. This Library General Public License is intended to
+Xpermit developers of non-free programs to use free libraries, while
+Xpreserving your freedom as a user of such programs to change the free
+Xlibraries that are incorporated in them. (We have not seen how to achieve
+Xthis as regards changes in header files, but we have achieved it as regards
+Xchanges in the actual functions of the Library.) The hope is that this
+Xwill lead to faster development of free libraries.
+X
+X The precise terms and conditions for copying, distribution and
+Xmodification follow. Pay close attention to the difference between a
+X"work based on the library" and a "work that uses the library". The
+Xformer contains code derived from the library, while the latter only
+Xworks together with the library.
+X
+X Note that it is possible for a library to be covered by the ordinary
+XGeneral Public License rather than by this special one.
+X
+X
+X TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+X
+X
+X
+X 1. This License Agreement applies to any software library which
+X contains a notice placed by the copyright holder or other authorized
+X party saying it may be distributed under the terms of this Library
+X General Public License (also called "this License"). Each licensee is
+X addressed as "you".
+X
+X A "library" means a collection of software functions and/or data
+X prepared so as to be conveniently linked with application programs
+X (which use some of those functions and data) to form executables.
+X
+X The "Library", below, refers to any such software library or work
+X which has been distributed under these terms. A "work based on the
+X Library" means either the Library or any derivative work under
+X copyright law: that is to say, a work containing the Library or a
+X portion of it, either verbatim or with modifications and/or translated
+X straightforwardly into another language. (Hereinafter, translation is
+X included without limitation in the term "modification".)
+X
+X "Source code" for a work means the preferred form of the work for
+X making modifications to it. For a library, complete source code means
+X all the source code for all modules it contains, plus any associated
+X interface definition files, plus the scripts used to control compilation
+X and installation of the library.
+X
+X Activities other than copying, distribution and modification are not
+X covered by this License; they are outside its scope. The act of
+X running a program using the Library is not restricted, and output from
+X such a program is covered only if its contents constitute a work based
+X on the Library (independent of the use of the Library in a tool for
+X writing it). Whether that is true depends on what the Library does
+X and what the program that uses the Library does.
+X
+X 2. You may copy and distribute verbatim copies of the Library's
+X complete source code as you receive it, in any medium, provided that
+X you conspicuously and appropriately publish on each copy an
+X appropriate copyright notice and disclaimer of warranty; keep intact
+X all the notices that refer to this License and to the absence of any
+X warranty; and distribute a copy of this License along with the
+X Library.
+X
+X You may charge a fee for the physical act of transferring a copy,
+X and you may at your option offer warranty protection in exchange for a
+X fee.
+X
+X 3. You may modify your copy or copies of the Library or any portion
+X of it, thus forming a work based on the Library, and copy and
+X distribute such modifications or work under the terms of Section 1
+X above, provided that you also meet all of these conditions:
+X
+X 1. The modified work must itself be a software library.
+X
+X 2. You must cause the files modified to carry prominent notices
+X stating that you changed the files and the date of any change.
+X
+X 3. You must cause the whole of the work to be licensed at no
+X charge to all third parties under the terms of this License.
+X
+X 4. If a facility in the modified Library refers to a function or a
+X table of data to be supplied by an application program that uses
+X the facility, other than as an argument passed when the facility
+X is invoked, then you must make a good faith effort to ensure that,
+X in the event an application does not supply such function or
+X table, the facility still operates, and performs whatever part of
+X its purpose remains meaningful.
+X
+X (For example, a function in a library to compute square roots has
+X a purpose that is entirely well-defined independent of the
+X application. Therefore, Subsection 2d requires that any
+X application-supplied function or table used by this function must
+X be optional: if the application does not supply it, the square
+X root function must still compute square roots.)
+X
+X
+X These requirements apply to the modified work as a whole. If
+X identifiable sections of that work are not derived from the Library,
+X and can be reasonably considered independent and separate works in
+X themselves, then this License, and its terms, do not apply to those
+X sections when you distribute them as separate works. But when you
+X distribute the same sections as part of a whole which is a work based
+X on the Library, the distribution of the whole must be on the terms of
+X this License, whose permissions for other licensees extend to the
+X entire whole, and thus to each and every part regardless of who wrote
+X it.
+X
+X Thus, it is not the intent of this section to claim rights or contest
+X your rights to work written entirely by you; rather, the intent is to
+X exercise the right to control the distribution of derivative or
+X collective works based on the Library.
+X
+X In addition, mere aggregation of another work not based on the Library
+X with the Library (or with a work based on the Library) on a volume of
+X a storage or distribution medium does not bring the other work under
+X the scope of this License.
+X
+X 4. You may opt to apply the terms of the ordinary GNU General Public
+X License instead of this License to a given copy of the Library. To do
+X this, you must alter all the notices that refer to this License, so
+X that they refer to the ordinary GNU General Public License, version 2,
+X instead of to this License. (If a newer version than version 2 of the
+X ordinary GNU General Public License has appeared, then you can specify
+X that version instead if you wish.) Do not make any other change in
+X these notices.
+X
+X Once this change is made in a given copy, it is irreversible for
+X that copy, so the ordinary GNU General Public License applies to all
+X subsequent copies and derivative works made from that copy.
+X
+X This option is useful when you wish to copy part of the code of
+X the Library into a program that is not a library.
+X
+X 5. You may copy and distribute the Library (or a portion or
+X derivative of it, under Section 2) in object code or executable form
+X under the terms of Sections 1 and 2 above provided that you accompany
+X it with the complete corresponding machine-readable source code, which
+X must be distributed under the terms of Sections 1 and 2 above on a
+X medium customarily used for software interchange.
+X
+X If distribution of object code is made by offering access to copy
+X from a designated place, then offering equivalent access to copy the
+X source code from the same place satisfies the requirement to
+X distribute the source code, even though third parties are not
+X compelled to copy the source along with the object code.
+X
+X 6. A program that contains no derivative of any portion of the
+X Library, but is designed to work with the Library by being compiled or
+X linked with it, is called a "work that uses the Library". Such a
+X work, in isolation, is not a derivative work of the Library, and
+X therefore falls outside the scope of this License.
+X
+X However, linking a "work that uses the Library" with the Library
+X creates an executable that is a derivative of the Library (because it
+X contains portions of the Library), rather than a "work that uses the
+X library". The executable is therefore covered by this License.
+X Section 6 states terms for distribution of such executables.
+X
+X When a "work that uses the Library" uses material from a header file
+X that is part of the Library, the object code for the work may be a
+X derivative work of the Library even though the source code is not.
+X Whether this is true is especially significant if the work can be
+X linked without the Library, or if the work is itself a library. The
+X threshold for this to be true is not precisely defined by law.
+X
+X If such an object file uses only numerical parameters, data
+X structure layouts and accessors, and small macros and small inline
+X functions (ten lines or less in length), then the use of the object
+X file is unrestricted, regardless of whether it is legally a derivative
+X work. (Executables containing this object code plus portions of the
+X Library will still fall under Section 6.)
+X
+X Otherwise, if the work is a derivative of the Library, you may
+X distribute the object code for the work under the terms of Section 6.
+X Any executables containing that work also fall under Section 6,
+X whether or not they are linked directly with the Library itself.
+X
+X 7. As an exception to the Sections above, you may also compile or
+X link a "work that uses the Library" with the Library to produce a
+X work containing portions of the Library, and distribute that work
+X under terms of your choice, provided that the terms permit
+X modification of the work for the customer's own use and reverse
+X engineering for debugging such modifications.
+X
+X You must give prominent notice with each copy of the work that the
+X Library is used in it and that the Library and its use are covered by
+X this License. You must supply a copy of this License. If the work
+X during execution displays copyright notices, you must include the
+X copyright notice for the Library among them, as well as a reference
+X directing the user to the copy of this License. Also, you must do one
+X of these things:
+X
+X 1. Accompany the work with the complete corresponding
+X machine-readable source code for the Library including whatever
+X changes were used in the work (which must be distributed under
+X Sections 1 and 2 above); and, if the work is an executable linked
+X with the Library, with the complete machine-readable "work that
+X uses the Library", as object code and/or source code, so that the
+X user can modify the Library and then relink to produce a modified
+X executable containing the modified Library. (It is understood
+X that the user who changes the contents of definitions files in the
+X Library will not necessarily be able to recompile the application
+X to use the modified definitions.)
+X
+X 2. Accompany the work with a written offer, valid for at
+X least three years, to give the same user the materials
+X specified in Subsection 6a, above, for a charge no more
+X than the cost of performing this distribution.
+X
+X 3. If distribution of the work is made by offering access to copy
+X from a designated place, offer equivalent access to copy the above
+X specified materials from the same place.
+X
+X 4. Verify that the user has already received a copy of these
+X materials or that you have already sent this user a copy.
+X
+X
+X For an executable, the required form of the "work that uses the
+X Library" must include any data and utility programs needed for
+X reproducing the executable from it. However, as a special exception,
+X the source code distributed need not include anything that is normally
+X distributed (in either source or binary form) with the major
+X components (compiler, kernel, and so on) of the operating system on
+X which the executable runs, unless that component itself accompanies
+X the executable.
+X
+X It may happen that this requirement contradicts the license
+X restrictions of other proprietary libraries that do not normally
+X accompany the operating system. Such a contradiction means you cannot
+X use both them and the Library together in an executable that you
+X distribute.
+X
+X 8. You may place library facilities that are a work based on the
+X Library side-by-side in a single library together with other library
+X facilities not covered by this License, and distribute such a combined
+X library, provided that the separate distribution of the work based on
+X the Library and of the other library facilities is otherwise
+X permitted, and provided that you do these two things:
+X
+X 1. Accompany the combined library with a copy of the same work
+X based on the Library, uncombined with any other library
+X facilities. This must be distributed under the terms of the
+X Sections above.
+X
+X 2. Give prominent notice with the combined library of the fact
+X that part of it is a work based on the Library, and explaining
+X where to find the accompanying uncombined form of the same work.
+X
+X
+X 9. You may not copy, modify, sublicense, link with, or distribute
+X the Library except as expressly provided under this License. Any
+X attempt otherwise to copy, modify, sublicense, link with, or
+X distribute the Library is void, and will automatically terminate your
+X rights under this License. However, parties who have received copies,
+X or rights, from you under this License will not have their licenses
+X terminated so long as such parties remain in full compliance.
+X
+X 10. You are not required to accept this License, since you have not
+X signed it. However, nothing else grants you permission to modify or
+X distribute the Library or its derivative works. These actions are
+X prohibited by law if you do not accept this License. Therefore, by
+X modifying or distributing the Library (or any work based on the
+X Library), you indicate your acceptance of this License to do so, and
+X all its terms and conditions for copying, distributing or modifying
+X the Library or works based on it.
+X
+X 11. Each time you redistribute the Library (or any work based on the
+X Library), the recipient automatically receives a license from the
+X original licensor to copy, distribute, link with or modify the Library
+X subject to these terms and conditions. You may not impose any further
+X restrictions on the recipients' exercise of the rights granted herein.
+X You are not responsible for enforcing compliance by third parties to
+X this License.
+X
+X 12. If, as a consequence of a court judgment or allegation of patent
+X infringement or for any other reason (not limited to patent issues),
+X conditions are imposed on you (whether by court order, agreement or
+X otherwise) that contradict the conditions of this License, they do not
+X excuse you from the conditions of this License. If you cannot
+X distribute so as to satisfy simultaneously your obligations under this
+X License and any other pertinent obligations, then as a consequence you
+X may not distribute the Library at all. For example, if a patent
+X license would not permit royalty-free redistribution of the Library by
+X all those who receive copies directly or indirectly through you, then
+X the only way you could satisfy both it and this License would be to
+X refrain entirely from distribution of the Library.
+X
+X If any portion of this section is held invalid or unenforceable under any
+X particular circumstance, the balance of the section is intended to apply,
+X and the section as a whole is intended to apply in other circumstances.
+X
+X It is not the purpose of this section to induce you to infringe any
+X patents or other property right claims or to contest validity of any
+X such claims; this section has the sole purpose of protecting the
+X integrity of the free software distribution system which is
+X implemented by public license practices. Many people have made
+X generous contributions to the wide range of software distributed
+X through that system in reliance on consistent application of that
+X system; it is up to the author/donor to decide if he or she is willing
+X to distribute software through any other system and a licensee cannot
+X impose that choice.
+X
+X This section is intended to make thoroughly clear what is believed to
+X be a consequence of the rest of this License.
+X
+X 13. If the distribution and/or use of the Library is restricted in
+X certain countries either by patents or by copyrighted interfaces, the
+X original copyright holder who places the Library under this License may add
+X an explicit geographical distribution limitation excluding those countries,
+X so that distribution is permitted only in or among countries not thus
+X excluded. In such case, this License incorporates the limitation as if
+X written in the body of this License.
+X
+X 14. The Free Software Foundation may publish revised and/or new
+X versions of the Library General Public License from time to time.
+X Such new versions will be similar in spirit to the present version,
+X but may differ in detail to address new problems or concerns.
+X
+X Each version is given a distinguishing version number. If the Library
+X specifies a version number of this License which applies to it and
+X "any later version", you have the option of following the terms and
+X conditions either of that version or of any later version published by
+X the Free Software Foundation. If the Library does not specify a
+X license version number, you may choose any version ever published by
+X the Free Software Foundation.
+X
+X 15. If you wish to incorporate parts of the Library into other free
+X programs whose distribution conditions are incompatible with these,
+X write to the author to ask for permission. For software which is
+X copyrighted by the Free Software Foundation, write to the Free
+X Software Foundation; we sometimes make exceptions for this. Our
+X decision will be guided by the two goals of preserving the free status
+X of all derivatives of our free software and of promoting the sharing
+X and reuse of software generally.
+X
+X
+X NO WARRANTY
+X
+X
+X
+X 16. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+X WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+X EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+X OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+X KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+X IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+X PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+X LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+X THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+X
+X 17. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+X WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+X AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+X FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+X CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+X LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+X RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+X FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+X SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+X DAMAGES.
+X
+X
+X
+X END OF TERMS AND CONDITIONS
+X
+X
+X
+X
+X
+XFile: bbdb-filters.info Node: How to Apply These Terms to Your New Libraries, Prev: END OF TERMS AND CONDITIONS, Up: GNU LIBRARY GENERAL PUBLIC LICENSE
+X
+XHow to Apply These Terms to Your New Libraries
+X==============================================
+X
+X
+X If you develop a new library, and you want it to be of the greatest
+Xpossible use to the public, we recommend making it free software that
+Xeveryone can redistribute and change. You can do so by permitting
+Xredistribution under these terms (or, alternatively, under the terms of the
+Xordinary General Public License).
+X
+X To apply these terms, attach the following notices to the library. It is
+Xsafest to attach them to the start of each source file to most effectively
+Xconvey the exclusion of warranty; and each file should have at least the
+X"copyright" line and a pointer to where the full notice is found.
+X
+X
+X ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES.
+X Copyright (C) YEAR NAME OF AUTHOR
+X
+X This library is free software; you can redistribute it and/or
+X modify it under the terms of the GNU Library General Public
+X License as published by the Free Software Foundation; either
+X version 2 of the License, or (at your option) any later version.
+X
+X This library is distributed in the hope that it will be useful,
+X but WITHOUT ANY WARRANTY; without even the implied warranty of
+X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+X Library General Public License for more details.
+X
+X You should have received a copy of the GNU Library General Public
+X License along with this library; if not, write to the
+X Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+X MA 02139, USA.
+X
+X
+XAlso add information on how to contact you by electronic and paper mail.
+X
+XYou should also get your employer (if you work as a programmer) or your
+Xschool, if any, to sign a "copyright disclaimer" for the library, if
+Xnecessary. Here is a sample; alter the names:
+X
+X
+X Yoyodyne, Inc., hereby disclaims all copyright interest in
+X the library `Frob' (a library for tweaking knobs) written
+X by James Random Hacker.
+X
+X SIGNATURE OF TY COON, 1 April 1990
+X Ty Coon, President of Vice
+X
+X
+XThat's all there is to it!
+X
+X
+X
+X
+XFile: bbdb-filters.info Node: Concept Index, Prev: GNU LIBRARY GENERAL PUBLIC LICENSE, Up: Top, Next: Command Index
+X
+XConcept Index
+X*************
+X
+X
+X
+X* Menu:
+X
+X* About This Manual: About This Manual.
+X* About This Package: About This Package.
+X* .CDF file, HP 200LX Phone Book: HP 200LX Phone Book.
+X* Credits: Credits.
+X* Emacs Lisp Export: Emacs Lisp Export.
+X* General Facilities for Input Filtering: General Facilities for Input Filtering.
+X* GNU LIBRARY GENERAL PUBLIC LICENSE: GNU LIBRARY GENERAL PUBLIC LICENSE.
+X* How to Apply These Terms to Your New Libraries: How to Apply These Terms to Your New Libraries.
+X* HP 200LX Connectivity Pack: HP 200LX Phone Book.
+X* HP 200LX Phone Book: HP 200LX Phone Book.
+X* Input Filters: Input Filters.
+X* Introduction: Introduction.
+X* Lotus cc:Mail Nicknames: Lotus cc:Mail Nicknames.
+X* Miscellany: Miscellany.
+X* Output Filters: Output Filters.
+X* PC Eudora Nickname Database: PC Eudora Nickname Database.
+X* PC Eudora: PC Eudora.
+X* PC Eudora Recipient Database: PC Eudora Recipient Database.
+X* .PDF file, HP 200LX Phone Book: HP 200LX Phone Book.
+X* PH: PH.
+X* Preamble: Preamble.
+X* Sending BBDB records via email: Emacs Lisp Export.
+X* TODO List: TODO List.
+X* UNIX Password Files: UNIX Password Files.
+X
+X
+X
+X
+XFile: bbdb-filters.info Node: Command Index, Prev: Concept Index, Up: Top
+X
+XCommand Index
+X*************
+X
+X
+X
+X* Menu:
+X
+X* bbdb-ccmail-output: Lotus cc:Mail Nicknames.
+X* bbdb-eudora-nndbase-output: PC Eudora Nickname Database.
+X* bbdb-eudora-rcpdbase-output: PC Eudora Recipient Database.
+X* bbdb-export: Emacs Lisp Export.
+X* bbdb-hp200lx-output: HP 200LX Phone Book.
+X* bbdb-passwd-input: UNIX Password Files.
+X* bbdb-ph-output: PH.
+X* bif-create-record: General Facilities for Input Filtering.
+X
+X
+END_OF_FILE
+echo shar: 23 control characters may be missing from \"'doc/formatted/bbdb-filters.info'\"
+if test 44122 -ne `wc -c <'doc/formatted/bbdb-filters.info'`; then
+ echo shar: \"'doc/formatted/bbdb-filters.info'\" unpacked with wrong size!
+fi
+# end of 'doc/formatted/bbdb-filters.info'
+fi
+echo shar: End of shell archive.
+exit 0
diff --git a/bits/bbdb-filters/bbdb-hp200lx.el b/bits/bbdb-filters/bbdb-hp200lx.el
new file mode 100644
index 0000000..fe3f00a
--- /dev/null
+++ b/bits/bbdb-filters/bbdb-hp200lx.el
@@ -0,0 +1,348 @@
+;;; This file is part of the BBDB Filters Package. BBDB Filters Package is a
+;;; collection of input and output filters for BBDB.
+;;;
+;;; Copyright (C) 1995 Neda Communications, Inc.
+;;; Prepared by Mohsen Banan (mohsen@neda.com)
+;;;
+;;; This library is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU Library General Public License as
+;;; published by the Free Software Foundation; either version 2 of the
+;;; License, or (at your option) any later version. This library is
+;;; distributed in the hope that it will be useful, but WITHOUT ANY
+;;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;;; License for more details. You should have received a copy of the GNU
+;;; Library General Public License along with this library; if not, write
+;;; to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+;;; USA.
+;;;
+;;; This is bbdb-hp200lx.el
+;;;
+;;;
+;;; RCS: bbdb-hp200lx.el,v 1.1.1.1 1995/08/07 08:43:09 mohsen Exp
+;;;
+;;; a copy-and-edit job on bbdb-print.el
+
+
+;;; To use this, add the following to your .emacs
+;;; and strip ";;;XXX"
+;;;
+
+;;;XXX;; BBDB HP200LX Filter
+;;;XXX(load "bbdb-hp200lx")
+
+;;;XXX(setq bbdb-hp200lx-filename
+;;;XXX (concat "/dos/u/" (user-login-name) "/bb-phone.cdf"))
+;;;XXX;;; - to output the *BBDB* buffer in HP200LX comma-delimited-file (.CDF)
+;;;XXX;;; format, invoke M-x bbdb-hp200lx-output
+;;;XXX;;;
+;;;XXX;;; - you may also want to modify default values of the following (use
+;;;XXX;;; M-x describe-variable for details):
+;;;XXX;;; bbdb-hp200lx-output-elide
+;;;XXX;;; bbdb-hp200lx-output-requires
+;;;XXX;;; bbdb-hp200lx-output-no-bare-names
+
+
+(require 'bbdb-print)
+(require 'basic-ext)
+
+
+(defvar bbdb-hp200lx-filename "~/bb-phone.cdf"
+ "*Default file name for bbdb-output-hp200lx printouts of BBDB database.")
+
+
+(defvar bbdb-hp200lx-output-elide '(net creation-date timestamp mail-alias)
+ "*List of symbols denoting BBDB fields NOT to be output.
+Valid symbols are: name comp net phones addrs. You can also use the
+tags for notes (e.g., creation-date).
+ e.g.: '(net creation-date)
+See also variable bbdb-hp200lx-output-requires.")
+
+
+(defvar bbdb-hp200lx-output-requires '(or name comp)
+ "*A boolean expression of 'and' and 'or' to be evaluated to determine if
+the current record should be output. Valid symbols for use
+in the boolean expression are: name comp net phones addrs notes.
+ e.g.: (and name (or comp addrs))
+See also variable bbdb-hp200lx-output-elide.
+")
+
+
+(defvar bbdb-hp200lx-output-no-bare-names t
+ "*A bare name is one with no information other than
+that in bbdb-hp200lx-output-requires. To avoid printing
+these set this variable to t")
+
+
+(defun bbdb-hp200lx-output (to-file)
+ "Print the selected BBDB entries"
+ (interactive (list (read-file-name "Print To File: " bbdb-hp200lx-filename)))
+ (setq bbdb-hp200lx-filename (expand-file-name to-file))
+ (let ((current-letter t)
+ (records (progn (set-buffer bbdb-buffer-name)
+ bbdb-records)))
+ (find-file bbdb-hp200lx-filename)
+ (delete-region (point-min) (point-max))
+ (while records
+ (setq current-letter
+ (boh-maybe-format-record (car (car records)) current-letter))
+ (setq records (cdr records)))
+ (goto-char (point-min))
+ (message "HP 200LX comma-delimited phonebook file %s generated." bbdb-hp200lx-filename)))
+
+
+(defun boh-maybe-format-record (record &optional current-letter brief)
+ "Insert the bbdb RECORD in Hp200lx format.
+Optional CURRENT-LETTER is the section we're in -- if this is non-nil and
+the first letter of the sortkey of the record differs from it, a new section
+heading will be output \(an arg of t will always produce a heading).
+The new current-letter is the return value of this function.
+Someday, optional third arg BRIEF will produce one-line format."
+ (bbdb-debug (if (bbdb-record-deleted-p record)
+ (error "plus ungood: formatting deleted record")))
+
+
+ (let* ((bbdb-elided-display bbdb-hp200lx-output-elide)
+ (first-letter
+ (substring (concat (bbdb-record-sortkey record) "?") 0 1))
+ (name (and (bbdb-field-shown-p 'name)
+ (or (bbdb-record-getprop record 'tex-name)
+ (bbdb-record-name record))))
+ (comp (and (bbdb-field-shown-p 'company)
+ (bbdb-record-company record)))
+ (net (and (bbdb-field-shown-p 'net)
+ (bbdb-record-net record)))
+ (phones (and (bbdb-field-shown-p 'phone)
+ (bbdb-record-phones record)))
+ (addrs (and (bbdb-field-shown-p 'address)
+ (bbdb-record-addresses record)))
+ (notes (bbdb-record-raw-notes record))
+ (begin (point))
+ (bare t))
+
+
+ ;; Section header, if neccessary.
+
+
+ (if (and current-letter (not (string-equal first-letter current-letter)))
+ (message "Now processing \"%s\" entries..." (upcase first-letter)))
+
+
+ (if (eval bbdb-hp200lx-output-requires)
+ (let (more-phones)
+
+
+ ;; HP 200LX last name field (maxlen 86 ??) -- used for BBDB name
+ ;;
+ (insert (format "\"%s\"," (boh-maybe-truncate name 86)))
+
+
+ ;; HP 200LX first name field (maxlen ??) -- unused
+ (insert ",")
+
+
+ ;; HP 200LX middle name field (maxlen ??) -- unused
+ ;;
+ (insert ",")
+
+
+ ;; Phone numbers
+ ;;
+ (let (business-phone home-phone fax-phone saved-case-fold)
+ (setq saved-case-fold case-fold-search
+ case-fold-search t)
+ (while phones
+ (let ((place (aref (car phones) 0))
+ (number (bbdb-phone-string (car phones))))
+ (cond ((or (string-match place "office")
+ (string-match place "work"))
+ (if (null business-phone)
+ (setq business-phone (list place number))
+ (setq more-phones (cons (list place number) more-phones))))
+ ((string-match place "home")
+ (if (null home-phone)
+ (setq home-phone (list place number))
+ (setq more-phones (cons (list place number) more-phones))))
+ ((or (string-match place "fax")
+ (string-match place "facsimile"))
+ (if (null fax-phone)
+ (setq fax-phone (list place number))
+ (setq more-phones (cons (list place number) more-phones))))
+ (t
+ (setq more-phones (cons (list place number) more-phones)))))
+ (setq phones (cdr phones)))
+
+
+ (setq case-fold-search saved-case-fold)
+
+
+ ;; HP 200LX business phone field (maxlen 29)
+ (if business-phone
+ (progn
+ (insert (format "\"%s\"," (boh-maybe-truncate
+ (format "%s" (car (cdr business-phone)))
+ 29)))
+ (setq bare nil))
+ (insert ","))
+
+
+ ;; HP 200LX home phone field (maxlen 29)
+ (if home-phone
+ (progn
+ (insert (format "\"%s\"," (boh-maybe-truncate
+ (format "%s" (car (cdr home-phone)))
+ 29)))
+ (setq bare nil))
+ (insert ","))
+
+
+ ;; HP 200LX alternate phone field (maxlen 29) -- unused
+ (insert ",")
+
+
+ ;; HP 200LX fax phone field (maxlen 29)
+ (if fax-phone
+ (progn
+ (insert (format "\"%s\"," (boh-maybe-truncate
+ (format "%s" (car (cdr fax-phone))) ; the description
+ 29)))
+ (setq bare nil))
+ (insert ","))
+ )
+
+
+ ;; HP 200LX title field (maxlen 38) -- unused
+ (insert ",")
+
+
+ ;; HP 200LX category field (maxlen 127) -- unused
+ (insert ",")
+
+
+ ;; HP 200LX company field (maxlen 82) -- used for BBDB company
+ (if comp
+ (insert (format "\"%s\"," (boh-maybe-truncate comp 82)))
+ (insert ","))
+
+
+ ;; Addresses
+ ;;
+ (let ((addr (car addrs)) ;just take the first bbdb address
+ hp-addr1 hp-addr2 hp-city hp-state hp-zip)
+
+ (if addr
+ (progn
+ (setq hp-addr1 (bbdb-address-street1 addr))
+ (setq hp-addr2 (concat (bbdb-address-street2 addr)
+ (if (and (> (length (bbdb-address-street2 addr)) 0)
+ (> (length (bbdb-address-street3 addr)) 0))
+ ", " "")
+ (bbdb-address-street3 addr)))
+ (setq hp-city (bbdb-address-city addr))
+ (setq hp-state (bbdb-address-state addr))
+ (setq hp-zip (bbdb-address-zip-string addr))))
+
+ ;; HP 200LX address 1 field (maxlen 82)
+ (if hp-addr1
+ (progn
+ (insert (format "\"%s\"," (boh-maybe-truncate hp-addr1 82)))
+ (setq bare nil))
+ (insert ","))
+
+ ;; HP 200LX address 2 field (maxlen 82)
+ (if hp-addr2
+ (progn
+ (insert (format "\"%s\"," (boh-maybe-truncate hp-addr2 82)))
+ (setq bare nil))
+ (insert ","))
+
+ ;; HP 200LX city field (maxlen 34)
+ (if hp-city
+ (progn
+ (insert (format "\"%s\"," (boh-maybe-truncate hp-city 34)))
+ (setq bare nil))
+ (insert ","))
+
+ ;; HP 200LX state field (maxlen 39)
+ (if hp-state
+ (progn
+ (insert (format "\"%s\"," (boh-maybe-truncate hp-state 39)))
+ (setq bare nil))
+ (insert ","))
+
+ ;; HP 200LX zip field (maxlen 16)
+ (if hp-zip
+ (progn
+ (insert (format "\"%s\"," (boh-maybe-truncate hp-zip 16)))
+ (setq bare nil))
+ (insert ","))
+ )
+
+ ;; BBDB Notes
+
+ (let (hp-note)
+ (save-excursion
+ (set-buffer (get-buffer-create " *boh-scratch*"))
+ (kill-region (point-min) (point-max))
+
+ (while more-phones
+ (insert (format "%s: %s\t"
+ (car (car more-phones)) ; the tag
+ (car (cdr (car more-phones)))) ; the number
+ )
+ (setq bare nil)
+ (setq more-phones (cdr more-phones)))
+
+ ;; output BBDB email-addresses
+ (while net
+ (insert (format "%s\t" (car net)))
+ (setq bare nil)
+ (setq net (cdr net)))
+
+ (if (stringp notes)
+ (setq notes (list (cons 'notes notes))))
+
+ (while notes
+ (let ((thisnote (car notes)))
+ (if (bbdb-field-shown-p (car thisnote))
+ (progn
+ (setq bare nil)
+ (if (eq 'notes (car thisnote))
+ (insert (format "Notes: %s\t" (boh-mangle-if-multi-line (cdr thisnote))))
+ (insert (format "Note [%s]: %s\t"
+ (symbol-name (car thisnote))
+ (boh-mangle-if-multi-line (cdr thisnote))))))))
+ (setq notes (cdr notes)))
+
+ (setq hp-note (buffer-string)))
+
+ ;; HP 200LX notes field (32K for the entire record)
+ (if (> (length hp-note) 0)
+ (progn
+ (insert (format "\"%s\"" hp-note))
+ (setq bare nil)))
+ )
+
+ ;; If record is bare, delete anything we may have inserted.
+ ;; otherwise, mark the end of this record.
+ (if (and bare bbdb-hp200lx-output-no-bare-names)
+ (delete-region begin (point))
+ (insert " \n")) ; HP 200LX end of record
+ ))
+
+ ;; return current letter
+ current-letter))
+
+
+(defun boh-maybe-truncate (string maxlen)
+ "If STRING is longer than MAXLEN, returns a truncated version."
+ (if (> (length string) maxlen)
+ (substring string 0 maxlen)
+ string))
+
+
+(defun boh-mangle-if-multi-line (string)
+ "If STRING is has multiple lines, mangle it for output to HP200LX"
+ (if (string-match "\n" string)
+ (string-replace-regexp string "\n" "\t") ; tabs are used to denote new lines in the .cdf file
+ string))
diff --git a/bits/bbdb-filters/bbdb-passwd.el b/bits/bbdb-filters/bbdb-passwd.el
new file mode 100644
index 0000000..74dc8fd
--- /dev/null
+++ b/bits/bbdb-filters/bbdb-passwd.el
@@ -0,0 +1,192 @@
+;;; This file is part of the BBDB Filters Package. BBDB Filters Package is a
+;;; collection of input and output filters for BBDB.
+;;;
+;;; Copyright (C) 1995 Neda Communications, Inc.
+;;; Prepared by Mohsen Banan (mohsen@neda.com)
+;;;
+;;; This library is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU Library General Public License as
+;;; published by the Free Software Foundation; either version 2 of the
+;;; License, or (at your option) any later version. This library is
+;;; distributed in the hope that it will be useful, but WITHOUT ANY
+;;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;;; License for more details. You should have received a copy of the GNU
+;;; Library General Public License along with this library; if not, write
+;;; to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+;;; USA.
+
+;;; This is bbdb-passwd.el
+
+;;; This file is a bbdb filter. It converts passwd files to the
+;;; canonical bbdb input filter format (i.e., a file of
+;;; bif-create-record expressions
+
+
+(defvar bpf-default-bif-file "~/passwd-bif.el"
+ "*Default file name for bbdb-passwd-input.")
+
+
+(defvar bpf-default-domain-name (if (boundp '*eoe-site-name*) *eoe-site-name*)
+ "*Default domain name for bbdb-passwd-input.")
+
+
+(defvar bpf-default-org-name (if (boundp 'gnus-local-organization) gnus-local-organization
+ bpf-default-domain-name)
+ "*Default organization name for bbdb-passwd-input.")
+
+
+(defvar bpf-omit-uid-limit 100
+ "Skip UIDs below this value. Default is 100.")
+
+(defvar bpf-omit-user-name-regexp "\\(sl-\\\|guest\\)"
+ "Skip usernames that match this regular expression.
+E.g., \"\\\\(sl-\\\\\\|guest\\\\)\"
+")
+
+(defvar bpf-omit-user-name-list '("nobody" "noaccess")
+ "Skip usernames in this list.
+E.g., '(\"noaccess\" \"nobody\")
+")
+
+(defvar bpf-omit-pretty-name-regexp "\\(Slip \\\|Listserv\\\|PPP\\)"
+ "Skip pretty names that match this regular expression.
+E.g., \"\\\\(Slip \\\\\\|Listserv\\\\\\|PPP\\\\)\"
+")
+
+(defvar bpf-omit-pretty-name-list '()
+ "Skip pretty names that match this regular expression.
+E.g., '(\"John Q. Public\")
+")
+
+
+(defun bbdb-passwd-input (domain-name org-name to-file)
+ "Parse current buffer which contains a UNIX passwd file to generate a .bif format file"
+ (interactive (list (setq bpf-default-domain-name (read-string "Domain name: "
+ bpf-default-domain-name))
+ (setq bpf-default-org-name (read-string "Organization name: "
+ bpf-default-org-name))
+ (setq bpf-default-bif-file
+ (read-file-name "Output To File: "
+ (concat
+ (file-name-directory bpf-default-bif-file)
+ (concat "bif-" bpf-default-domain-name ".el"))
+ (concat
+ (file-name-directory bpf-default-bif-file)
+ (concat "bif-" bpf-default-domain-name ".el"))))))
+ (let (to-buffer)
+ (save-excursion
+ (message (expand-file-name to-file))
+ (set-buffer (find-file (expand-file-name to-file)))
+ (delete-region (point-min) (point-max))
+ (bif-buffer-insert-header)
+ (setq to-buffer (current-buffer)))
+
+ ;; walk the passwd file in the current buffer
+ (goto-char (point-min))
+ (while (not (eobp))
+ (beginning-of-line)
+ (bpf-parse-line domain-name org-name to-buffer)
+ (forward-line 1))
+
+ (message "Done.")
+ (set-buffer to-buffer)
+ ))
+
+
+(defun bif-buffer-insert-header ()
+ (insert "(require 'bbdb-passwd)\n\n"))
+
+
+(defun bif-buffer-insert-record (pretty-name org-name email)
+ (insert (format "(bif-create-record"))
+
+ (insert (format " \"%s\"" pretty-name)) ; NAME string
+
+ (insert (format " \"%s\"" org-name)) ; COMPANY is a string or nil
+
+ (insert (format " \"%s\"" email)) ; NET is a comma-separated list of email address,
+ ; or a list of strings
+
+ ;; (insert " nil") ; ADDRS is a list of address objects.
+ ; An address is a vector of the form
+ ; ["location" "line1" "line2" "line3" "City" "State" zip]
+
+ ;; (insert " nil") ; PHONES is a list of phone-number objects.
+ ; A phone-number is a vector of the form
+ ; ["location" areacode prefix suffix extension-or-nil]
+ ; or
+ ; ["location" "phone-number"]
+
+ ;; (insert " nil") ; NOTES is a string, or an alist associating symbols with
+ ; strings.
+
+ (insert ")\n")
+ )
+
+(defun bpf-parse-line (domain-name org-name to-buffer)
+ "Parse the passwd file line. Point is assumed to be at the beginning of line."
+ (let (record-string uid user-name pretty-name email)
+ (setq record-string (buffer-substring (point)
+ (progn (end-of-line) (point))))
+
+ (message "Processing record: %s" record-string)
+
+ ;; (setq record-string "mohsen:x:100:10:Mohsen Banan:/home/arash/mohsen:/bin/csh")
+
+ ;; check for a valid and qualifying uid on line, else skip
+ (cond ((and
+ ;;
+ ;; extract and test uid
+ ;;
+ (string-match "^\\w*:\\w*:\\([0-9]+\\):" record-string)
+ (setq uid (read (substring record-string
+ (match-beginning 1)
+ (match-end 1))))
+ (>= uid bpf-omit-uid-limit)
+ ;;
+ ;; extract and test user name
+ ;;
+ (string-match "^\\([^:]+\\):" record-string)
+ (setq user-name (substring record-string (match-beginning 1) (match-end 1)))
+ (or (null bpf-omit-user-name-regexp)
+ (not (string-match bpf-omit-user-name-regexp user-name)))
+ (or (null bpf-omit-user-name-list)
+ (not (member user-name bpf-omit-user-name-list)))
+ ;;
+ ;; extract and test pretty name
+ ;;
+ (string-match "^[^:]*:[^:]*:[^:]*:[^:]*:\\([^:]+\\):" record-string)
+ (setq pretty-name (substring record-string (match-beginning 1) (match-end 1)))
+ (or (null bpf-omit-pretty-name-regexp)
+ (not (string-match bpf-omit-pretty-name-regexp pretty-name)))
+ (or (null bpf-omit-pretty-name-list)
+ (not (member pretty-name bpf-omit-pretty-name-list)))
+ )
+
+ ;; synthesize email address
+ (setq email (concat user-name "@" domain-name))
+
+ ;; output bif record
+ (save-excursion
+ (set-buffer to-buffer)
+ (bif-buffer-insert-record pretty-name org-name email)
+ )
+ )
+ (t
+ ;; not a valid line, skip
+ nil))
+ ))
+
+(defun bif-create-record (name company net &optional addrs phones notes)
+ "Try to add a record to BBDB; if one does not already exist."
+ (condition-case err
+ (progn
+ (bbdb-create-internal name company net addrs phones notes)
+ (message "%s <%s> added." name net))
+ (error (message "%s" (car (cdr err)))
+ (sleep-for 1))))
+
+
+(provide 'bbdb-passwd)
+
diff --git a/bits/bbdb-filters/bbdb-ph.el b/bits/bbdb-filters/bbdb-ph.el
new file mode 100644
index 0000000..fc21502
--- /dev/null
+++ b/bits/bbdb-filters/bbdb-ph.el
@@ -0,0 +1,253 @@
+;;; This file is part of the BBDB Filters Package. BBDB Filters Package is a
+;;; collection of input and output filters for BBDB.
+;;;
+;;; Copyright (C) 1995 Neda Communications, Inc.
+;;; Prepared by Mohsen Banan (mohsen@neda.com)
+;;;
+;;; This library is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU Library General Public License as
+;;; published by the Free Software Foundation; either version 2 of the
+;;; License, or (at your option) any later version. This library is
+;;; distributed in the hope that it will be useful, but WITHOUT ANY
+;;; WARRANTY; without even the implied warranty of MERCHANTABILITY or
+;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;;; License for more details. You should have received a copy of the GNU
+;;; Library General Public License along with this library; if not, write
+;;; to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+;;; USA.
+;;;
+;;; This is bbdb-ph.el
+;;;
+;;;
+;;; RCS: bbdb-ph.el,v 1.1.1.1 1995/08/07 08:43:08 mohsen Exp
+;;;
+;;; a copy-and-edit job on bbdb-print.el
+
+
+;;; To use this, add the following to your .emacs
+;;; and strip ";;;XXX"
+;;;
+
+;;;XXX;; BBDB PH Filter
+;;;XXX(load "bbdb-ph")
+
+;;;XXX(setq bbdb-ph-filename
+;;;XXX (concat "/dos/u/" (user-login-name) "/bb-phone.cdf"))
+;;;XXX;;; - to output the *BBDB* buffer in PH tab-delimited-file (.CDF)
+;;;XXX;;; format, invoke M-x bbdb-ph-output
+;;;XXX;;;
+;;;XXX;;; - you may also want to modify default values of the following (use
+;;;XXX;;; M-x describe-variable for details):
+;;;XXX;;; bbdb-ph-output-elide
+;;;XXX;;; bbdb-ph-output-requires
+;;;XXX;;; bbdb-ph-output-no-bare-names
+
+
+(require 'bbdb-print)
+(require 'basic-ext)
+
+
+(defvar bbdb-ph-filename "~/data.out"
+ "*Default file name for bbdb-output-ph printouts of BBDB database.")
+
+
+(defvar bbdb-ph-output-elide '(creation-date timestamp mail-alias)
+ "*List of symbols denoting BBDB fields NOT to be output.
+Valid symbols are: name comp net phones addrs. You can also use the
+tags for notes (e.g., creation-date).
+ e.g.: '(net creation-date)
+See also variable bbdb-ph-output-requires.")
+
+
+(defvar bbdb-ph-output-requires '(and name net)
+ "*A boolean expression of 'and' and 'or' to be evaluated to determine if
+the current record should be output. Valid symbols for use
+in the boolean expression are: name comp net phones addrs notes.
+ e.g.: (and name (or comp addrs))
+See also variable bbdb-ph-output-elide.
+")
+
+
+(defvar bbdb-ph-output-no-bare-names t
+ "*A bare name is one with no information other than
+that in bbdb-ph-output-requires. To avoid printing
+these set this variable to t")
+
+
+(defun bbdb-ph-output (to-file)
+ "Print the selected BBDB entries"
+ (interactive (list (read-file-name "Print To File: " bbdb-ph-filename)))
+ (setq bbdb-ph-filename (expand-file-name to-file))
+ (let ((current-letter t)
+ (records (progn (set-buffer bbdb-buffer-name)
+ bbdb-records)))
+ (find-file bbdb-ph-filename)
+ (delete-region (point-min) (point-max))
+ (while records
+ (setq current-letter
+ (boph-maybe-format-record (car (car records)) current-letter))
+ (setq records (cdr records)))
+ (goto-char (point-min))
+ (message "PH tag and tab-delimited file %s generated." bbdb-ph-filename)))
+
+
+(defun boph-maybe-format-record (record &optional current-letter brief)
+ "Insert the bbdb RECORD in Ph format.
+Optional CURRENT-LETTER is the section we're in -- if this is non-nil and
+the first letter of the sortkey of the record differs from it, a new section
+heading will be output \(an arg of t will always produce a heading).
+The new current-letter is the return value of this function.
+Someday, optional third arg BRIEF will produce one-line format."
+ (bbdb-debug (if (bbdb-record-deleted-p record)
+ (error "plus ungood: formatting deleted record")))
+
+ (let* ((bbdb-elided-display bbdb-ph-output-elide)
+ (first-letter
+ (substring (concat (bbdb-record-sortkey record) "?") 0 1))
+ (name (and (bbdb-field-shown-p 'name)
+ (or (bbdb-record-getprop record 'tex-name)
+ (bbdb-record-name record))))
+ (comp (and (bbdb-field-shown-p 'company)
+ (bbdb-record-company record)))
+ (net (and (bbdb-field-shown-p 'net)
+ (bbdb-record-net record)))
+ (phones (and (bbdb-field-shown-p 'phone)
+ (bbdb-record-phones record)))
+ (addrs (and (bbdb-field-shown-p 'address)
+ (bbdb-record-addresses record)))
+ (notes (bbdb-record-raw-notes record))
+ (begin (point))
+ (bare t)
+ ph-name ph-email ph-office-phone ph-skypager ph-portable
+ ph-title-notes-part
+ saved-case-fold)
+
+
+ ;; Section header, if neccessary.
+
+ (if (and current-letter (not (string-equal first-letter current-letter)))
+ (message "Now processing \"%s\" entries..." (upcase first-letter)))
+
+
+ (if (eval bbdb-ph-output-requires)
+ (progn
+
+ ;; =============================================================
+ ;; grovel through BBDB record collecting ph-relevant information
+ ;; =============================================================
+
+ ;; grovel through name
+ ;;
+ (setq ph-name name)
+
+ ;; grovel through phone numbers
+ ;;
+ (progn
+ (setq saved-case-fold case-fold-search
+ case-fold-search t)
+ (while phones
+ (let ((place (aref (car phones) 0))
+ (number (bbdb-phone-string (car phones))))
+ (cond ((or (string-match place "office")
+ (string-match place "work"))
+ (if (null ph-office-phone)
+ (setq ph-office-phone number)))
+ ((or (string-match place "mobile")
+ (string-match place "cellular"))
+ (if (null ph-portable)
+ (setq ph-portable number)))
+ (t nil)))
+ (setq phones (cdr phones)))
+
+
+ (setq case-fold-search saved-case-fold)
+ )
+
+ ;; grovel through BBDB email-addresses
+ ;;
+ (if net
+ (setq ph-email (car net)))
+
+ ;; grovel through BBDB Notes
+ ;;
+ (progn
+
+ (if (stringp notes)
+ (setq notes (list (cons 'notes notes))))
+
+ (while notes
+ (let ((curr-note (car notes)))
+ (if (bbdb-field-shown-p (car curr-note))
+ (cond ((member (car curr-note) '(skypage pager))
+ (setq ph-skypager (boph-mangle-if-multi-line (cdr curr-note))))
+ ((equal (car curr-note) 'mobile)
+ (setq ph-portable (boph-mangle-if-multi-line (cdr curr-note))))
+ ((equal (car curr-note) 'notes)
+ (setq ph-title-notes-part (boph-mangle-if-multi-line (cdr curr-note))))
+ (t nil))
+ ))
+ (setq notes (cdr notes)))
+ )
+
+ ;; grovel through comp
+ ;;
+ (setq ph-title-coname-part comp)
+ (setq ph-title (concat (or ph-title-coname-part "")
+ (if (and ph-title-coname-part ph-title-notes-part) " " "")
+ (if ph-title-notes-part (concat "[" ph-title-notes-part "]") "")))
+
+ ;; ====================
+ ;; now output PH record
+ ;; ====================
+
+ ;; PH 'name' field (maxlen 256)
+ ;;
+ (insert (format "3:%s\t" (boph-maybe-truncate (or name "") 256)))
+
+ ;; PH 'email' field (maxlen 25) (should be 128?) ** NOT YET **
+ (if ph-email (setq bare nil))
+ (insert (format "2:%s\t" (boph-maybe-truncate (or ph-email "") 25)))
+
+ ;; PH 'office_phone' field (max len 60)
+ ;;
+ (if ph-office-phone (setq bare nil))
+ (insert (format "32:%s\t" (boph-maybe-truncate (or ph-office-phone "") 60)))
+
+ ;; PH 'title' field (maxlen 120)
+ (insert (format "98:%s\t" (boph-maybe-truncate ph-title 120)))
+
+ ;; PH 'portable' field (maxlen 60)
+ (if ph-portable (setq bare nil))
+ (insert (format "97:%s\t" (boph-maybe-truncate (or ph-portable "") 60)))
+
+ ;; PH 'skypager' field (maxlen 64)
+ (if ph-skypager (setq bare nil))
+ (insert (format "27:%s\t" (boph-maybe-truncate (or ph-skypager "") 64)))
+
+ ;; ==========
+ ;; bare check
+ ;; ==========
+
+ ;; If record is bare, delete anything we may have inserted.
+ ;; otherwise, mark the end of this record.
+ (if (and bare bbdb-ph-output-no-bare-names)
+ (delete-region begin (point))
+ (insert "\n")) ; PH end of record
+ ))
+
+ ;; return current letter
+ current-letter))
+
+
+(defun boph-maybe-truncate (string maxlen)
+ "If STRING is longer than MAXLEN, returns a truncated version."
+ (if (> (length string) maxlen)
+ (substring string 0 maxlen)
+ string))
+
+
+(defun boph-mangle-if-multi-line (string)
+ "If STRING is has multiple lines, mangle it for output to PH"
+ (if (string-match "\n" string)
+ (string-replace-regexp string "\n" "\t") ; tabs are used to denote new lines in the .cdf file
+ string))
diff --git a/bits/bbdb-filters/doc/formatted/bbdb-filters.info b/bits/bbdb-filters/doc/formatted/bbdb-filters.info
new file mode 100644
index 0000000..c66edef
--- /dev/null
+++ b/bits/bbdb-filters/doc/formatted/bbdb-filters.info
@@ -0,0 +1,1101 @@
+Info file: bbdb-filters.info, -*-Text-*-
+produced by latexinfo-format-buffer
+from file: main.tex
+
+
+
+File: bbdb-filters.info Node: Top, Prev: (dir), Up: (dir), Next: Introduction
+
+{BBDB Filters}
+
+{6}
+
+Copyright (C)1995 NEDA COMMUNICATIONS, INC.
+
+
+* Menu:
+
+* Introduction::
+* Output Filters::
+* Input Filters::
+* Miscellany::
+* GNU LIBRARY GENERAL PUBLIC LICENSE::
+* Concept Index::
+* Command Index::
+
+ --- The Detailed Node Listing ---
+
+Introduction
+
+* About This Package::
+* About This Manual::
+
+Output Filters
+
+* HP 200LX Phone Book::
+* PC Eudora::
+* Lotus cc:Mail Nicknames::
+* PH::
+* Emacs Lisp Export::
+
+PC Eudora
+
+* PC Eudora Nickname Database::
+* PC Eudora Recipient Database::
+
+Input Filters
+
+* General Facilities for Input Filtering::
+* UNIX Password Files::
+
+Miscellany
+
+* TODO List::
+* Credits::
+
+GNU LIBRARY GENERAL PUBLIC LICENSE
+
+* Preamble::
+* TERMS AND CONDITIONS FOR COPYING:: *
+* NO WARRANTY::
+* END OF TERMS AND CONDITIONS::
+* How to Apply These Terms to Your New Libraries::
+
+
+
+File: bbdb-filters.info Node: Introduction, Prev: Top, Up: Top, Next: Output Filters
+
+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.
+
+
+* Menu:
+
+* About This Package::
+* About This Manual::
+
+
+
+File: bbdb-filters.info Node: About This Package, Prev: Introduction, Up: Introduction, Next: About This Manual
+
+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.
+
+
+File: bbdb-filters.info Node: About This Manual, Prev: About This Package, Up: Introduction
+
+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.
+
+
+File: bbdb-filters.info Node: Output Filters, Prev: Introduction, Up: Top, Next: Input Filters
+
+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
+`*BBDB*' buffer as input. Note that output filters do not use
+BBDB files (typically ``~/.bbdb'') directly.
+
+An output filter is invoked by executing its associated lisp function.
+The name of the function is conventionally named `bbdb-<system>-output'
+(e.g., `M-x bbdb-hp200lx-output').
+
+The result of running an output filter is to create a new buffer that
+contains the `*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.
+
+
+* Menu:
+
+* HP 200LX Phone Book::
+* PC Eudora::
+* Lotus cc:Mail Nicknames::
+* PH::
+* Emacs Lisp Export::
+
+
+
+File: bbdb-filters.info Node: HP 200LX Phone Book, Prev: Output Filters, Up: Output Filters, Next: PC Eudora
+
+HP 200LX Phone Book
+===================
+
+
+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 `bbdb-hp200lx.el'.
+
+
+
+ 1. Invoke `M-x bbdb' to populate the `*BBDB*' buffer
+ with the contents you wish to export.
+
+ 2. Invoke ` bbdb-hp200lx-output' to create an ASCII .CDF
+ (Comma Delimited File).
+
+ 3. Using Xlate/Merge option of HP Connectivity Pack convert the
+ .CDF file into a binary .PDB file used by the Phone Book program.
+
+ 4. 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.
+
+
+
+
+File: bbdb-filters.info Node: PC Eudora, Prev: HP 200LX Phone Book, Up: Output Filters, Next: Lotus cc:Mail Nicknames
+
+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 `bbdb-eudora.el'.
+
+* Menu:
+
+* PC Eudora Nickname Database::
+* PC Eudora Recipient Database::
+
+
+
+File: bbdb-filters.info Node: PC Eudora Nickname Database, Prev: PC Eudora, Up: PC Eudora, Next: PC Eudora Recipient Database
+
+PC Eudora Nickname Database
+---------------------------
+
+
+
+ 1. Invoke `M-x bbdb' to populate the `*BBDB*' buffer
+ with the contents you wish to export.
+
+ 2. Invoke `bbdb-eudora-nndbase-output' to create a PC Eudora
+ Nickname database file.
+
+ 3. Make the file accessible to PC Eudora.
+
+
+
+
+File: bbdb-filters.info Node: PC Eudora Recipient Database, Prev: PC Eudora Nickname Database, Up: PC Eudora
+
+PC Eudora Recipient Database
+----------------------------
+
+
+
+ 1. Invoke `M-x bbdb' to populate the `*BBDB*' buffer
+ with the contents you wish to export.
+
+ 2. Invoke `bbdb-eudora-rcpdbase-output' to create a PC Eudora
+ recipient's database file.
+
+ 3. Make the file accessible to PC Eudora.
+
+
+
+
+File: bbdb-filters.info Node: Lotus cc:Mail Nicknames, Prev: PC Eudora, Up: Output Filters, Next: PH
+
+Lotus cc:Mail Nicknames
+=======================
+
+
+The Lotus cc:Mail output filter is in file `bbdb-ccmail.el'.
+
+
+ 1. Invoke `M-x bbdb' to populate the `*BBDB*' buffer
+ with the contents you wish to export.
+
+ 2. Invoke ` bbdb-ccmail-output' to create a cc:Mail Nicknames file.
+
+ 3. Make the file accessible to cc:Mail.
+
+
+
+
+File: bbdb-filters.info Node: PH, Prev: Lotus cc:Mail Nicknames, Up: Output Filters, Next: Emacs Lisp Export
+
+PH
+==
+
+
+The PH output filter is in file `bbdb-ph.el'.
+
+
+ 1. Invoke `M-x bbdb' to populate the `*BBDB*' buffer
+ with the contents you wish to export.
+
+ 2. Invoke `bbdb-ph-output' to create a `ph' data file for
+ use with the `maked' program.
+
+ 3. Make the file accessible to `ph'.
+
+
+
+
+File: bbdb-filters.info Node: Emacs Lisp Export, Prev: PH, Up: Output Filters
+
+Emacs Lisp Export
+=================
+
+
+The Emacs Lisp Export output filter is in file `bbdb-export.el'.
+
+This output filter uses the current contents of your
+`*BBDB*' buffer to generate a new buffer (`*BBDB* Export')
+that contains a single lisp `(progn ...)' expression. For
+example, a `*BBDB*' buffer containing two records would result in
+the following `*BBDB* Export' buffer:
+
+
+ ;;; ======= 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 =======
+
+
+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 `BBDB' records to the
+recipient's
+`BBDB' database.
+
+Only new records are added. A record with the same name or net
+address as one already existing in the `BBDB' is skipped
+entirely.
+
+In the sample contents of a `*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
+`--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:
+
+
+ 1. Invoke `M-x bbdb' to populate the `*BBDB*' buffer
+ with the contents you wish to export.
+
+ 2. Invoke `bbdb-export' to create a `*BBDB* Export' buffer which contains a
+ single `(progn ...)' can be evaluated to add the records to the
+ existing `BBDB' database (if the records do not already exist).
+
+ 3. Use the contents of `*BBDB* Export' in email and other messaging systems.
+
+
+
+The following steps are for a user wishing to import the contents of a
+`*BBDB* Export' buffer's expression into his or her own database:
+
+
+ 1. Evaluate the region bounded by the lines
+ `;;; ======= Start of Exported BBDB Records ======='
+ and
+ `;;; ======= End of Exported BBDB Records ======='.
+ You can use such commands as
+ `M-x eval-region' or `M-x eval-last-sexp'.
+
+ 2. Review the newly imported entries. To see them, invoke `M-x
+ bbdb' and specify `--IMPORTED' at the `Regular Expression'
+ prompt.
+
+ 3. After reviewing the contents of the imported records, you may
+ wish to remove the `--IMPORTED' that is appended to the name by
+ `bbdb-export'.
+
+
+
+
+File: bbdb-filters.info Node: Input Filters, Prev: Output Filters, Up: Top, Next: Miscellany
+
+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
+`bbdb-<system>-input' (e.g., `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.
+
+
+* Menu:
+
+* General Facilities for Input Filtering::
+* UNIX Password Files::
+
+
+
+File: bbdb-filters.info Node: General Facilities for Input Filtering, Prev: Input Filters, Up: Input Filters, Next: UNIX Password Files
+
+General Facilities for Input Filtering
+======================================
+
+
+The result of running an input filter is to produce a new buffer a
+series of `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 ``~/.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 `M-x eval-buffer'.
+Another way is to simply save the buffer to disk and load its contents
+into Emacs Lisp using `M-x load-file'.
+
+
+File: bbdb-filters.info Node: UNIX Password Files, Prev: General Facilities for Input Filtering, Up: Input Filters
+
+UNIX Password Files
+===================
+
+
+The UNIX password file input filter is in file `bbdb-passwd.el'.
+
+
+ 1. Use `M-x find-file' to visit the UNIX password file you wish to import.
+
+ 2. With the password file in the current buffer, invoke the input
+ filter `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
+ `bif-create-record' expressions.
+
+ 3. Evaluate the contents of the input filter's buffer to add records
+ into your BBDB database file.
+
+
+
+
+File: bbdb-filters.info Node: Miscellany, Prev: Input Filters, Up: Top, Next: GNU LIBRARY GENERAL PUBLIC LICENSE
+
+Miscellany
+**********
+
+
+
+* Menu:
+
+* TODO List::
+* Credits::
+
+
+
+File: bbdb-filters.info Node: TODO List, Prev: Miscellany, Up: Miscellany, Next: Credits
+
+TODO List
+=========
+
+
+
+ * Move generic input filter functionality out of
+ `bbdb-passwd.el' and into, say, `bbdb-ifilt.el'.
+ The generic functionality code has names typically prefixed with `bif-'.
+
+ * Add support for `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 `<robert@steffi.dircon.co.uk>'.
+
+ * Add documentation for variables in the various input and output filters.
+
+ * Check and document all dependencies on other packages.
+
+
+
+
+File: bbdb-filters.info Node: Credits, Prev: TODO List, Up: Miscellany
+
+Credits
+=======
+
+
+Pean Lim `<pean@neda.com>' wrote most of this package. Mohsen
+Banan `<mohsen@neda.com>' put it all together and guided the
+work. Neda Communications, Inc. sponsored the work. The output
+filters code is based on `bbdb-print' by Boris Goldowsky
+`<boris@prodigal.psych.rochester.edu>'.
+
+
+
+File: bbdb-filters.info Node: GNU LIBRARY GENERAL PUBLIC LICENSE, Prev: Miscellany, Up: Top, Next: Concept Index
+
+GNU LIBRARY GENERAL PUBLIC LICENSE
+**********************************
+
+
+ Version 2, June 1991
+
+
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ [This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+
+
+* Menu:
+
+* Preamble::
+* TERMS AND CONDITIONS FOR COPYING:: *
+* NO WARRANTY::
+* END OF TERMS AND CONDITIONS::
+* How to Apply These Terms to Your New Libraries::
+
+
+
+File: bbdb-filters.info Node: Preamble, Prev: GNU LIBRARY GENERAL PUBLIC LICENSE, Up: GNU LIBRARY GENERAL PUBLIC LICENSE, Next: TERMS AND CONDITIONS FOR COPYING
+
+Preamble
+========
+
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software---to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+
+
+ 1. This License Agreement applies to any software library which
+ contains a notice placed by the copyright holder or other authorized
+ party saying it may be distributed under the terms of this Library
+ General Public License (also called "this License"). Each licensee is
+ addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+ prepared so as to be conveniently linked with application programs
+ (which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+ which has been distributed under these terms. A "work based on the
+ Library" means either the Library or any derivative work under
+ copyright law: that is to say, a work containing the Library or a
+ portion of it, either verbatim or with modifications and/or translated
+ straightforwardly into another language. (Hereinafter, translation is
+ included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+ making modifications to it. For a library, complete source code means
+ all the source code for all modules it contains, plus any associated
+ interface definition files, plus the scripts used to control compilation
+ and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+ covered by this License; they are outside its scope. The act of
+ running a program using the Library is not restricted, and output from
+ such a program is covered only if its contents constitute a work based
+ on the Library (independent of the use of the Library in a tool for
+ writing it). Whether that is true depends on what the Library does
+ and what the program that uses the Library does.
+
+ 2. You may copy and distribute verbatim copies of the Library's
+ complete source code as you receive it, in any medium, provided that
+ you conspicuously and appropriately publish on each copy an
+ appropriate copyright notice and disclaimer of warranty; keep intact
+ all the notices that refer to this License and to the absence of any
+ warranty; and distribute a copy of this License along with the
+ Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+ and you may at your option offer warranty protection in exchange for a
+ fee.
+
+ 3. You may modify your copy or copies of the Library or any portion
+ of it, thus forming a work based on the Library, and copy and
+ distribute such modifications or work under the terms of Section 1
+ above, provided that you also meet all of these conditions:
+
+ 1. The modified work must itself be a software library.
+
+ 2. You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ 3. You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ 4. If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+
+ These requirements apply to the modified work as a whole. If
+ identifiable sections of that work are not derived from the Library,
+ and can be reasonably considered independent and separate works in
+ themselves, then this License, and its terms, do not apply to those
+ sections when you distribute them as separate works. But when you
+ distribute the same sections as part of a whole which is a work based
+ on the Library, the distribution of the whole must be on the terms of
+ this License, whose permissions for other licensees extend to the
+ entire whole, and thus to each and every part regardless of who wrote
+ it.
+
+ Thus, it is not the intent of this section to claim rights or contest
+ your rights to work written entirely by you; rather, the intent is to
+ exercise the right to control the distribution of derivative or
+ collective works based on the Library.
+
+ In addition, mere aggregation of another work not based on the Library
+ with the Library (or with a work based on the Library) on a volume of
+ a storage or distribution medium does not bring the other work under
+ the scope of this License.
+
+ 4. You may opt to apply the terms of the ordinary GNU General Public
+ License instead of this License to a given copy of the Library. To do
+ this, you must alter all the notices that refer to this License, so
+ that they refer to the ordinary GNU General Public License, version 2,
+ instead of to this License. (If a newer version than version 2 of the
+ ordinary GNU General Public License has appeared, then you can specify
+ that version instead if you wish.) Do not make any other change in
+ these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+ that copy, so the ordinary GNU General Public License applies to all
+ subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+ the Library into a program that is not a library.
+
+ 5. You may copy and distribute the Library (or a portion or
+ derivative of it, under Section 2) in object code or executable form
+ under the terms of Sections 1 and 2 above provided that you accompany
+ it with the complete corresponding machine-readable source code, which
+ must be distributed under the terms of Sections 1 and 2 above on a
+ medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+ from a designated place, then offering equivalent access to copy the
+ source code from the same place satisfies the requirement to
+ distribute the source code, even though third parties are not
+ compelled to copy the source along with the object code.
+
+ 6. A program that contains no derivative of any portion of the
+ Library, but is designed to work with the Library by being compiled or
+ linked with it, is called a "work that uses the Library". Such a
+ work, in isolation, is not a derivative work of the Library, and
+ therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+ creates an executable that is a derivative of the Library (because it
+ contains portions of the Library), rather than a "work that uses the
+ library". The executable is therefore covered by this License.
+ Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+ that is part of the Library, the object code for the work may be a
+ derivative work of the Library even though the source code is not.
+ Whether this is true is especially significant if the work can be
+ linked without the Library, or if the work is itself a library. The
+ threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+ structure layouts and accessors, and small macros and small inline
+ functions (ten lines or less in length), then the use of the object
+ file is unrestricted, regardless of whether it is legally a derivative
+ work. (Executables containing this object code plus portions of the
+ Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+ distribute the object code for the work under the terms of Section 6.
+ Any executables containing that work also fall under Section 6,
+ whether or not they are linked directly with the Library itself.
+
+ 7. As an exception to the Sections above, you may also compile or
+ link a "work that uses the Library" with the Library to produce a
+ work containing portions of the Library, and distribute that work
+ under terms of your choice, provided that the terms permit
+ modification of the work for the customer's own use and reverse
+ engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+ Library is used in it and that the Library and its use are covered by
+ this License. You must supply a copy of this License. If the work
+ during execution displays copyright notices, you must include the
+ copyright notice for the Library among them, as well as a reference
+ directing the user to the copy of this License. Also, you must do one
+ of these things:
+
+ 1. Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ 2. Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ 3. If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ 4. Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+
+ For an executable, the required form of the "work that uses the
+ Library" must include any data and utility programs needed for
+ reproducing the executable from it. However, as a special exception,
+ the source code distributed need not include anything that is normally
+ distributed (in either source or binary form) with the major
+ components (compiler, kernel, and so on) of the operating system on
+ which the executable runs, unless that component itself accompanies
+ the executable.
+
+ It may happen that this requirement contradicts the license
+ restrictions of other proprietary libraries that do not normally
+ accompany the operating system. Such a contradiction means you cannot
+ use both them and the Library together in an executable that you
+ distribute.
+
+ 8. You may place library facilities that are a work based on the
+ Library side-by-side in a single library together with other library
+ facilities not covered by this License, and distribute such a combined
+ library, provided that the separate distribution of the work based on
+ the Library and of the other library facilities is otherwise
+ permitted, and provided that you do these two things:
+
+ 1. Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ 2. Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+
+ 9. You may not copy, modify, sublicense, link with, or distribute
+ the Library except as expressly provided under this License. Any
+ attempt otherwise to copy, modify, sublicense, link with, or
+ distribute the Library is void, and will automatically terminate your
+ rights under this License. However, parties who have received copies,
+ or rights, from you under this License will not have their licenses
+ terminated so long as such parties remain in full compliance.
+
+ 10. You are not required to accept this License, since you have not
+ signed it. However, nothing else grants you permission to modify or
+ distribute the Library or its derivative works. These actions are
+ prohibited by law if you do not accept this License. Therefore, by
+ modifying or distributing the Library (or any work based on the
+ Library), you indicate your acceptance of this License to do so, and
+ all its terms and conditions for copying, distributing or modifying
+ the Library or works based on it.
+
+ 11. Each time you redistribute the Library (or any work based on the
+ Library), the recipient automatically receives a license from the
+ original licensor to copy, distribute, link with or modify the Library
+ subject to these terms and conditions. You may not impose any further
+ restrictions on the recipients' exercise of the rights granted herein.
+ You are not responsible for enforcing compliance by third parties to
+ this License.
+
+ 12. If, as a consequence of a court judgment or allegation of patent
+ infringement or for any other reason (not limited to patent issues),
+ conditions are imposed on you (whether by court order, agreement or
+ otherwise) that contradict the conditions of this License, they do not
+ excuse you from the conditions of this License. If you cannot
+ distribute so as to satisfy simultaneously your obligations under this
+ License and any other pertinent obligations, then as a consequence you
+ may not distribute the Library at all. For example, if a patent
+ license would not permit royalty-free redistribution of the Library by
+ all those who receive copies directly or indirectly through you, then
+ the only way you could satisfy both it and this License would be to
+ refrain entirely from distribution of the Library.
+
+ If any portion of this section is held invalid or unenforceable under any
+ particular circumstance, the balance of the section is intended to apply,
+ and the section as a whole is intended to apply in other circumstances.
+
+ It is not the purpose of this section to induce you to infringe any
+ patents or other property right claims or to contest validity of any
+ such claims; this section has the sole purpose of protecting the
+ integrity of the free software distribution system which is
+ implemented by public license practices. Many people have made
+ generous contributions to the wide range of software distributed
+ through that system in reliance on consistent application of that
+ system; it is up to the author/donor to decide if he or she is willing
+ to distribute software through any other system and a licensee cannot
+ impose that choice.
+
+ This section is intended to make thoroughly clear what is believed to
+ be a consequence of the rest of this License.
+
+ 13. If the distribution and/or use of the Library is restricted in
+ certain countries either by patents or by copyrighted interfaces, the
+ original copyright holder who places the Library under this License may add
+ an explicit geographical distribution limitation excluding those countries,
+ so that distribution is permitted only in or among countries not thus
+ excluded. In such case, this License incorporates the limitation as if
+ written in the body of this License.
+
+ 14. The Free Software Foundation may publish revised and/or new
+ versions of the Library General Public License from time to time.
+ Such new versions will be similar in spirit to the present version,
+ but may differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the Library
+ specifies a version number of this License which applies to it and
+ "any later version", you have the option of following the terms and
+ conditions either of that version or of any later version published by
+ the Free Software Foundation. If the Library does not specify a
+ license version number, you may choose any version ever published by
+ the Free Software Foundation.
+
+ 15. If you wish to incorporate parts of the Library into other free
+ programs whose distribution conditions are incompatible with these,
+ write to the author to ask for permission. For software which is
+ copyrighted by the Free Software Foundation, write to the Free
+ Software Foundation; we sometimes make exceptions for this. Our
+ decision will be guided by the two goals of preserving the free status
+ of all derivatives of our free software and of promoting the sharing
+ and reuse of software generally.
+
+
+ NO WARRANTY
+
+
+
+ 16. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+ WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+ OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+ KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+ LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+ THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 17. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+ AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+ FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+ CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+ LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ DAMAGES.
+
+
+
+ END OF TERMS AND CONDITIONS
+
+
+
+
+
+File: bbdb-filters.info Node: How to Apply These Terms to Your New Libraries, Prev: END OF TERMS AND CONDITIONS, Up: GNU LIBRARY GENERAL PUBLIC LICENSE
+
+How to Apply These Terms to Your New Libraries
+==============================================
+
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+
+ ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES.
+ Copyright (C) YEAR NAME OF AUTHOR
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the
+ Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+ MA 02139, USA.
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in
+ the library `Frob' (a library for tweaking knobs) written
+ by James Random Hacker.
+
+ SIGNATURE OF TY COON, 1 April 1990
+ Ty Coon, President of Vice
+
+
+That's all there is to it!
+
+
+
+
+File: bbdb-filters.info Node: Concept Index, Prev: GNU LIBRARY GENERAL PUBLIC LICENSE, Up: Top, Next: Command Index
+
+Concept Index
+*************
+
+
+
+* Menu:
+
+* About This Manual: About This Manual.
+* About This Package: About This Package.
+* .CDF file, HP 200LX Phone Book: HP 200LX Phone Book.
+* Credits: Credits.
+* Emacs Lisp Export: Emacs Lisp Export.
+* General Facilities for Input Filtering: General Facilities for Input Filtering.
+* GNU LIBRARY GENERAL PUBLIC LICENSE: GNU LIBRARY GENERAL PUBLIC LICENSE.
+* How to Apply These Terms to Your New Libraries: How to Apply These Terms to Your New Libraries.
+* HP 200LX Connectivity Pack: HP 200LX Phone Book.
+* HP 200LX Phone Book: HP 200LX Phone Book.
+* Input Filters: Input Filters.
+* Introduction: Introduction.
+* Lotus cc:Mail Nicknames: Lotus cc:Mail Nicknames.
+* Miscellany: Miscellany.
+* Output Filters: Output Filters.
+* PC Eudora Nickname Database: PC Eudora Nickname Database.
+* PC Eudora: PC Eudora.
+* PC Eudora Recipient Database: PC Eudora Recipient Database.
+* .PDF file, HP 200LX Phone Book: HP 200LX Phone Book.
+* PH: PH.
+* Preamble: Preamble.
+* Sending BBDB records via email: Emacs Lisp Export.
+* TODO List: TODO List.
+* UNIX Password Files: UNIX Password Files.
+
+
+
+
+File: bbdb-filters.info Node: Command Index, Prev: Concept Index, Up: Top
+
+Command Index
+*************
+
+
+
+* Menu:
+
+* bbdb-ccmail-output: Lotus cc:Mail Nicknames.
+* bbdb-eudora-nndbase-output: PC Eudora Nickname Database.
+* bbdb-eudora-rcpdbase-output: PC Eudora Recipient Database.
+* bbdb-export: Emacs Lisp Export.
+* bbdb-hp200lx-output: HP 200LX Phone Book.
+* bbdb-passwd-input: UNIX Password Files.
+* bbdb-ph-output: PH.
+* bif-create-record: General Facilities for Input Filtering.
+
+
diff --git a/bits/bbdb-filters/doc/lgpl.tex b/bits/bbdb-filters/doc/lgpl.tex
new file mode 100644
index 0000000..7427570
--- /dev/null
+++ b/bits/bbdb-filters/doc/lgpl.tex
@@ -0,0 +1,552 @@
+\c This LGPL is meant to be included from other files.
+\c To format a standalone LGPL, use liblic.texi.
+
+\chapter{GNU LIBRARY GENERAL PUBLIC LICENSE}
+
+\begin{center}
+Version 2, June 1991
+\end{center}
+
+\begin{example}
+Copyright \copyright{} 1991 Free Software Foundation, Inc.
+675 Mass Ave, Cambridge, MA 02139, USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+\end{example}
+
+\section*{Preamble}
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software---to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+``work based on the library'' and a ``work that uses the library''. The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+\begin{iftex}
+\section*{TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION}
+\end{iftex}
+\begin{ifinfo}
+\begin{center}
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+\end{center}
+\end{ifinfo}
+
+\begin{enumerate}
+\item
+This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called ``this License''). Each licensee is
+addressed as ``you''.
+
+ A ``library'' means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The ``Library'', below, refers to any such software library or work
+which has been distributed under these terms. A ``work based on the
+Library'' means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term ``modification''.)
+
+ ``Source code'' for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+\item
+You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+\item
+You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+\begin{enumerate}
+\item
+The modified work must itself be a software library.
+
+\item
+You must cause the files modified to carry prominent notices
+stating that you changed the files and the date of any change.
+
+\item
+You must cause the whole of the work to be licensed at no
+charge to all third parties under the terms of this License.
+
+\item
+If a facility in the modified Library refers to a function or a
+table of data to be supplied by an application program that uses
+the facility, other than as an argument passed when the facility
+is invoked, then you must make a good faith effort to ensure that,
+in the event an application does not supply such function or
+table, the facility still operates, and performs whatever part of
+its purpose remains meaningful.
+
+(For example, a function in a library to compute square roots has
+a purpose that is entirely well-defined independent of the
+application. Therefore, Subsection 2d requires that any
+application-supplied function or table used by this function must
+be optional: if the application does not supply it, the square
+root function must still compute square roots.)
+\end{enumerate}
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+\item
+You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+\item
+You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+\item
+A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a ``work that uses the Library''. Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a ``work that uses the Library'' with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a ``work that uses the
+library''. The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a ``work that uses the Library'' uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+\item
+As an exception to the Sections above, you may also compile or
+link a ``work that uses the Library'' with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+\begin{enumerate}
+\item
+Accompany the work with the complete corresponding
+machine-readable source code for the Library including whatever
+changes were used in the work (which must be distributed under
+Sections 1 and 2 above); and, if the work is an executable linked
+with the Library, with the complete machine-readable ``work that
+uses the Library'', as object code and/or source code, so that the
+user can modify the Library and then relink to produce a modified
+executable containing the modified Library. (It is understood
+that the user who changes the contents of definitions files in the
+Library will not necessarily be able to recompile the application
+to use the modified definitions.)
+
+\item
+Accompany the work with a written offer, valid for at
+least three years, to give the same user the materials
+specified in Subsection 6a, above, for a charge no more
+than the cost of performing this distribution.
+
+\item
+If distribution of the work is made by offering access to copy
+from a designated place, offer equivalent access to copy the above
+specified materials from the same place.
+
+\item
+Verify that the user has already received a copy of these
+materials or that you have already sent this user a copy.
+\end{enumerate}
+
+ For an executable, the required form of the ``work that uses the
+Library'' must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+\item
+You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+\begin{enumerate}
+\item
+Accompany the combined library with a copy of the same work
+based on the Library, uncombined with any other library
+facilities. This must be distributed under the terms of the
+Sections above.
+
+\item
+Give prominent notice with the combined library of the fact
+that part of it is a work based on the Library, and explaining
+where to find the accompanying uncombined form of the same work.
+\end{enumerate}
+
+\item
+You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+\item
+You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+\item
+Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+\item
+If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+\item
+If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+\item
+The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+``any later version'', you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+\item
+If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+\begin{iftex}
+\section*{NO WARRANTY}
+\end{iftex}
+\begin{ifinfo}
+\begin{center}
+NO WARRANTY
+\end{center}
+\end{ifinfo}
+
+\item
+BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY ``AS IS'' WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+\item
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+\end{enumerate}
+
+\begin{iftex}
+\section*{END OF TERMS AND CONDITIONS}
+\end{iftex}
+\begin{ifinfo}
+\begin{center}
+END OF TERMS AND CONDITIONS
+\end{center}
+\end{ifinfo}
+
+\clearpage
+
+\section*{How to Apply These Terms to Your New Libraries}
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+``copyright'' line and a pointer to where the full notice is found.
+
+\begin{smallexample}
+\var{one line to give the library's name and an idea of what it does.}
+Copyright (C) \var{year} \var{name of author}
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this library; if not, write to the
+Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+MA 02139, USA.
+\end{smallexample}
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a ``copyright disclaimer'' for the library, if
+necessary. Here is a sample; alter the names:
+
+\begin{example}
+Yoyodyne, Inc., hereby disclaims all copyright interest in
+the library `Frob' (a library for tweaking knobs) written
+by James Random Hacker.
+
+\var{signature of Ty Coon}, 1 April 1990
+Ty Coon, President of Vice
+\end{example}
+
+That's all there is to it!
diff --git a/bits/bbdb-filters/doc/main.texinfo b/bits/bbdb-filters/doc/main.texinfo
new file mode 100644
index 0000000..7edb948
--- /dev/null
+++ b/bits/bbdb-filters/doc/main.texinfo
@@ -0,0 +1,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}
+
diff --git a/bits/bbdb-filters/doc/makefile b/bits/bbdb-filters/doc/makefile
new file mode 100644
index 0000000..3feac99
--- /dev/null
+++ b/bits/bbdb-filters/doc/makefile
@@ -0,0 +1,159 @@
+#
+# RCS makefile,v 1.1.1.1 1995/08/07 08:43:10 mohsen Exp
+#
+
+# The name of the file
+MANUAL=main
+INFOFILE= bbdb-filters.info
+
+TEXPARTS =
+
+EPSFIGS =
+
+TGRINDS =
+
+EOEBASE = /usr/public/eoe/lisp/public/bbdbPlus
+EOEINFO = /usr/public/eoe/info
+
+# The name of your DVI to PS filter
+DVIPS=dvips -f
+
+# The name of your GNU Emacs
+EMACS= xemacs
+
+LATEXINFO= /usr/public/tex/latexinfo1.7
+
+###
+### SHOUL NOT HAVE TO TOUCH ANYTHING BELOW HERE
+###
+SHELL=/bin/sh
+
+.SUFFIXES:
+.SUFFIXES: .lpr .ps .tty .xdvi .dvi .tex .ptex .eps .fig .c
+
+.fig.eps:
+ fig2dev -L ps $< > $@
+
+.c.tex:
+ tgrind -f $< > $@
+
+
+# DEFAULT TARGET
+#all: $(INFOFILE) $(MANUAL).ps
+all: fast.ps
+
+$(INFOFILE): $(MANUAL).tex $(TEXPARTS)
+ rm -f makeinfo.el
+ sed -e "s+MANUAL+$(MANUAL)+" \
+ -e "s+LATEXINFO+$(LATEXINFO)+" $(LATEXINFO)/local/makeinfo.tmplt > makeinfo.el
+ $(EMACS) -batch -q -l makeinfo.el
+ #cp $(INFOFILE) /usr/public/eoe/info
+
+$(MANUAL).tex: $(MANUAL).texinfo $(TEXPARTS)
+ sed -e "s+INFOFILE+$(INFOFILE)+" $(MANUAL).texinfo | expand > $(MANUAL).tex
+ -rm -f maketex.el
+ sed -e "s+MANUAL+$(MANUAL)+" \
+ -e "s+LATEXINFO+$(LATEXINFO)+" $(LATEXINFO)/local/maketex.tmplt > maketex.el
+ $(EMACS) -batch -q -l maketex.el
+
+$(MANUAL).hyperlatex: $(MANUAL).texinfo $(TEXPARTS)
+ sed -e "s+INFOFILE+$(INFOFILE)+" $(MANUAL).texinfo | expand > $(MANUAL).hyperlatex
+ -rm -f makehyperlatex.el
+ sed -e "s+MANUAL+$(MANUAL)+" \
+ -e "s+LATEXINFO+$(LATEXINFO)+" $(LATEXINFO)/local/makehyperlatex.tmplt > makehyperlatex.el
+ $(EMACS) -batch -q -l makehyperlatex.el
+
+$(MANUAL).dvi: $(MANUAL).tex $(EPSFIGS) $(TGRINDS)
+ latex2dvi $(MANUAL).tex
+
+$(MANUAL).bbl:
+ latex $(MANUAL)
+ -bibtex $(MANUAL)
+ latex $(MANUAL)
+
+$(MANUAL).xdvi: $(MANUAL).dvi
+ xdvi $(MANUAL).dvi &
+
+$(MANUAL).ps: $(MANUAL).dvi
+ $(DVIPS) $(MANUAL) > $(MANUAL).ps
+
+$(MANUAL).lpr: $(MANUAL).ps
+ lpr $(MANUAL).ps
+
+info: $(INFOFILE)
+ -echo Built $(INFOFILE)
+
+$(MANUAL).html: $(MANUAL)/$(MANUAL).html
+ -echo Building $(MANUAL)/$(MANUAL).html
+
+$(MANUAL)/$(MANUAL).html: $(MANUAL).dvi $(MANUAL).htmlTex
+ /usr/public/src/Sol-2/networking/www/latex2html-95.1/latex2html $(MANUAL).tex
+
+EMACSBASE = /opt/public/networking/www/hyperlatex-1.3/emacs
+
+html: $(MANUAL).hyperlatex # $(MANUAL).dvi
+ -mkdir bbdbFilters
+ $(EMACS) -batch -no-init-file -no-site-file \
+ -l $(EMACSBASE)/hyperlatex1.el -funcall batch-hyperlatex-format $(MANUAL).hyperlatex
+ echo latex \'\\def\\makegifs{}\\input{$(MANUAL).hyperlatex}\' > dolatex.sh
+ #sh dolatex.sh ; /bin/rm dolatex.sh
+ #sh $(MANUAL).makegif
+
+install: $(INFOFILE)
+ cp $(INFOFILE) $(EOEINFO)/$(INFOFILE)
+
+#
+# Fast Processing
+#
+
+fast.tex: $(MANUAL).texinfo $(TEXPARTS)
+ sed -e "s+INFOFILE+$(INFOFILE)+" -e "s+mbinput+input+" $(MANUAL).texinfo | expand > fast.tex
+
+fast.dvi: fast.tex $(EPSFIGS) $(TGRINDS)
+ latex fast.tex
+
+fast.xdvi: fast.dvi
+ xdvi fast.dvi &
+
+fast.ps: fast.dvi
+ $(DVIPS) fast > fast.ps
+
+fast.xps: fast.ps
+ pageview fast.ps &
+
+fast.lpr: fast.ps
+ lpr fast.ps
+
+
+# TeX Figures for when dvi files are needed. Just an example
+#XX.tex YY.tex: XX.fig YY.fig
+# transfig -m 1.00 -L eepic -M fig.make XX.fig YY.fig
+# make -f fig.make
+
+# Encapsulated PostScript figures -- Done by the Suffix rules
+#XX.eps: XX.fig
+# fig2dev -L ps -m 1.0 $< > $@
+
+# Src Code
+#cot-calling.tex: cot-calling.c
+# tgrind -f $< > $@
+
+
+shar::
+ split $(MANUAL).tex $(MANUAL)-
+
+clean:
+ rm -f $(MANUAL).log $(MANUAL).blg makeinfo.el maketex.el *~ #~
+
+veryclean: clean
+ rm -f $(MANUAL).ps $(MANUAL).dvi $(MANUAL).dlog $(MANUAL).info
+
+realclean: veryclean
+ rm -f $(MANUAL).aux $(MANUAL).bbl $(MANUAL).blg $(MANUAL).cp \
+ $(MANUAL).toc $(MANUAL).cps $(MANUAL).lot $(MANUAL).lof fig.make \
+ $(MANUAL).auxO $(MANUAL).fn $(MANUAL).fns \
+ transfig.tex $(MANUAL).tex $(INFOFILE) \
+ $(MANUAL).hyperlatex makehyperlatex.el dolatex.sh \
+ fast.aux fast.dvi fast.log fast.ps fast.tex fast.toc fast.cp fast.fn \
+ $(EPSFIGS) $(TGRINDS)
+
diff --git a/bits/bbdb-filters/makefile b/bits/bbdb-filters/makefile
new file mode 100644
index 0000000..9959f0e
--- /dev/null
+++ b/bits/bbdb-filters/makefile
@@ -0,0 +1,67 @@
+# This file is part of the BBDB Filters Package. BBDB Filters Package is a
+# collection of input and output filters for BBDB.
+#
+# Copyright (C) 1995 Neda Communications, Inc.
+# Prepared by Mohsen Banan (mohsen@neda.com)
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version. This library is
+# distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details. You should have received a copy of the GNU
+# Library General Public License along with this library; if not, write
+# to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
+# USA.
+#
+#
+
+# Makefile for the Insidious Big Brother Database -- Input and Output Filters
+#
+# RCS makefile,v 1.2 1995/08/08 01:20:32 mohsen Exp
+#
+
+EOEBASE = /usr/public/eoe/lisp/public/bbdbPlus
+EOEINFO = /usr/public/eoe/info
+EMACS = xemacs
+
+
+# You shouldn't need to change anything after this point.
+
+SRCS = bbdb-ccmail.el bbdb-eudora.el bbdb-export.el bbdb-hp200lx.el bbdb-ph.el bbdb-passwd.el
+
+SHELL=/bin/sh
+
+.SUFFIXES:
+.SUFFIXES: .elc .el
+
+.el.elc:
+ $(EMACS) -batch -q -f batch-byte-compile $(@:.elc=.el)
+
+default:
+ @echo Targets: install clean shar
+
+install:
+ cp $(SRCS) $(EOEBASE)
+ cd doc; make EOEBASE=$(EOEBASE) EOEINFO=$(EOEINFO) install
+
+clean:
+ -/bin/rm *.elc package.shar
+ cd doc; make EOEBASE=$(EOEBASE) EOEINFO=$(EOEINFO) clean
+
+
+shar: $(SRCS) makefile
+ shar -o package.shar $(SRCS) makefile COPYING.LIB README \
+ doc doc/main.texinfo doc/lgpl.tex doc/makefile \
+ doc/formatted doc/formatted/bbdb-filters.info
+
+
+FORFTPING = /h8/var/ftp/pub/eoe/bbdbPlus/bbdb-filters-0.2.tar
+
+tar: $(SRCS) makefile
+ tar cvf $(FORFTPING) .
+
+
+
diff --git a/bits/bbdb-funcs.txt b/bits/bbdb-funcs.txt
new file mode 100644
index 0000000..14a8180
--- /dev/null
+++ b/bits/bbdb-funcs.txt
@@ -0,0 +1,383 @@
+Navigation: Table of Contents, Index, next: .emacs file by Alex, prev: Emacs
+
+BBDB Elisp Code
+
+Overview:
+
+ * Unmigrating from file format 4
+ * Writing a .mailrc from BBDB
+ * Writing a Pine addressbook from BBDB, by Matt McClure
+ * Editing and formatting addresses with the country patch
+ o A new address editing function
+ o Adding a new formatting function
+ + The identifying function
+ + The formatting function
+ + Print formatting of addresses
+
+Unmigrating from file format 4
+
+(defun bbdb-unmigrate-stuff (&optional new-version)
+ "Create a buffer with unmigrated BBDB data.
+Usefull if you fooled around with BBDB file format 4 by Alex and want to
+start using the official BBDB 2.00.06 again. In order to do that, you
+have to save your .bbdb in BBDB file format 3 instead of the file format 4
+introduced by Alex. This function will create a *BBDB Version 3* buffer
+for you, which you can examine and save as your new .bbdb. The unmigration
+will strip the country fields of all entries in your BBDB as such a field
+did not exist in the BBDB file format 3 used in BBDB 2.00.06."
+ (interactive "nUnmigrate to version (I recommend version 3): ")
+ (if (null new-version)
+ (setq new-version 3))
+ (if (>= new-version bbdb-file-format)
+ (error "Current BBDB file format is version %d" bbdb-file-format)
+ (let* ((records (bbdb-records))
+ (propnames (bbdb-with-db-buffer bbdb-propnames))
+ (rec)
+ (bbdb-file-format-migration (cons bbdb-file-format new-version))
+ (buf (get-buffer-create (format "*BBDB Version %d*" (cdr bbdb-file-format-migration)))))
+ (message "Unconverting the BBDB database...")
+ (set-buffer buf)
+ (erase-buffer)
+ (insert (format (concat ";;; file-version: %d\n"
+ ";;; user-fields: %S\n")
+ new-version (mapcar (function (lambda (x) (intern (car x))))
+ propnames)))
+ (while records
+ (setq rec (copy-sequence (car records)))
+ (bbdb-unmigrate-record rec)
+ (aset rec 8 nil)
+ (insert (format "%S\n" rec))
+ (setq records (cdr records)))
+ (pop-to-buffer buf)
+ (message "Unconverting the BBDB database...done"))))
+
+Writing a .mailrc from BBDB
+
+The following will export a very primitive version of your BBDB information
+into a .mailrc file which is used for normal mail(1) and Emacs Rmail.
+
+Usually the main problem when exporting BBDB to other formats is the
+creation of an ALIAS name. In my example below I just use LASTNAME. The
+following function tries to write your BBDB into a .mailrc file, like this:
+
+alias LASTNAME "FULL_NAME <NETADDRESS>"
+
+mail-groups defined via the mail-alias field are not supported, but see Matt
+McClure's code further down the page for an example on how to do this.
+
+I used the same code as bbdb-print for the file-name. Unfortunately this
+very simple code must have a bug somewhere. It only occurs if you test it a
+lot: When you are prompted for a file-name, "~/bbdb.tex" or "~/.mailrc" is
+the default. Press RET. Sometimes this will find-file the correct file, and
+sometimes you will overwrite your selected buffer instead. I haven't looked
+into this, however. :(
+
+(defvar bbdb-mailrc-file-name ".mailrc"
+ "Filename to write mail aliases to.")
+
+(defun bbdb-write-mailrc (visible-records to-file)
+ (interactive (list (bbdb-do-all-records-p)
+ (read-file-name "Export To File: " bbdb-mailrc-file-name)))
+ (setq bbdb-mailrc-file-name (expand-file-name to-file))
+ ;; `good' are people with netaddresses, `bad' are people without. The
+ ;; people are taken of the list records and put on either the good or
+ ;; the bad list.
+ (let ((good '()) (bad '())
+ (records (if (not visible-records)
+ (bbdb-records)
+ (set-buffer bbdb-buffer-name)
+ (mapcar 'car bbdb-records))))
+ ;; Open .mailrc file
+ (find-file bbdb-mailrc-file-name)
+ (widen)
+ (erase-buffer)
+ ;; Loop through records to print.
+ (while records
+ (if (bbdb-record-net (car records))
+ (setq good (cons (car records) good))
+ (setq bad (cons (car records) bad)))
+ (setq records (cdr records)))
+ ;; write all net-addresses into .mailrc
+ (insert (mapconcat (function (lambda (x)
+ (let ((name (bbdb-dwim-net-address x))
+ (alias (bbdb-record-lastname x)))
+ (concat "alias "
+ alias
+ " \""
+ (if (string-match "\"\\(.*\\)\"\\(.*\\)" name)
+ (format "%s%s" (match-string 1 name)
+ (match-string 2 name))
+ name)
+ "\""))))
+ (nreverse good)
+ "\n"))
+ ;; Mail groups
+
+ ;; not implemented, yet
+
+ ;; Feedback on the output quality.
+ (if bad
+ (message "There were %d people with bad or missing net addresses."
+ (length bad))
+ (message "Done."))))
+
+Writing a Pine addressbook from BBDB, by Matt McClure
+
+From: Matt McClure <matthew.mcclure.es.99@aya.yale.edu>
+Subject: Re: conversion to pine addressbook?
+Date: Wed, 25 Aug 1999 10:12:50 -0400 (EDT)
+
+It isn't pretty, but this will create a pine addressbook.
+It also supports the mail-alias field (inefficiently, but it works).
+I don't think it should be too difficult to modify to create mailrc
+files instead.
+
+Thanks to Alex for the start.
+
+Matt
+
+;;;;;
+
+(defvar bbdb-mailrc-file-name "~/.addressbook"
+ "Filename to write mail aliases to.")
+
+(defun bbdb-write-dot-addressbook (to-file)
+ (interactive (list (read-file-name "Export To File: " "" nil nil bbdb-mailrc-file-name)))
+ (setq bbdb-mailrc-file-name (expand-file-name to-file))
+ ;; `good' are people with netaddresses, `bad' are people without. The
+ ;; people are taken of the list records and put on either the good or
+ ;; the bad list.
+ (let ((good '()) (bad '())
+ (records (bbdb-records))
+ (grouped-good '()) (grouped-bad '())
+ (grouped-records (bbdb-records))
+ (mail-groups-alist '()))
+ ;; Open .mailrc file
+ (find-file bbdb-mailrc-file-name)
+ (widen)
+ (erase-buffer)
+ ;; Loop through records to print.
+ (while records
+ (if (bbdb-record-net (car records))
+ (setq good (cons (car records) good))
+ (setq bad (cons (car records) bad)))
+ (setq records (cdr records)))
+ ;; write all net-addresses into .mailrc
+ (insert (mapconcat
+ (function (lambda (x)
+ (let ((alias (concat (bbdb-record-firstname x)
+ " "
+ (bbdb-record-lastname x)))
+ (name (concat (bbdb-record-lastname x)
+ ", "
+ (bbdb-record-firstname x)))
+ (email (car (bbdb-record-net x)))
+ )
+ (concat alias
+ "\t"
+ name
+ "\t"
+ email
+ )
+ )))
+ (nreverse good)
+ "\n"))
+ ;; Mail groups
+ ;; get the mail-aliases
+ (while grouped-records
+ (if (and
+ (bbdb-record-net (car grouped-records))
+ (assoc 'mail-alias (bbdb-record-raw-notes (car grouped-records))))
+ (setq grouped-good (cons (car grouped-records) grouped-good))
+ (setq grouped-bad (cons (car grouped-records) grouped-bad)))
+ (setq grouped-records (cdr grouped-records)))
+
+ (while grouped-good
+ (let ((aliases (split-string
+ (cdr (assoc 'mail-alias
+ (bbdb-record-raw-notes (car grouped-good))))
+ "[, \f\t\n\r\v]+")))
+ (while aliases
+ ;; store the name associated with alias somehow
+ (setq mail-groups-alist
+ (cons (cons (car aliases)
+ (concat "\""
+ (bbdb-record-firstname (car grouped-good))
+ " "
+ (bbdb-record-lastname (car grouped-good))
+ "\""))
+ mail-groups-alist))
+ (setq aliases (cdr aliases))))
+ (setq grouped-good (cdr grouped-good)))
+
+ (setq mail-groups-alist (sort mail-groups-alist
+ (lambda (x y)
+ (string< (car x) (car y)))))
+
+ ;; put each name from mail-groups-alist into the appropriate mail aliases
+ (setq assn '("" . ""))
+ (while mail-groups-alist
+ (let ((assn-new (car mail-groups-alist)))
+ (if (string= (car assn) "")
+ (insert (concat "\n" (car assn-new) "\t\t("))
+ (if (not (string= (car assn) (car assn-new)))
+ (insert (concat ")\n" (car assn-new) "\t\t("))))
+ (insert (concat (cdr assn-new) ","))
+ (setq mail-groups-alist (cdr mail-groups-alist))
+ (setq assn assn-new)))
+
+ (if (not (string= (car assn) ""))
+ (insert ")\n"))
+
+ ;; Feedback on the output quality.
+ (if bad
+ (message "There were %d people with bad or missing net addresses."
+ (length bad))
+ (message "Done."))))
+
+Editing and formatting addresses with the country patch
+
+If you are using my country patch to BBDB, you might want to use a different
+address editing function or add new address formating functions. The
+following shows you how to go about doing that.
+
+A new address editing function
+
+You can only have one active input function at the time. The name of the
+active input function is stored in the variable
+`bbdb-address-editing-function'. Therefore, you will have to write a new
+address editing function and you will have to set
+`bbdb-address-editing-function'.
+
+The easiest way to go about this, is using paste and copy: use
+`bbdb-address-edit-default' as a starting point.
+
+(defun bbdb-address-edit-continental-german (addr)
+ "Function to use for address editing.
+The sub-fields are queried using the continental order and using German
+prompts. This is an alternate value for `bbdb-address-editing-function'.
+It is used by German speaking users.
+
+The sub-fields and the prompts used are:
+Strasse, Zeile 1: street1
+Strasse, Zeile 2: street2
+Strasse, Zeile 3: street3
+PLZ: zip
+Stadt: city
+Region/Staat: state
+Land: country"
+ (let* ((st1 (bbdb-read-string "Strasse, Zeile 1: " (bbdb-address-street1 addr)))
+ (st2 (if (string= st1 "") ""
+ (bbdb-read-string "Strasse, Zeile 2: " (bbdb-address-street2 addr))))
+ (st3 (if (string= st2 "") ""
+ (bbdb-read-string "Strasse, Zeile 3: " (bbdb-address-street3 addr))))
+ (zip (bbdb-error-retry
+ (bbdb-parse-zip-string
+ (bbdb-read-string "PLZ: " (bbdb-address-zip-string addr)))))
+ (cty (bbdb-read-string "Stadt: " (bbdb-address-city addr)))
+ (ste (bbdb-read-string "Region/Staat: " (bbdb-address-state addr)))
+ (country (bbdb-read-string "Land: " (bbdb-address-country addr))))
+ (bbdb-address-set-street1 addr st1)
+ (bbdb-address-set-street2 addr st2)
+ (bbdb-address-set-street3 addr st3)
+ (bbdb-address-set-city addr cty)
+ (bbdb-address-set-state addr ste)
+ (bbdb-address-set-zip addr zip)
+ (bbdb-address-set-country addr country)
+ nil))
+(setq bbdb-address-editing-function 'bbdb-address-edit-continental-german)
+
+Adding a new formatting function
+
+You will have to add a new entry to `bbdb-address-formatting-alist'. The new
+entry must be a cons cell consisting of an identifying function and a
+formatting function.
+
+I'll use a Japanese format as an example. Please note that I don't really
+know how Japanese mail is formatted in Japan. The following reflects
+international standards for mail from outside Japan being sent to a Japanese
+address.
+
+First we'll start by adding the identifying function and the formatting
+function to `bbdb-address-formatting-alist'. This will controll address
+formatting in the *BBDB* buffer.
+
+(add-to-list 'bbdb-address-formatting-alist
+ '(bbdb-address-is-japanese . bbdb-format-address-japanese))
+
+The identifying function
+
+The function can do any testing it likes with the address received. In this
+case we just test for the country name "Japan".
+
+(defun bbdb-address-is-japanese (addr)
+ "Return non-nil if the address ADDR is a japanese address.
+
+This is a possible identifying function for
+`bbdb-address-formatting-alist' and
+`bbdb-address-print-formatting-alist'."
+ (and (string= (upcase (bbdb-address-country addr)) "JAPAN")))
+
+The formatting function
+
+Another paste and copy event: use `bbdb-format-address-default' as a
+starting point.
+
+(defun bbdb-format-address-japanese (addr)
+ "Insert formated Japanese address ADDR in current buffer.
+
+This is what it looks like:
+ location: street1
+ street2
+ street3
+ city
+ state
+ zip country"
+ (insert (format " %14s: " (bbdb-address-location addr)))
+ (bbdb-format-streets addr)
+ (let ((c (bbdb-address-city addr))
+ (s (bbdb-address-state addr))
+ (z (bbdb-address-zip-string addr))
+ (y (bbdb-address-country addr)))
+ (if (or (> (length c) 0)
+ (> (length s) 0)
+ (> (length z) 0)
+ (> (length y) 0))
+ (progn
+ (if (> (length c) 0)
+ (progn
+ (indent-to 17)
+ (insert c "\n")))
+ (if (> (length s) 0)
+ (progn
+ (indent-to 17)
+ (insert s "\n")))
+ (if (or (> (length z) 0)
+ (> (length y) 0))
+ (progn
+ (indent-to 17)
+ (if (> (length z) 0)
+ (insert z (if (> (length y) 0) " " "")))
+ (if (> (length y) 0)
+ (insert y))
+ (insert "\n" "")))))))
+
+Print formatting of addresses
+
+This works just like the example above. Instead of adding the identifying
+and formatting functions to `bbdb-address-formatting-alist', you add the two
+functions to `bbdb-address-print-formatting-alist'. You can use the same
+identifying function that you used in `bbdb-address-formatting-alist'. The
+only thing you will have to code up is a print formatting function. It will
+be very similar to the normal formatting function. Use
+`bbdb-print-format-address-default' as a starting point. The details are
+left as an exercise to the reader.
+----------------------------------------------------------------------------
+
+Navigation: Top, Table of Contents, Index, next: .emacs file by Alex, prev:
+Emacs
+----------------------------------------------------------------------------
+http://hammer.prohosting.com/~gumbart/bbdb-funcs.html / Alex Schroeder
+<a.schroeder@bsiag.ch> / updated: 2000-03-10 / significant changes:
+2000-02-11
+----------------------------------------------------------------------------
diff --git a/bits/bbdb-mail-folders.el b/bits/bbdb-mail-folders.el
new file mode 100644
index 0000000..5f286a6
--- /dev/null
+++ b/bits/bbdb-mail-folders.el
@@ -0,0 +1,121 @@
+From: Geoffroy Ville <ville@isr.umd.edu>
+Subject: bbdb/mail-folders
+Date: 20 Nov 1998 00:00:00 GMT
+Message-ID: <6azlnl56h9v.fsf@einstein.isr.umd.edu>
+Sender: ville@einstein.isr.umd.edu
+Organization: University of Maryland, College Park
+X-Url: http://www.cenaath.cena.dgac.fr/~ville/
+Newsgroups: gnu.emacs.sources,gnu.emacs.vm.info
+
+
+Just thought I would repost this piece of code after today's
+improvement. Cengiz told me he does not use it hence does not maintain it
+anymore.
+
+I do not remember where I got it from originally, thus this post in sources
+and vm.info.
+
+For BBDB users, this code allows you to have several mail-folder by default
+for a given author. Saving one mail creates automaically the entry if none, or
+allows you to select which among the existing one you want, or add a new one.
+Very useful when several people you know are involved in many different
+projects. After a while, a typical entry would look like this:
+
+ mail-folders: ("~/Mail/project1" "~/Mail/project2" "~/Mail/personal")
+
+My 2 cts addition is an expand file-name to get rid of possible duplicate
+paths to the same file and a file-name-abbrevation to keep it ~/Mail for
+example (very useful for me because I changed sites twice in the recent years
+and had different home directories).
+
+I'm just *sharing* the code and will not have time to maintain it further. But
+if it's buggy or outdated by some new feature of I_do_not_know_what, please
+tell me :-)
+
+--- bbdb-mail-folders.el ---
+;A while back Roland posted advices to enable a mail-folder
+;property. This property was used as the default folder name while
+;saving messages in vm.
+
+;I have improved that in two ways:
+;1. It is now a list of folder names, the first one on this list
+; becomes the default folder name and the other names are pushed to
+; the file-name history so that one can scroll through them using the
+; history mechanisms. This is useful if you are saving mail from a
+; person to more than one folder.
+;2. This property is created and updated automatically when a message
+; is saved to a folder so that the list is in MRU (most recently
+; used) order. This is useful, because I am lazy to set the
+; mail-folder property by hand.
+
+;I renamed the property to mail-folders so that it does not break with
+;the existing mail-folder property.
+
+;Enjoy. Bug fixes are welcome.
+
+;Cengiz
+
+;--
+;Cengiz Alaettinoglu Information Sciences Institute
+;(310) 822-1511 University of Southern California
+;http://www.isi.edu/div7/people/cengiz.home
+
+;$Modified: Fri Nov 20 11:41:56 1998 by ville@isr.umd.edu $
+; GV: - always expand filename to avoid duplicate similar path
+; - use abbreviation alist for home directory (comes from mode-line)
+
+(defvar bbdb/vm-mail-folders-file-name-history nil "")
+
+(defvar bbdb/file-name-abbreviation-alist
+ (list
+ (cons (concat "^" (expand-file-name "~") "/") "~/")
+ )
+)
+
+(defadvice vm-save-message (around bbdb/vm-mail-folders activate compile)
+ "cache"
+ (let* ((folder-name "")
+ (record (bbdb/vm-update-record nil))
+ (mail-folders (and record (bbdb-record-getprop record 'mail-folders)))
+ (folder-list (and mail-folders (car (read-from-string mail-folders)))))
+ ad-do-it
+ (setq folder-name (ad-get-arg 0))
+ (setq folder-name (expand-file-name folder-name vm-folder-directory))
+ (setq folder-name (string-replace-regexp-alist
+ folder-name bbdb/file-name-abbreviation-alist))
+ (setq file-name-history
+ (append (list folder-name) bbdb/vm-mail-folders-file-name-history))
+ (and record
+ (progn
+ (setq folder-list (delete folder-name folder-list))
+ (setq folder-list (append (list folder-name) folder-list))
+ (bbdb-record-putprop record 'mail-folders
+ (prin1-to-string folder-list))
+ )
+ )
+ )
+ )
+
+(defadvice vm-auto-select-folder (around bbdb/vm-mail-folders activate compile)
+ "If the message sender's BBDB entry has a `mail-folder' property, use that."
+ (let* ((record (bbdb/vm-update-record nil))
+ (mail-folders (and record (bbdb-record-getprop record 'mail-folders)))
+ (folder-list (and mail-folders (car (read-from-string mail-folders))))
+ (folder-name (and folder-list (car folder-list))))
+ (setq bbdb/vm-mail-folders-file-name-history file-name-history)
+ (and (cdr folder-list)
+ (setq file-name-history
+ (append (cdr folder-list) file-name-history)))
+ (if folder-name
+ (setq ad-return-value (file-name-nondirectory folder-name))
+ ad-do-it)
+ )
+ )
+
+(provide 'bbdb-mail-folders)
+
+--- end ---
+
+Enjoy,
+
+-- Geoffroy
diff --git a/bits/gnus-bbdb.el b/bits/gnus-bbdb.el
new file mode 100644
index 0000000..fcc5717
--- /dev/null
+++ b/bits/gnus-bbdb.el
@@ -0,0 +1,300 @@
+;;; gnus-bbdb.el - gnus functions which utilize bbdb data
+;;; $Id$
+;;; We require rfc822.el here as it handles comma-separated lists of
+;;; addresses, which is needed for gnus-bbdb-split-method. If someone
+;;; knows of a better way to handle this, let me know.
+(require 'bbdb-gnus)
+(require 'rfc822)
+(require 'message)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Finding canonical author data in the BBDB
+;;;
+;;; This feature is largely lifted from the original bbdb-gnus.el by
+;;; JWZ, both in spirit and in code. Variable names have been changed
+;;; to protect the innocent. Any resemblance to real code executing or
+;;; swapped is probably because you've already loaded this.
+;;;
+;;; To use this feature, you need to put this file somewhere on your
+;;; load-path, and the following line into your .gnus file:
+;;;
+;;; (require 'gnus-bbdb) (gnus-bbdb-insinuate-summary-buffer)
+;;;
+
+;;; If you want to change gnus-summary-line-format, do this before
+;;; calling the insinuation function, as it modifies this variable. You
+;;; should also check out the variables defined below for a bit more
+;;; customization you can do.
+(defvar gnus-bbdb-summary-mark-known-posters t "If t, then prefix the names of authors who appear in the BBDB with an identifying mark.")
+(defvar gnus-bbdb-summary-known-poster-mark "+" "This is the default character to prefix author names with if gnus-bbdb-summary-mark-known-posters is t. If the poster's record has an entry in the field named by bbdb-message-marker-field, then that will be used instead.")
+(defvar gnus-bbdb-summary-prefer-bbdb-data t "If t, then for
+posters who are in our BBDB, replace the information provided in the From
+header with data from the BBDB.")
+(defvar gnus-bbdb-summary-prefer-real-names t "If t, then display the poster's name
+from the BBDB if we have one, otherwise display his/her primary net address
+if we have one. If it is set to the symbol bbdb, then real names will be
+used from the BBDB if present, otherwise the net address in the post will be
+used. If gnus-bbdb-summary-prefer-bbdb-data is nil, then this has no
+effect.")
+(defvar gnus-bbdb-summary-user-format-letter "B" "This is the
+gnus-user-format-function- that will be used to insert the information from
+the BBDB in the summary buffer. Unless you've alread got other code using
+user format B, you might as well stick with the default.")
+(defun gnus-bbdb-insinuate-summary-buffer nil "Patch some gnus internals to allow BBDB information to infect the summary buffer. You should call this *after*
+you make any personal changes to gnus-summary-line-format, as it will tweak
+that a little."
+ (let (gslf i (fold case-fold-search))
+ (if case-fold-search
+ (setq case-fold-search nil))
+ (while (setq gslf gnus-summary-line-format i
+ (string-match "\\(%[-0-9,]*\\)[An]" gslf))
+ (setq gnus-summary-line-format
+ (concat (substring gslf 0 i)
+ (substring gslf (match-beginning 1)
+ (match-end 1)) "u"
+ gnus-bbdb-summary-user-format-letter
+ (substring gslf (match-end 0)))))
+ (or (equal fold case-fold-search) (setq case-fold-search fold)))
+ (eval (read (concat "(defun gnus-user-format-function-"
+ gnus-bbdb-summary-user-format-letter " (header) (gnus-bbdb-summary-get-author header))"))))
+
+;;; This code appears to have come originally from bbdb-gnus.el, then
+;;; was hacked by Sudish Joseph ,then hacked
+;;; further by Brian Edmonds .
+(defun gnus-bbdb-summary-get-author (header)
+ "Given a GNUS message header, returns
+the appropriate piece of information to identify the author in a GNUS
+summary line, depending on the settings of the various configuration
+variables. See the documentation for the following variables for more
+details: gnus-bbdb-summary-mark-known-posters
+gnus-bbdb-summary-known-poster-mark gnus-bbdb-summary-prefer-bbdb-data
+gnus-bbdb-summary-prefer-real-names"
+ (let* ((from (mail-header-from header))
+ (data (and (or gnus-bbdb-summary-mark-known-posters
+ gnus-bbdb-summary-show-bbdb-names)
+ (condition-case ()
+ (mail-extract-address-components from)
+ (error nil))))
+ (name (car data))
+ (net (car (cdr data)))
+ (record (and data
+ (bbdb-search-simple name
+ (if (and net bbdb-canonicalize-net-hook)
+ (bbdb-canonicalize-address net) net)))))
+ (if (and record name
+ (member (downcase name) (bbdb-record-net record))) ;; bogon!
+ (setq record nil))
+ (setq name (or (and gnus-bbdb-summary-prefer-bbdb-data
+ (or (and gnus-bbdb-summary-prefer-real-names
+ (and record (bbdb-record-name record)))
+ (and record (bbdb-record-net record)
+ (nth 0 (bbdb-record-net record)))))
+ (and gnus-bbdb-summary-prefer-real-names
+ (or (and (equal gnus-bbdb-summary-prefer-real-names 'bbdb)
+ net) name))
+ net from "Some Smeghead"))
+ (format "%s%s"
+ (or (and record gnus-bbdb-summary-mark-known-posters
+ (or (bbdb-record-getprop record
+ bbdb-message-marker-field)
+ gnus-bbdb-summary-known-poster-mark)) " ")
+ name)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;; Scoring with gnus-score REQUIRES (ding) 0.50 or higher
+;;;
+;;; This is not currently supported by GNUS, but hopefully will be soon.
+;;; Once I know how it will be integrated, there will be instructions
+;;; here on how to use it.
+
+;;;
+;;; The following variables may be changed in your .gnus file to
+;;; customize the scoring behaviour. See their documentation strings
+;;; for more information.
+;;; - gnus-bbdb-score-field
+;;; - gnus-bbdb-score-default
+(defvar gnus-bbdb-score-field 'gnus-score "This variable contains the name
+of the BBDB field which should be checked for a score to add to the net
+addresses in the same record.") (defvar gnus-bbdb-score-default nil "If this
+is set, then every net address in the BBDB that does not have an associated
+score field will be assigned this score. A value of nil implies a default
+score of zero.") (defvar gnus-bbdb-score-alist nil "The text version of the
+scoring structure returned by gnus-bbdb-score. This is built automatically
+from the BBDB.") (defvar gnus-bbdb-score-rebuild-alist t "Set to t to
+rebuild gnus-bbdb-score-alist on the next call to gnus-bbdb-score. This will
+be set automatically if you change a BBDB record which contains a gnus-score
+field.") (add-hook 'bbdb-after-change-hook
+'gnus-bbdb-score-invalidate-alist) (defun gnus-bbdb-score-invalidate-alist
+(rec) "This function is called through bbdb-after-change-hook, and sets
+gnus-bbdb-score-rebuild-alist to t if the changed record contains a
+gnus-score field." (if (bbdb-record-getprop rec gnus-bbdb-score-field) (setq
+gnus-bbdb-score-rebuild-alist t))) (defun gnus-bbdb-score (group) "This
+returns a score alist for GNUS. A score pair will be made for every member
+of the net field in records which also have a gnus-score field. This allows
+the BBDB to serve as a supplemental global score file, with the advantage
+that it can keep up with multiple and changing addresses better than the
+traditionally static global scorefile." (list (condition-case nil (read
+(gnus-bbdb-score-as-text group)) (error (setq gnus-bbdb-score-rebuild-alist
+t) (message "Problem building BBDB score table.") (ding) (sit-for 2) nil))))
+(defun gnus-bbdb-score-as-text (group) "Returns a SCORE file format string
+built from the BBDB." (if (and gnus-bbdb-score-alist (not
+gnus-bbdb-score-rebuild-alist)) nil (setq gnus-bbdb-score-rebuild-alist nil)
+(setq gnus-bbdb-score-alist (concat "((touched nil) (\"from\"\n" (mapconcat
+(lambda (rec) (let ((score (or (bbdb-record-getprop rec
+gnus-bbdb-score-field) gnus-bbdb-score-default)) (net (bbdb-record-net
+rec))) (if (not (and score net)) nil (mapconcat (lambda (addr) (concat "(\""
+addr "\" " score ")\n")) net "")))) (bbdb-records) "") "))")))
+gnus-bbdb-score-alist)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ;;;
+Filing with gnus-folder REQUIRES (ding) 0.50 OR HIGHER
+;;;
+;;; To use this
+feature, you need to put this file somewhere in your
+;;; load-path and add
+the following lines of code to your .gnus file:
+;;;
+;;; (require 'gnus-bbdb)
+
+;;; (setq nnmail-split-methods 'gnus-bbdb-split-method)
+;;;
+;;; You should
+also examine the variables defvar'd below and customize
+;;; them to your
+taste. They're listed roughly in descending likelihood
+;;; of your wanting
+to change them. Once that is done, you need to add
+;;; filing information to
+your BBDB. There are two fields of interest:
+;;;
+;;; 1. gnus-private. This
+field contains the name of the group in which
+;;; mail to you from any of
+the addresses associated with this record
+;;; will be filed. Also, any
+self-copies of mail you send any of the
+;;; same addresses will be filed
+here.
+;;; 2. gnus-public. This field is used to keep mail from mailing lists
+
+;;; out of the private mailboxes. It should be added to a record for
+;;; the
+list submission address, and is formatted as follows:
+;;; "group regexp" ;;;
+where group is where mail from the list should be filed, and
+;;; regexp is a
+regular expression which is checked against the
+;;; envelope sender (from
+the From_ header) to verify that this is
+;;; the copy which came from the
+list. For example, the entry for
+;;; the ding mailing list might be: ;;;
+"mail.emacs.ding ding-request@ifi.uio.no"
+;;; Yes, the second part *is* a
+regexp, so those dots may match
+;;; something other than dots. Sue me. ;;;
+
+;;; Note that you can also specify a gnus-private field for mailing list ;;;
+addresses, in which case self-copies of mail you send to the list
+;;; will
+be filed there. Also, the field names can be changed below if
+;;; the
+defaults aren't hip enough for you. Lastly, if you specify a ;;;
+gnus-private field for your *own* BBDB record, then all self-copies
+;;; of
+mail you send will be filed to that group.
+;;;
+;;; This documentation should
+probably be expanded and moved to a
+;;; separate file, but it's late, and
+*I* know what I'm trying to
+;;; say. :) (defvar
+gnus-bbdb-split-default-group "mail.misc" "If the BBDB doesn't indicate any
+group to spool a message to, it will be spooled to this group. If
+gnus-bbdb-split-crosspost-default is not nil, and if the BBDB did not
+indicate a specific group for one or more addresses, messages will be
+crossposted to this group in addition to any group(s) which the BBDB
+indicated.") (defvar gnus-bbdb-split-nomatch-function nil "This function
+will be called after searching the BBDB if no place to file the message
+could be found. It should return a group name (or list of group names) --
+nnmail-split-fancy as provided with Gnus is an excellent choice.") (defvar
+gnus-bbdb-split-myaddr-regexp (concat "^" (user-login-name) "$\\|^"
+(user-login-name) "@\\([-a-z0-9]+\\.\\)*" (or gnus-local-domain
+(message-make-domain) (system-name) "smeghead\\.baka\\.org") "$") "This
+regular expression should match your address as found in the From header of
+your mail. You should make sure gnus-local-domain or gnus-use-generic-from
+are set before loading this module, if they differ from (system-name). If
+you send mail/news from multiple addresses, then you'll likely have to set
+this yourself anyways.") (defvar gnus-bbdb-split-crosspost-default nil "If
+this variable is not nil, then if the BBDB could not identify a group for
+every mail address, messages will be filed in gnus-bbdb-split-default-group
+in addition to any group(s) which the BBDB identified.") (defvar
+gnus-bbdb-split-private-field 'gnus-private "This variable is used to
+determine the field to reference to find the associated group when saving
+private mail for a network address known to the BBDB. The value of the field
+should be the name of a mail group.") (defvar gnus-bbdb-split-public-field
+'gnus-public "This variable is used to determine the field to reference to
+find the associated group when saving non-private mail (received from a
+mailing list) for a network address known to the BBDB. The value of the
+field should be the name of a mail group, followed by a space, and a regular
+expression to match on the envelope sender to verify that this mail came
+from the list in question.") ;; The split function works by assigning one of
+four spooling priorities ;; to each group that is associated with an address
+in the message. The ;; priorities are assigned as follows: ;; ;; 0. This
+priority is assigned when crosspost-default is nil to To/Cc ;; addresses
+which have no private group defined in the BBDB. If the ;; user's own
+address has no private group defined, then it will ;; always be given this
+priority. ;; 1. This priority is assigned to To/Cc addresses which have a
+private ;; group defined in the BBDB. If crosspost-default is not nil, then
+;; To/Cc addresses which have no private group will also be assigned ;; this
+priority. This is also assigned to the user's own address in ;; the From
+position if a private group is defined for it. ;; 2. This priority is
+assigned to From addresses which have a private ;; group defined in the
+BBDB, except for the user's own address as ;; described under priorities 0
+and 1. ;; 3. This priority is assigned to To/Cc addresses which have a
+public ;; group defined in the BBDB, and whose associated regular expression
+;; matches the envelope sender (found in the header From_). ;; ;; The split
+function evaluates the spool priority for each address in ;; the headers of
+the message, and returns as a list all the groups ;; associated with the
+addresses which share the highest calculated ;; priority. (defun
+gnus-bbdb-split-method nil "This function expects to be called in a buffer
+which contains a mail message to be spooled, and the buffer should be
+narrowed to the message headers. It returns a list of groups to which the
+message should be spooled, using the addresses in the headers and
+information from the BBDB." (let ((prq (list (cons 0 nil) (cons 1 nil) (cons
+2 nil) (cons 3 nil)))) ;; the From: header is special (let* ((hdr (or
+(mail-fetch-field "from") (user-login-name))) (rv (gnus-bbdb-split-to-group
+hdr t))) (setcdr (nth (cdr rv) prq) (cons (car rv) nil))) ;; do the rest of
+the headers (let ((hdr (or (concat (mail-fetch-field "to" nil t) ", "
+(mail-fetch-field "cc" nil t) ", " (mail-fetch-field "apparently-to" nil t))
+""))) (setq hdr (rfc822-addresses hdr)) (while hdr (let* ((rv
+(gnus-bbdb-split-to-group (car hdr))) (pr (nth (cdr rv) prq))) (or (member
+(car rv) pr) (setcdr pr (cons (car rv) (cdr pr))))) (setq hdr (cdr hdr))))
+;; find the highest non-empty queue (setq prq (reverse prq)) (while (and prq
+(not (cdr (car prq)))) (setq prq (cdr prq))) ;; and return... (if (not (or
+(not (cdr (car prq))) (and (equal (cdr (car prq)) (list
+gnus-bbdb-split-default-group)) (symbolp gnus-bbdb-split-nomatch-function)
+(fboundp gnus-bbdb-split-nomatch-function)))) (cdr (car prq)) (goto-char
+(point-min)) (funcall gnus-bbdb-split-nomatch-function)))) (defun
+gnus-bbdb-split-to-group (addr &optional source) "This function is called
+from gnus-bbdb-split-method in order to determine the group and spooling
+priority for a single address." (condition-case tmp (progn (setq tmp
+(mail-extract-address-components addr)) (let* ((nam (car tmp)) (net (if (not
+bbdb-canonicalize-net-hook) (car (cdr tmp)) (bbdb-canonicalize-address (car
+(cdr tmp))))) (rec (bbdb-search-simple nam net)) pub prv rgx) (if (not rec)
+nil (setq prv (bbdb-record-getprop rec gnus-bbdb-split-private-field) pub
+(bbdb-record-getprop rec gnus-bbdb-split-public-field)) (if (and pub (not
+source) (string-match "^\\([^ ]+\\) \\(.*\\)$" pub)) (setq rgx (substring
+pub (match-beginning 2) (match-end 2)) pub (substring pub (match-beginning
+1) (match-end 1))) (setq pub nil))) (cond ((and rgx pub (goto-char
+(point-min)) (re-search-forward "^From \\([^ \n]+\\)[ \n]" nil t)
+(string-match rgx (buffer-substring (match-beginning 1) (match-end 1))))
+(cons pub 3)) (prv (cons prv (- 1 (if source -1 0) (if (string-match
+gnus-bbdb-split-myaddr-regexp net) 1 0)))) (t (cons
+gnus-bbdb-split-default-group (if (string-match
+gnus-bbdb-split-myaddr-regexp net) 0 (if source 2 (if
+gnus-bbdb-split-crosspost-default 1 0)))))))) (error (cons
+gnus-bbdb-split-default-group 0)))) (provide 'gnus-bbdb)
+;;; EOF