API
Database
The BBDB database.
bbdb_file()
Return the pathname of your BBDB file.
This is the file referred to by the 'bbdb-file' variable in emacs. The most reliable way to get it is to ask emacs directly.
Source code in src/bbdb/database.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
readdb(path=None)
Read a BBDB database.
Source code in src/bbdb/database.py
11 12 13 14 | |
Model
The BBDB model.
Address
Bases: BBDBModel
A BBDB address.
Source code in src/bbdb/model.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
outputs()
Yield lisp output for this item.
Source code in src/bbdb/model.py
64 65 66 67 68 69 70 71 72 73 | |
set_location(*location)
Set list of location lines.
Source code in src/bbdb/model.py
59 60 61 62 | |
BBDB
Bases: BBDBModel
A BBDB database.
Source code in src/bbdb/model.py
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | |
frombuffer(buf)
staticmethod
Read and return BBDB from a text stream.
Source code in src/bbdb/model.py
263 264 265 266 267 268 269 | |
fromdict(d)
staticmethod
Parse and return BBDB from a dict.
Source code in src/bbdb/model.py
271 272 273 274 275 | |
fromfile(path)
staticmethod
Read and return BBDB from a file.
Source code in src/bbdb/model.py
255 256 257 258 259 260 261 | |
lisp()
Return emacs-lisp representation of the database.
Source code in src/bbdb/model.py
303 304 305 306 | |
outputs()
Yield lisp output for this item.
Source code in src/bbdb/model.py
308 309 310 311 312 313 314 315 316 317 318 319 320 | |
read(f=sys.stdin)
Read and append BBDB records from a stream.
Source code in src/bbdb/model.py
277 278 279 280 281 282 283 284 | |
read_file(path)
Read and append BBDB records from a file.
Source code in src/bbdb/model.py
286 287 288 289 290 | |
write(f=sys.stdout)
Write database to a text stream.
Source code in src/bbdb/model.py
292 293 294 295 | |
write_file(path)
Write database to a file.
Source code in src/bbdb/model.py
297 298 299 300 301 | |
BBDBModel
Bases: BaseModel
Base BBDB data model.
Source code in src/bbdb/model.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
check()
Check object is valid, or raise ValueError.
Source code in src/bbdb/model.py
30 31 32 33 34 35 36 37 | |
dict()
Return a dict representation of the data.
Source code in src/bbdb/model.py
39 40 41 42 | |
json(**kwargs)
Return a JSON representation of the data.
Source code in src/bbdb/model.py
44 45 46 47 | |
Record
Bases: BBDBModel
A BBDB record.
Source code in src/bbdb/model.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | |
name: str
property
Composite name property.
add_address(tag, *location, **kw)
Add an address entry.
Source code in src/bbdb/model.py
153 154 155 156 157 158 | |
add_affix(*names)
Add affix entries.
Source code in src/bbdb/model.py
143 144 145 146 | |
add_aka(*names)
Add AKA entries.
Source code in src/bbdb/model.py
133 134 135 136 | |
add_company(*names)
Add company entries.
Source code in src/bbdb/model.py
138 139 140 141 | |
add_net(*names)
Add network address entries.
Source code in src/bbdb/model.py
160 161 162 163 | |
add_note(tag, text)
Add a notes entry.
Source code in src/bbdb/model.py
165 166 167 168 | |
add_phone(tag, number)
Add a phone number entry.
Source code in src/bbdb/model.py
148 149 150 151 | |
outputs()
Yield lisp output for this item.
Source code in src/bbdb/model.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | |
set_name(first='', last='')
Set the first and last names.
Source code in src/bbdb/model.py
127 128 129 130 131 | |
Parser
The BBDB parser.
BBDBTransformer
Bases: Transformer
Transform parsed tree into a dictionary.
Source code in src/bbdb/parser.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
make_parser(grammarfile='bbdb.lark')
Build a Lark parser using a grammar file.
Source code in src/bbdb/parser.py
17 18 19 20 21 22 23 24 | |
parse(text, parser=None)
Parse some text using a Lark parser.
Source code in src/bbdb/parser.py
10 11 12 13 14 | |