Permalink
Browse files

Generated Python files for metadata

  • Loading branch information...
1 parent 248ab9e commit a14c331aeba48630e25a779fea28585b62060278 @daviddrysdale committed Mar 26, 2013
@@ -4,7 +4,7 @@
PHONE_METADATA_BF = PhoneMetadata(id='BF', country_code=226, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[24-7]\\d{7}', possible_number_pattern='\\d{8}'),
fixed_line=PhoneNumberDesc(national_number_pattern='(?:20(?:49|5[23]|9[016-9])|40(?:4[56]|5[4-6]|7[0179])|50[34]\\d)\\d{4}', possible_number_pattern='\\d{8}', example_number='20491234'),
- mobile=PhoneNumberDesc(national_number_pattern='(?:6(?:[056]\\d|1[0-367]|8[0-3]|90)|7(?:[02-68]\\d|1[0-4689]|7[0-69]|9[0-689]))\\d{5}', possible_number_pattern='\\d{8}', example_number='70123456'),
+ mobile=PhoneNumberDesc(national_number_pattern='(?:6(?:[056]\\d|1[0-36-9]|8[0-3]|90)|7(?:[02-68]\\d|1[0-4689]|7[0-69]|9[0-689]))\\d{5}', possible_number_pattern='\\d{8}', example_number='70123456'),
toll_free=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
premium_rate=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
shared_cost=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
@@ -4,7 +4,7 @@
PHONE_METADATA_BH = PhoneMetadata(id='BH', country_code=973, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[136-9]\\d{7}', possible_number_pattern='\\d{8}'),
fixed_line=PhoneNumberDesc(national_number_pattern='(?:1(?:3[3-6]|6[0156]|7\\d)\\d|6(?:1[16]\\d|6(?:0\\d|3[12]|44)|9(?:69|9[6-9]))|77\\d{2})\\d{4}', possible_number_pattern='\\d{8}', example_number='17001234'),
- mobile=PhoneNumberDesc(national_number_pattern='(?:3(?:[23469]\\d|5[35]|77|8[348])\\d|6(?:1[16]\\d|6(?:[06]\\d|3[03-9]|44)|9(?:69|9[6-9]))|77\\d{2})\\d{4}', possible_number_pattern='\\d{8}', example_number='36001234'),
+ mobile=PhoneNumberDesc(national_number_pattern='(?:3(?:[23469]\\d|5[35]|77|8[348])\\d|6(?:1[16]\\d|3(?:00|33|6[16])|6(?:[069]\\d|3[03-9]|44)|9(?:69|9[6-9]))|77\\d{2})\\d{4}', possible_number_pattern='\\d{8}', example_number='36001234'),
toll_free=PhoneNumberDesc(national_number_pattern='80\\d{6}', possible_number_pattern='\\d{8}', example_number='80123456'),
premium_rate=PhoneNumberDesc(national_number_pattern='(?:87|9[014578])\\d{6}', possible_number_pattern='\\d{8}', example_number='90123456'),
shared_cost=PhoneNumberDesc(national_number_pattern='84\\d{6}', possible_number_pattern='\\d{8}', example_number='84123456'),
@@ -9,7 +9,7 @@
premium_rate=PhoneNumberDesc(national_number_pattern='90[059]\\d{7}', possible_number_pattern='\\d{10}', example_number='9001234567'),
shared_cost=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
personal_number=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
- voip=PhoneNumberDesc(national_number_pattern='210[0-6]\\d{4}|4(?:0(?:[04]0\\d{4}|10[0-3]\\d{3}|2(?:00\\d|900)\\d{2}|3[01]\\d{4}|5\\d{5}|70[01]\\d{3})|1[01]\\d{5}|400\\d{4})|5100\\d{4}', possible_number_pattern='\\d{8}', example_number='40001234'),
+ voip=PhoneNumberDesc(national_number_pattern='210[0-6]\\d{4}|4(?:0(?:[04]0\\d{4}|10[0-3]\\d{3}|2(?:00\\d|900)\\d{2}|3[01]\\d{4}|5\\d{5}|70[01]\\d{3})|1[01]\\d{5}|400\\d{4}|70[0-2]\\d{4})|5100\\d{4}', possible_number_pattern='\\d{8}', example_number='40001234'),
pager=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
uan=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
emergency=PhoneNumberDesc(national_number_pattern='112|911', possible_number_pattern='\\d{3}', example_number='911'),
@@ -4,7 +4,7 @@
PHONE_METADATA_EC = PhoneMetadata(id='EC', country_code=593, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='1\\d{9,10}|[2-8]\\d{7}|9\\d{8}', possible_number_pattern='\\d{7,11}'),
fixed_line=PhoneNumberDesc(national_number_pattern='[2-7][2-7]\\d{6}', possible_number_pattern='\\d{7,8}', example_number='22123456'),
- mobile=PhoneNumberDesc(national_number_pattern='9(?:[2-7]9|[89]\\d)\\d{6}', possible_number_pattern='\\d{9}', example_number='991234567'),
+ mobile=PhoneNumberDesc(national_number_pattern='9(?:39|[4-6][89]|7[7-9]|[89]\\d)\\d{6}', possible_number_pattern='\\d{9}', example_number='991234567'),
toll_free=PhoneNumberDesc(national_number_pattern='1800\\d{6,7}', possible_number_pattern='\\d{10,11}', example_number='18001234567'),
premium_rate=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
shared_cost=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
@@ -2,15 +2,15 @@
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_IR = PhoneMetadata(id='IR', country_code=98, international_prefix='00',
- general_desc=PhoneNumberDesc(national_number_pattern='[2-6]\\d{4,9}|9(?:[1-4]\\d{8}|9\\d{2,8})|[178]\\d{9}', possible_number_pattern='\\d{4,10}'),
- fixed_line=PhoneNumberDesc(national_number_pattern='2(?:1[2-9]\\d{2,7}|51\\d{3,7})|(?:241|3(?:11|51)|441|5[14]1)\\d{4,7}|(?:3(?:34|41)|6(?:11|52))\\d{6,7}|(?:1(?:[134589][12]|[27][1-4])|2(?:2[189]|[389][12]|42|5[256]|6[1-59]|7[34])|3(?:12|2[1-4]|3[125]|4[24-9]|5[23]|[6-9][12])|4(?:[135-9][12]|2[1-467]|4[2-4])|5(?:12|2[89]|3[1-5]|4[2-8]|[5-7][12]|8[1245])|6(?:12|[347-9][12]|51|6[1-6])|7(?:[13589][12]|2[1289]|4[1-4]|6[1-6]|7[1-3])|8(?:[145][12]|3[124578]|6[1256]|7[1245]))\\d{7}', possible_number_pattern='\\d{5,10}', example_number='2123456789'),
- mobile=PhoneNumberDesc(national_number_pattern='9(?:1(?:[039]\\d|[16][1-35-9]|2[1-8]|4[013-9]|[57][1-9]|8[13-9])|2[01]\\d|3(?:[035-9]\\d|13|2[1-579]|47))\\d{6}', possible_number_pattern='\\d{10}', example_number='9123456789'),
+ general_desc=PhoneNumberDesc(national_number_pattern='[14-8]\\d{6,9}|[23]\\d{5,9}|9(?:[1-4]\\d{8}|9\\d{2,8})', possible_number_pattern='\\d{4,10}'),
+ fixed_line=PhoneNumberDesc(national_number_pattern='(?:[145](?:1[1-9]|[2-9]\\d)\\d{0,3}|[23][1-9]\\d{0,4}|6[1-9]\\d{1,4}|[78]\\d{2,5})\\d{4}', possible_number_pattern='\\d{6,10}', example_number='2123456789'),
+ mobile=PhoneNumberDesc(national_number_pattern='9[1-3]\\d{8}', possible_number_pattern='\\d{10}', example_number='9123456789'),
toll_free=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
premium_rate=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
shared_cost=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
personal_number=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
- voip=PhoneNumberDesc(national_number_pattern='993[12]\\d{6}', possible_number_pattern='\\d{10}', example_number='9932123456'),
- pager=PhoneNumberDesc(national_number_pattern='943[24678]\\d{6}', possible_number_pattern='\\d{10}', example_number='9432123456'),
+ voip=PhoneNumberDesc(national_number_pattern='(?:[2-6]0\\d|993)\\d{7}', possible_number_pattern='\\d{10}', example_number='9932123456'),
+ pager=PhoneNumberDesc(national_number_pattern='943\\d{7}', possible_number_pattern='\\d{10}', example_number='9432123456'),
uan=PhoneNumberDesc(national_number_pattern='9990\\d{0,6}', possible_number_pattern='\\d{4,10}', example_number='9990123456'),
emergency=PhoneNumberDesc(national_number_pattern='1(?:1[025]|25)', possible_number_pattern='\\d{3}', example_number='112'),
voicemail=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
@@ -4,7 +4,7 @@
PHONE_METADATA_MG = PhoneMetadata(id='MG', country_code=261, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[23]\\d{8}', possible_number_pattern='\\d{7,9}'),
fixed_line=PhoneNumberDesc(national_number_pattern='2(?:0(?:(?:2\\d|4[47]|5[3467]|6[279]|8[268]|9[245])\\d|7(?:2[29]|[35]\\d))|210\\d)\\d{4}', possible_number_pattern='\\d{7,9}', example_number='202123456'),
- mobile=PhoneNumberDesc(national_number_pattern='3[02-4]\\d{7}', possible_number_pattern='\\d{9}', example_number='301234567'),
+ mobile=PhoneNumberDesc(national_number_pattern='3(?:[02-4]\\d|90)\\d{6}', possible_number_pattern='\\d{9}', example_number='301234567'),
toll_free=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
premium_rate=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
shared_cost=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
@@ -2,9 +2,9 @@
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_PF = PhoneMetadata(id='PF', country_code=689, international_prefix='00',
- general_desc=PhoneNumberDesc(national_number_pattern='[2-9]\\d{5}', possible_number_pattern='\\d{6}'),
+ general_desc=PhoneNumberDesc(national_number_pattern='[2-79]\\d{5}|8\\d{5,7}', possible_number_pattern='\\d{6}(?:\\d{2})?'),
fixed_line=PhoneNumberDesc(national_number_pattern='(?:4(?:[02-9]\\d|1[02-9])|[5689]\\d{2})\\d{3}', possible_number_pattern='\\d{6}', example_number='401234'),
- mobile=PhoneNumberDesc(national_number_pattern='(?:[27]\\d{2}|3[0-79]\\d|411)\\d{3}', possible_number_pattern='\\d{6}', example_number='212345'),
+ mobile=PhoneNumberDesc(national_number_pattern='(?:[27]\\d{2}|3[0-79]\\d|411|89\\d{3})\\d{3}', possible_number_pattern='\\d{6}(?:\\d{2})?', example_number='212345'),
toll_free=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
premium_rate=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
shared_cost=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
@@ -15,4 +15,5 @@
emergency=PhoneNumberDesc(national_number_pattern='1[578]', possible_number_pattern='\\d{2}', example_number='15'),
voicemail=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
no_international_dialling=PhoneNumberDesc(national_number_pattern='44\\d{4}', possible_number_pattern='\\d{6}', example_number='441234'),
- number_format=[NumberFormat(pattern='(\\d{2})(\\d{2})(\\d{2})', format=u'\\1 \\2 \\3')])
+ number_format=[NumberFormat(pattern='(\\d{2})(\\d{2})(\\d{2})(\\d{2})', format=u'\\1 \\2 \\3 \\4', leading_digits_pattern=['89']),
+ NumberFormat(pattern='(\\d{2})(\\d{2})(\\d{2})', format=u'\\1 \\2 \\3')])
@@ -4,7 +4,7 @@
PHONE_METADATA_TD = PhoneMetadata(id='TD', country_code=235, international_prefix='00|16',
general_desc=PhoneNumberDesc(national_number_pattern='[2679]\\d{7}', possible_number_pattern='\\d{8}'),
fixed_line=PhoneNumberDesc(national_number_pattern='22(?:[3789]0|5[0-5]|6[89])\\d{4}', possible_number_pattern='\\d{8}', example_number='22501234'),
- mobile=PhoneNumberDesc(national_number_pattern='(?:6[36]\\d|77\\d|9(?:5[0-4]|9\\d))\\d{5}', possible_number_pattern='\\d{8}', example_number='63012345'),
+ mobile=PhoneNumberDesc(national_number_pattern='(?:6[02368]\\d|77\\d|9(?:5[0-4]|9\\d))\\d{5}', possible_number_pattern='\\d{8}', example_number='63012345'),
toll_free=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
premium_rate=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
shared_cost=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
@@ -3,10 +3,10 @@
PHONE_METADATA_TN = PhoneMetadata(id='TN', country_code=216, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[2-57-9]\\d{7}', possible_number_pattern='\\d{8}'),
- fixed_line=PhoneNumberDesc(national_number_pattern='(?:3[012]|7\\d)\\d{6}', possible_number_pattern='\\d{8}', example_number='71234567'),
+ fixed_line=PhoneNumberDesc(national_number_pattern='(?:3[012]|7\\d|81)\\d{6}', possible_number_pattern='\\d{8}', example_number='71234567'),
mobile=PhoneNumberDesc(national_number_pattern='(?:[259]\\d|4[0-2])\\d{6}', possible_number_pattern='\\d{8}', example_number='20123456'),
toll_free=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
- premium_rate=PhoneNumberDesc(national_number_pattern='8[0128]\\d{6}', possible_number_pattern='\\d{8}', example_number='80123456'),
+ premium_rate=PhoneNumberDesc(national_number_pattern='8[028]\\d{6}', possible_number_pattern='\\d{8}', example_number='80123456'),
shared_cost=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
personal_number=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
voip=PhoneNumberDesc(national_number_pattern='NA', possible_number_pattern='NA'),
Oops, something went wrong.

0 comments on commit a14c331

Please sign in to comment.