-
-
Save in4lio/1e16ead4ebe459919ae6551544cc3b22 to your computer and use it in GitHub Desktop.
| r""" | |
| vCard_S30.py -- Convert vCards into suitable for Nokia Series 30+ format, or | |
| How to solve the only one phone number per contact problem. | |
| 1) Import contacts "contacts.vcf" from Google account (vCard format). | |
| 2) Place it beside this script. | |
| 3) Run the script with Python 2.7. | |
| 4) Copy the result "backup.dat" into "Backup" folder on the phone SD card. | |
| 5) Restore contacts from backup on the phone. | |
| Tested on Nokia 220. | |
| The MIT License (MIT) | |
| Copyright (c) 2016 in4lio@gmail.com | |
| """ | |
| import sys | |
| import os | |
| CARD = """ | |
| BEGIN:VCARD | |
| VERSION:2.1 | |
| FN:%s | |
| TEL;VOICE;CELL:%s | |
| END:VCARD | |
| """ | |
| cp = sys.stdout.encoding if sys.stdout.encoding else 'utf8' | |
| sou = map( str.strip, open( './contacts.vcf' ).read().splitlines()) | |
| res = open( './backup.dat', 'w' ) | |
| err = 0 | |
| mark = None | |
| for s in sou: | |
| if s == 'BEGIN:VCARD': | |
| print '{', | |
| fn = '' | |
| tel = [] | |
| mark = 'FN:' | |
| elif s == 'END:VCARD': | |
| print '}' | |
| if not fn: | |
| print '#### ERROR: NO NAME ####' | |
| err += 1 | |
| elif not tel: | |
| print '#### ERROR: NO PHONE ####' | |
| err += 1 | |
| else: | |
| for i, t in enumerate( tel ): | |
| res.write( CARD % ( fn + ( ' %d' % i if i else '' ), t )) | |
| mark = None | |
| elif mark and s.startswith( mark ): | |
| if len( s ) > len( mark ): | |
| fn = s.split( ':', 1 )[ 1 ] | |
| print s.decode( 'utf8' ).encode( cp, 'replace' ), | |
| else: | |
| mark = 'ORG:' | |
| elif mark and s.startswith( 'TEL' ): | |
| tel.append( s.split( ':', 1 )[ 1 ]) | |
| print s, | |
| res.close() | |
| print '#### DONE ####' | |
| if err: | |
| print '%d ignored contact(s)' % err |
its work in Nokia 225
i have contacts backup from nokia 215 4G. it's include "phonebook.ib" file and "ibphone_head.in" file. how can i to convert them to vcf file?
How to restore them? My Nokia 216 just shows unknown file type.
i have contacts backup from nokia 215 4G. it's include "phonebook.ib" file and "ibphone_head.in" file. how can i to convert them to vcf file?
To read contacts from phonebook.ib file you need to take help of Univik IB File Converter. You can convert all of your contacts as vcf file too using same solution.
Nokia 216
First convert your contacts to .vcf file and then you can import it using Nokia native import option.
@unisupport can you send link to the software?
@unisupport can you send link to the software?
Here is the required link https://univik.com/file/converter/nokia-ib.html
Worked like a charm..! thanks!