myPIM

Check-in [89b0122618]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Let // find phone numbers too
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:89b01226180928dfddb65523ec01424ddce71ebb3f01e5c333ab80c50aa4c273
User & Date: ajv-899-334-8894@vsta.org 2012-05-18 16:01:04
Context
2013-11-27
00:23
Factor out day-of-week calc so it gets it right for monthly *and* yearly. check-in: cfa7cd865f user: ajv-899-334-8894@vsta.org tags: master, trunk
2012-05-18
16:01
Let // find phone numbers too check-in: 89b0122618 user: ajv-899-334-8894@vsta.org tags: master, trunk
2011-10-28
21:58
Add Bastille day for Mom check-in: 474b749d79 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to mm.py.

1
2

3
4
5
6
7
8
9
..
32
33
34
35
36
37
38
39
40

41
42
43
44
45
46
47
...
165
166
167
168
169
170
171
172
#!/usr/bin/python
import sys, pim, pdb, os


# Overall collection of open PIM DBs, concatenated
db = None

# Dump out all People entries whose "name" field contains this string
def search_names(persons, str):
    for p in persons:
................................................................................
		p.display()
		print
		found = True
		break
	if found:
	    continue

	# Sweep E-mail addresses
	for a in p.email.itervalues():

	    if a.find(str) >= 0:
		p.display()
		print
		break

def w(str):
    sys.stderr.write(str)
................................................................................
    # Load the database(s)
    load_dbs()

    # Need at least an operation specified
    if len(sys.argv) < 2:
	usage()
    proc(sys.argv)
    # pdb.run('proc(sys.argv)')

|
>







 







|
|
>







 







<
1
2
3
4
5
6
7
8
9
10
..
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
...
167
168
169
170
171
172
173

#!/usr/bin/python
import sys, os, itertools
import pim

# Overall collection of open PIM DBs, concatenated
db = None

# Dump out all People entries whose "name" field contains this string
def search_names(persons, str):
    for p in persons:
................................................................................
		p.display()
		print
		found = True
		break
	if found:
	    continue

	# Sweep E-mail addresses and phone numbers
	for a in itertools.chain(p.email.itervalues(),
		p.phones.itervalues()):
	    if a.find(str) >= 0:
		p.display()
		print
		break

def w(str):
    sys.stderr.write(str)
................................................................................
    # Load the database(s)
    load_dbs()

    # Need at least an operation specified
    if len(sys.argv) < 2:
	usage()
    proc(sys.argv)