View Single Post
epage's Avatar
Posts: 1,684 | Thanked: 1,562 times | Joined on Jun 2008 @ Austin, TX
#199
Originally Posted by les_garten View Post
OK, Just looked close at one with three entries

1 Entry is the original
1 Entry only GV with a phone # and name
1 Entry only GV with a second number and name
Sounds like expected behavior when GV contacts are enabled

Originally Posted by les_garten View Post
The entries with only numbers, no names are who knows what. They just showed up and if I disable GV, they're gone. They may be normally parsed by Company name or another field. But there are hundreds of them.
Yea, I'm concerned Google changed something

We could get a better picture of this by running the following program

Code:
#!/usr/bin/python

import sys
sys.path.insert(0, "/usr/lib/theonering")
import logging
import pprint

import gvoice.backend as backend
import gvoice.addressbook as abook


def print_contacts():
	logging.basicConfig(level=logging.DEBUG)

	args = sys.argv
	username = args[1]
	password = args[2]

	b = backend.GVoiceBackend()
	b.login(username, password)
	assert b.is_authed()

	book = abook.Addressbook(b)
	book.update()
	for number in book.get_numbers():
		pprint.pprint((number, book.get_contact_name(number), book.get_phone_type(number), book.is_blocked(number)))


def print_blank_names():
	logging.basicConfig(level=logging.DEBUG)

	args = sys.argv
	username = args[1]
	password = args[2]

	b = backend.GVoiceBackend()
	b.login(username, password)
	assert b.is_authed()

	book = abook.Addressbook(b)
	book.update()
	for number in book.get_numbers():
		if not book.get_contact_name(number):
			pprint.pprint(book._numbers[number])


if __name__ == "__main__":
	#print_contacts()
	print_blank_names()
This will print out every number of yours and the associated information. Its a lot to look through but we can compare what happens when the names are blank

So save the file, and run it
Code:
python FILE_NAME USERNAME PASSWORD
__________________
770, n810, n900, Ideapad S10-3t
TheOneRing, DialCentral, Gonvert, Quicknote, Multilist, ejpi, nQa, Waters of Shiloah
Programming Blog
 

The Following User Says Thank You to epage For This Useful Post: