maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Convert all Contact Numbers (https://talk.maemo.org/showthread.php?t=83052)

sensortk 2012-03-15 16:39

Convert all Contact Numbers
 
Hi
According to the ministry of communication in my country, All communications companies are changing all mobile numbers by adding a single digit to all numbers and I need a script to edit my contacts cuz I cannot edit them manually , it's impossible

the script should do the following
all numbers begininig with 011 or 014 or 0152 ... another 1 should be added after the first 1 so they become 0111, 0114 , 01152
and all 010, 016, 0151 should be 0100, 0106, 01051
and all 012, 018, 0150 should be 0122, 0128, 01250

can anyone even tell me how to write scripts .. I already have a good background in C/C++ programming
because the deadline is this month !!!! or i wont be able to use the old numbers
Thanks alooot

zlatko 2012-03-15 17:02

Re: Convert all Contact Numbers
 
I think easiest solution is:
1. Export all contacts.
2. Concatenate all produced .vcf files to one long .vcf file containing all your contacts.
3. Using vi editor(or one of your choice) replace all numbers you want.
4. Re-import the edited multicontact .vcf file in your phonebook.

No need of programming skills and will take 5 minutes.

louiegoat 2012-03-15 17:06

Re: Convert all Contact Numbers
 
So does that mean all the mobile phones in your country will not work at the end of the month ? What country are you in ? What part of the phone number are you referring to ? All new phones allows you edit numbers , unless I'm missing something!

drzmbs 2012-03-15 23:20

Re: Convert all Contact Numbers
 
Quote:

Originally Posted by sensortk (Post 1179881)
Hi
According to the ministry of communication in my country, All communications companies are changing all mobile numbers by adding a single digit to all numbers and I need a script to edit my contacts cuz I cannot edit them manually , it's impossible

the script should do the following
all numbers begininig with 011 or 014 or 0152 ... another 1 should be added after the first 1 so they become 0111, 0114 , 01152
and all 010, 016, 0151 should be 0100, 0106, 01051
and all 012, 018, 0150 should be 0122, 0128, 01250

can anyone even tell me how to write scripts .. I already have a good background in C/C++ programming
because the deadline is this month !!!! or i wont be able to use the old numbers
Thanks alooot

اخي في برنامج بمتجر نوكيا اسمه MeegoEgypt cotact Modifier

Dear There is an APP. for this Prob it's "MeegoEgypt cotact Modifier" you can find it in STORE of N9

sensortk 2012-03-16 11:54

Re: Convert all Contact Numbers
 
Quote:

Originally Posted by zlatko (Post 1179892)
I think easiest solution is:
1. Export all contacts.
2. Concatenate all produced .vcf files to one long .vcf file containing all your contacts.
3. Using vi editor(or one of your choice) replace all numbers you want.
4. Re-import the edited multicontact .vcf file in your phonebook.

No need of programming skills and will take 5 minutes.

Thanks for your care :)

nice simple way :) but whats VI editor ? how can I make it edit all numbers in the vcf file ??

sensortk 2012-03-16 12:00

Re: Convert all Contact Numbers
 
Quote:

Originally Posted by louiegoat (Post 1179894)
So does that mean all the mobile phones in your country will not work at the end of the month ? What country are you in ? What part of the phone number are you referring to ? All new phones allows you edit numbers , unless I'm missing something!

you got it all wrong :D
the first part of all numbers are edited because numbers are increasing and the 7 digit number isnt enough for the increasing mobile phones becides... to unify the first 3 digits for each of the three communication companies (all the first company customers will begin with 010 and the second will be 011 and third will be 012 ..)

anyway there have been many android, BB, iOS and Nokia symbian apps for this issue but noone made an app for N900 :S and I cant edit 500 contacts manually man !!

i.e: all phones in my country will work except mine :D

sensortk 2012-03-16 12:02

Re: Convert all Contact Numbers
 
Quote:

Originally Posted by drzmbs (Post 1180055)
اخي في برنامج بمتجر نوكيا اسمه MeegoEgypt cotact Modifier

Dear There is an APP. for this Prob it's "MeegoEgypt cotact Modifier" you can find it in STORE of N9

ok thats a meego app .. will it work on maemo ??

louiegoat 2012-03-16 18:57

Re: Convert all Contact Numbers
 
Quote:

Originally Posted by sensortk (Post 1180203)
you got it all wrong :D
the first part of all numbers are edited because numbers are increasing and the 7 digit number isnt enough for the increasing mobile phones becides... to unify the first 3 digits for each of the three communication companies (all the first company customers will begin with 010 and the second will be 011 and third will be 012 ..)

anyway there have been many android, BB, iOS and Nokia symbian apps for this issue but noone made an app for N900 :S and I cant edit 500 contacts manually man !!

i.e: all phones in my country will work except mine :D

Oh okay. So then it would be like an area code plus another three digits and then your seven digit phone number is that correct ? Eventually they would have to do something since almost every person now has a cell phone. Hope you find a solution soon, good luck !

zlatko 2012-03-21 13:33

Re: Convert all Contact Numbers
 
@sensortk
vi editor is text editor with text ui. Very powerful and widely used on *nix OS.
It is very simle to do such substitutions once you have learned it. Here is an example. Let suppose the number you want to change is: +555 012 123 456 In .vcf line with that mobile number looks like this:
Code:

TEL;TYPE=CELL:+55512123456
In it if you want to convert all numbers starting with (0)12 to (0)122 you use this command:
Code:

:%s/+55512/+555122/g
This will substitute all occurrences of "+55512" to "+55122", will take you like 1 minute.
You have to do this for all codes you want to change.

saponga 2014-04-30 12:14

Re: Convert all Contact Numbers
 
Does anyone managed to deal with that task ? I'm in the same situation... :( I need to add a "9" before every phone number that BOTH starts with 9 or 8 AND have 8 digits and wouldn't like to edit every each .vcf on a text editor. Does anyone wrote a script that i can adapt to my case ? i'd be eternally gratefull if someone share such piece of code.


All times are GMT. The time now is 22:02.

vBulletin® Version 3.8.8