* README: Add setting to bind lsdb-toggle-buffer to :.
[elisp/lsdb.git] / README
1 -*- mode: text -*-
2 .* What's LSDB
3
4 LSDB (The Lovely Sister Database) is a rolodex-like database program
5 for SEMI based MUA.  It's intended to be a lightweight relacement for
6 BBDB (The Insidious Big Brother Database).  Unfortunately, it
7 currently doesn't support the all features of BBDB.
8
9 .* Requirements
10 LSDB works under following environment at least:
11
12   - Emacs 20.7
13   - XEmacs 21.4 or later
14
15 You will also need the following libraries:
16
17   - APEL 10.2 or later
18        ftp://ftp.m17n.org/pub/mule/apel/
19   - FLIM 1.12 or later
20        ftp://ftp.m17n.org/pub/mule/flim/
21
22 .* Installation
23
24 .. (a) run in expanded place
25
26 If you don't want to install other directories, please do only
27 following:
28
29         % make
30
31 You can specify the emacs command name, for example
32
33         % make install EMACS=xemacs
34
35 If `EMACS=...' is omitted, EMACS=emacs is used.
36
37 .. (b) make install
38
39 If you want to install other directories, please do following:
40
41         % make install
42
43 .. (c) install as a XEmacs package
44
45 If you want to install to XEmacs package directory, please do
46 following:
47
48         % make install-package
49
50 .* MUA Specific Installation
51
52 There are the convenient ways to get the LSDB functions insinuate into
53 some particular MUA.  Only Semi-gnus and Wanderlust are currently
54 supported.
55
56 If you use Semi-gnus or its variant, put the following lines into your
57 ~/.gnus and you will get the functions in this package autoloaded.
58
59 (autoload 'lsdb-gnus-insinuate "lsdb")
60 (autoload 'lsdb-gnus-insinuate-message "lsdb")
61 (add-hook 'gnus-startup-hook 'lsdb-gnus-insinuate)
62 (add-hook 'message-setup-hook
63           (lambda ()
64              (define-key message-mode-map "\M-\t" 'lsdb-complete-name)))
65 (add-hook 'gnus-summary-mode-hook
66           (lambda ()
67             (define-key gnus-summary-mode-map ":" 'lsdb-toggle-buffer)))
68
69 If you use Wanderlust, put the following lines into your ~/.wl:
70 (require 'lsdb)
71 (lsdb-wl-insinuate)
72 (add-hook 'wl-draft-mode-hook
73           (lambda ()
74              (define-key wl-draft-mode-map "\M-\t" 'lsdb-complete-name)))
75 (add-hook 'wl-summary-mode-hook
76           (lambda ()
77             (define-key wl-summary-mode-map ":" 'lsdb-toggle-buffer)))
78
79 If you use Mew, put the following lines into your ~/.mew:
80 (autoload 'lsdb-mew-insinuate "lsdb")
81 (add-hook 'mew-init-hook 'lsdb-mew-insinuate)
82 (add-hook 'mew-draft-mode-hook
83           (lambda ()
84              (define-key mew-draft-header-map "\M-I" 'lsdb-complete-name)))
85 (add-hook 'mew-summary-mode-hook
86           (lambda ()
87             (define-key mew-summary-mode-map ":" 'lsdb-toggle-buffer)))
88
89 If you use MU-CITE, put the following lines into your ~/.emacs:
90 (autoload 'lsdb-mu-insinuate "lsdb")
91 (eval-after-load "mu-cite"
92   '(lsdb-mu-insinuate))
93
94 If you want to use x-face-e21 instead of the LSDB's builtin X-Face
95 functions, set lsdb-insert-x-face-function as follows:
96 (setq lsdb-insert-x-face-function
97       (lambda (x-face)
98         (require 'x-face-e21)
99         (insert-image (x-face-create-image x-face :scale-factor 0.5))))
100
101 .* Bug Reports
102 If you found bugs, please drop a note to the Lsdb-info Mailing List:
103
104    lsdb-info@lists.sourceforge.jp
105
106 .* File Release
107 Latest version of LSDB can be found at:
108
109    http://sourceforge.jp/projects/lsdb/files/
110
111 .* API
112 The API are quite simple but not written in a way that maximizes
113 flexibility.
114
115 .. Record Management
116 . : Gathering Records
117 .  , lsdb-update-records<f>
118 lsdb-update-records<f> is called from the buffer which contains raw
119 contents of MIME entity.  Once it is called, it returns a list of
120 records which could be gathered from the buffer.
121
122 . : Display Records
123 .  , lsdb-display-record<f>
124 lsdb-display-record<f> takes only one record, pops up a window, and
125 displays the formatted contents of the record within the window.
126 If you want to multiple records such as search results at the same
127 time, use lsdb-display-records<f> instead.
128
129 .. Internal Data Model
130 . : Primary Hash Table
131 lsdb-hash-table is the variable which holds all the records in LSDB.
132 You can operate on this variable in similar fashion to CL's
133 hash-table: lsdb-puthash for puthash, lsdb-gethash to gethash,
134 lsdh-maphash to maphash are available to you.  For example, you can
135 write the following expression to get the record for "Daiki Ueno":
136
137 (lsdb-gethash "Daiki Ueno" lsdb-hash-table)
138
139 =>
140
141 ((last-modified . "2002-04-23")
142  (creation-date . "2002-04-26")
143  (net "ueno@unixuser.org")
144  (mailing-list "emacs-mime-ja")
145  (attribution . "DU")
146  (user-agent "T-gnus/6.15.6 (based on Oort Gnus v0.06) (revision 03)"))
147
148 . : Secondary Hash Tables
149 LSDB can also have one or more secondary hash tables.  These hash
150 tables are mainly used to hint lsdb-hash-table to gather additional
151 relationship information between record name and entries.  For
152 example, lsdb-address-cache is a kind of secondary hash table which
153 maintains the mapping of mail addresses to record names.
154
155 The variable lsdb-secondary-hash-tables holds a list where each
156 element is corresponding to the name of global variable such as
157 lsdb-address-cache.  When the primary hash table is loaded or saved,
158 the secondary hash tables will be handled automatically.
159
160 .  , Operate on Secondary Hash Tables
161 You will need to follow the manner of the LSDB hooks.
162
163 .   ; lsdb-lookup-full-name-functions
164 List of functions to pick up the existing full-name of the sender.
165 The sender is passed to each function as the argument.
166
167 .   ; lsdb-update-record-functions
168 List of functions called after a record is modified.
169 The modified record is passed to each function as the argument.
170
171 .* Development
172 .. CVS
173 Development of LSDB uses CVS.  So latest developing version is
174 available at CVS.
175
176 . : cvs login (first time only)
177
178   % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root login
179
180   CVS password: [CR] # NULL string
181
182 . : checkout
183
184   % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root checkout lsdb
185
186   If you would like to join CVS based development, please send mail to
187
188   cvs@cvs.m17n.org
189
190 with your account name and your public key for ssh.  cvsroot is
191 :ext:cvs@cvs.m17n.org:/cvs/root.
192
193 If you cannot use ssh, please send UNIX /etc/passwd style crypted
194 password.  you can commit with the cvsroot
195 :pserver:<accountname>@cvs.m17n.org:/cvs/root.
196
197 We hope you will join the open development.
198  
199
200 .* Authors
201 Daiki Ueno <ueno@unixuser.org>
202 Hideyuki SHIRAI <shirai@rdmg.mgcs.mei.co.jp> (support for Mew)
203 Yuuichi Teranishi <teranisi@gohome.org>
204
205 .* Local emacs vars.
206 The following `outline-layout' local variable setting:
207   - closes all topics from the first topic to just before the third-to-last,
208   - shows the children of the third to last (config vars)
209   - and the second to last (code section),
210   - and closes the last topic (this local-variables section).
211 Local variables:
212 outline-layout: (0 : -1 -1 0)
213 End: