Hi all, I'm adding to a little script that I use that dials my phone for me (yes, I'm lazy :).
In Kaddressbook there is a script hook which allows you to call a script when you click on a phone number. Unfortunately it only calls the script with the phone number and I want the name too. I have a feature request on bugs.kde.org but in the mean time I thought I'd just use my script to do it. What I want to do is grep through the Kaddressbook file looking for the number and then extract the block it's in (each block seperated by a blank line). From there I can extract the name and use it. I could probably hack this up with 'grep -A 10 -B 10' or something but I though some of the intelligent people on here might be able to think of a nicer way of doing it. I've attached a snippet of the file below. Anyone have and ideas? Cheers, hads. ------------start vcard file-------------- BEGIN:VCARD FN:Person One REV:2006-01-22T18:57:48Z TEL;TYPE=CELL:+6421XXXXXXX UID:yOGXBfxzmC VERSION:3.0 X-KPILOT-RecordID:11149528 END:VCARD BEGIN:VCARD CLASS:PUBLIC FN:Person Two REV:2006-06-06T15:20:28Z TEL;TYPE=WORK:+6436XXXXXX UID:ygMdkl2aEj VERSION:3.0 X-KPILOT-RecordID:4718787 END:VCARD BEGIN:VCARD CLASS:PUBLIC FN:Person Three REV:2006-01-22T18:57:37Z TEL;TYPE=HOME:+6436XXXXXX TEL;TYPE=CELL:+6421XXXXXXX UID:z22pZSwgix VERSION:3.0 X-KPILOT-RecordID:11149530 END:VCARD ------------end vcard file-------------- -- Customer: "I lost my Internet. I switched it off last night and turned on this morning, and it's gone. I just paid $19.95 a month, and I have lost it already. Can you send me another one?"
