The format for a phonebook entry is standardised. It is a dict with
the following fields. Each field is a list, most important first, with
each item in the list being a dict.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getdata(column,
entry,
default=None)
Returns the value in a particular column. |
source code
|
|
|
|
|
|
|
|
|
|
| workaroundyetanotherwxpythonbug(method,
*args) |
source code
|
|
|
|
|
|
|
comparenames(s,
a)
Give a score on two names |
source code
|
|
|
|
cleanurl(url,
mode='compare')
Returns lowercase url with the "http://" prefix removed and
in lower case |
source code
|
|
|
|
cleanemail(email,
mode='compare')
Returns lowercase email |
source code
|
|
|
|
cleannumber(num)
Returns num (a phone number) with all non-digits removed |
source code
|
|
|
|
comparenumbers(s,
a)
Give a score on two phone numbers |
source code
|
|
|
|
comparefields(s,
a,
valuekey,
threshold=0.8,
lookat=3)
Compares the valuekey field in source and against lists returning a
score for closeness of match |
source code
|
|
|
|
compareallfields(s,
a,
fields,
threshold=0.8,
lookat=3)
Like comparefields, but for source and against lists where multiple
keys have values in each item |
source code
|
|
|
|
|
|
|
|
|
|
mergefields(orig,
imp,
field,
threshold=0.88,
cleaner=<function <lambda> at 0x039A88F0>)
Return the results of merging two lists of fields |
source code
|
|
|
|
comparestrings(origfield,
impfield)
Compares two strings and returns the score using winkler routine from
Febrl (stringcmp.py) |
source code
|
|
|
|
|
|
|
|
|
|
phonebookobjectfactory = database.dataobjectfactory(phonebookd...
|
|
|
ll = ['Home', ('numbers', 0, ('type', 'home'), <function forma...
|
|
|
_getdatatable = {'Address': ('addresses', 0, None, <function f...
|
|
|
AvailableColumns = ['Name', 'First', 'Middle', 'Last', 'Catego...
|
|
|
DefaultColumns = ['Name', 'Phone', 'Phone2', 'Phone3', 'Email'...
|
|
|
ImportColumns = ['Name', 'Categories', 'Home', 'Home2', 'Home3...
|
|
|
CategoryManager = CategoryManager()
|
|
|
nondigits = re.compile(r'[^0-9]')
|
|
|
actual = 'data'
|
|
|
n = 76
|
|
|
pretty = 'Data'
|
|
|
suf = '3'
|
|
|
x = 76
|