Discussion:
[Bitpim-devel] Help with changes to vcard import and last name first
Peter Dufault
2004-07-14 13:47:24 UTC
Permalink
I'd like to make some changes to vcard import. I need some advice
since I'm not familiar enough with the code to know I'm doing the
correct thing, maybe it goes somewhere else in BitPim.

I'd like an option to order by last name on import. The way I think it
works now is if there is a 'FN:' field then that is used and if not a
name is synthesized from the 'N:' field.

So now all doctors are imported in this order (assume only an FN field
for Donald Duck):

"Donald Duck"
"Dr. Sigmund Freud"
"Dr. Albert Einstein"

and they show up in alphabetical order in the phone.

If I added a "import by last name" option to the import code I'd have
it prefer the "N:" field over the "FN:" field. The synthesized names
from the "N" field would be last name first, so we would get:

"Donald Duck" (because no "N:" field)
"Einstein, Dr. Albert"
"Freud, Dr. Sigmund"

Does this make sense? I realize there could be a global "reorder to
last name first" option but that would be too tough for my python
abilities. I also see the Sanyo code, but I'm guessing that is because
the Sanyo specifically supports last names.

Peter

Peter Dufault
HD Associates, Inc.
Peter Dufault
2004-07-14 16:04:55 UTC
Permalink
Post by Peter Dufault
So now all doctors are imported in this order (assume only an FN field
"Donald Duck"
"Dr. Sigmund Freud"
"Dr. Albert Einstein"
In case anyone is confused, I made a mistake. I meant Donald, then
Albert, then Sigmund.

Peter

Peter Dufault
HD Associates, Inc.
Roger Binns
2004-07-15 03:05:31 UTC
Permalink
Post by Peter Dufault
I'd like to make some changes to vcard import. I need some advice
since I'm not familiar enough with the code to know I'm doing the
correct thing, maybe it goes somewhere else in BitPim.
I'd like an option to order by last name on import. The way I think it
works now is if there is a 'FN:' field then that is used and if not a
name is synthesized from the 'N:' field.
Which window are you referring to?

The import dialog is ordered the same as whatever file is read.

The main display is based on which column is clicked.
Post by Peter Dufault
and they show up in alphabetical order in the phone.
The order on LG phones cannot be changed (without losing all
the speeddials and voicedials). Actually once BitPim also
stores the voice dial information, it should be possible
to delete all the entries on the phone and write them out in the
desired order.
Post by Peter Dufault
If I added a "import by last name" option to the import code I'd have
it prefer the "N:" field over the "FN:" field. The synthesized names
The sorting etc is not done in the vcard code, nor is the vcard the
right place to address anything like that.

All entries are converted from the foreign format into the internal
BitPim format. See the top of phonebook.py to see what that format
is.

The phone specific code chooses what order to write things out to the
phone in.
Post by Peter Dufault
Does this make sense? I realize there could be a global "reorder to
last name first" option but that would be too tough for my python
abilities. I also see the Sanyo code, but I'm guessing that is because
the Sanyo specifically supports last names.
Nope, it is because Stephen likes his phone that way and he wrote the
code :-)

What problem are you actually trying to solve?

Roger
Peter Dufault
2004-07-15 11:29:43 UTC
Permalink
Post by Roger Binns
Post by Peter Dufault
I'd like to make some changes to vcard import. I need some advice
since I'm not familiar enough with the code to know I'm doing the
correct thing, maybe it goes somewhere else in BitPim.
I'd like an option to order by last name on import. The way I think it
works now is if there is a 'FN:' field then that is used and if not a
name is synthesized from the 'N:' field.
Which window are you referring to?
I wasn't clear. It's the contact list display on the phone that is the
problem, with all "Dr."s and "Mr."s collected together.
Post by Roger Binns
The order on LG phones cannot be changed (without losing all
the speeddials and voicedials). Actually once BitPim also
stores the voice dial information, it should be possible
to delete all the entries on the phone and write them out in the
desired order.
I don't think it matters, if I enter a new contact on the phone then
the phone displays it in alphabetical order in the contact list. Hmm.
I don't have the phone here, but I need to double check. Maybe I was
always adding something like "Aardvark", and so if the last entries go
to the top of the contact list display then I fooled myself, in which
case I say "Never Mind" and understand your confusion about my
question. I'll check later. I thought regardless of the order BitPim
sent the list the phone displayed it in alphabetical order.

Peter

Peter Dufault
HD Associates, Inc.

Loading...