![]() Many time I have found duplicated contacts with different names but with the same phone number. The last contacts-check.sh script is used to find duplicated phone information within the plain text file. % contacts-convert-vcf-from.sh -c contacts-convert-vcf-to.sh script converts the plain text data into the VCARD format. Here is example CSV output from the script. Usage: contacts-convert-vcf-from.sh TYPE FILE but I also implemented the CSV method which may be useful for some people – to put that data into the spreadsheet. The contacts-convert-vcf-from.sh script as the name suggests converts VCARD data (VCF file) into the plain text information. I use three scripts to convert/export/import/check that data in VCARD form. You can now send this import.vcf file to your phone using email and then import these contacts as you would from any other VCARD shared with you. Its obvious but the generated VCARD does not contain the 'butcher (local)' contact. % contacts-convert-vcf-to.sh contacts.NOBUTCHER > import.vcf % grep -v butcher contacts > contacts.NOBUTCHER Now – lets suppose you want to generate new VCARD with some of your contacts, then you could use grep(1) to filter out the unneeded entries, like that. I could embed/rework the script to contain also the column -t command but I did not saw the need to – but its of course possible. Why hardcode this? For comparison purposes – more on that later. The length of ‘=’ underscores is defined/hardcoded in the scripts itself. Herbert-pierre-hugues 555123456 - executive Here is how the above VCARD information looks after converting it with my script to the plain text columns. I do not find this VCARD format readable, nor grepable/searchable, thus I convert it into the plain text file which looks like follows and is grep(1) and awk(1) friendly (columns separated by spaces). The 'gg:' is for example for the Polish solution called Gadu-Gadu. I keep this Instant Messaging number/account information in the VCARD 'X-QQ' field in which I use protocol:number notation and use it for all different Instant Messaging solutions. Now several years fast forward I use it very rarely, but its still in use. In 2015 when I initially wrote those scripts the Instant Messaging was still used by me. The VCARD of course starts with 'BEGIN:VCARD' and ends with 'END:VCARD', that is obvious. The remaining fields as 'TEL' or 'EMAIL' does not try to outsmart us and work as desired. The 'FN' field is a lot more useful here. ![]() ![]() The most annoying field seems to be 'N' which tries to be smarter then needed – trying really hard to first put surname, then name, and then other names. I have used colors to distinguish different contacts. ![]() The VCF file (also called VCARD) exported from a mobile Android based phone looks like below. So as usual I came with my set of scripts that will do the job and after several years of using this ‘system’ I am quite satisfied with the results and PITA reduced to minimum. I have tried to search for some open source software that is capable of doing that efficiently and without too much effort and PITA … and I failed miserably. But that was not the answer – that was just the beginning – how to manage contacts the UNIX open source way? Finally he settled on some closed source freeware software which run on Windows. He had a problem of having an iPhone with iTunes and Android phone and wanted to manage contacts between them in one single sensible place. About two years ago my neighbor asked me a question – “How do you manage contacts on your devices?” – and that was my ‘a-ha’ moment in that topic – I do not.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |