auto-generate html/domains.tab
authorMartin Zobel-Helas <zobel@debian.org>
Sun, 25 Aug 2013 11:52:16 +0000 (13:52 +0200)
committerMartin Zobel-Helas <zobel@debian.org>
Sun, 25 Aug 2013 11:52:16 +0000 (13:52 +0200)
Signed-off-by: Martin Zobel-Helas <zobel@debian.org>
debian/changelog
debian/control
debian/rules
html/domains.tab
html/searchform.wml
html/update.wml

index c072afa..308d895 100644 (file)
@@ -1,13 +1,14 @@
-userdir-ldap-cgi (0.3.37) UNRELEASED; urgency=low
+userdir-ldap-cgi (0.3.37) unstable; urgency=low
 
   [ Martin Zobel-Helas ]
   * use libjs-jquery-tablesorter to sort machines.cgi
   * promote documentation on searchform.wml
+  * auto-generate html/domains.tab
 
   [ Nick Mathewson ]
   * Use the changes@ address consistently in preference to change@.
 
- -- Peter Palfrader <weasel@debian.org>  Sun, 10 Jun 2012 22:03:14 +0200
+ -- Martin Zobel-Helas <zobel@debian.org>  Sun, 25 Aug 2013 13:47:23 +0200
 
 userdir-ldap-cgi (0.3.36) unstable; urgency=low
 
index f1dcc71..8f9bfcd 100644 (file)
@@ -24,6 +24,9 @@ Depends: userdir-ldap,
        python,
        python-crack | python-cracklib
        ,
+       isoquery,
+       iso-codes
+       ,
        cracklib-runtime
        ,
        libjs-jquery,
index 454da0a..bf81c9b 100755 (executable)
@@ -30,6 +30,7 @@ binary-indep: build
        dh_clean -k
        dh_installdirs $(instdirs)
        dh_installdocs
+       isoquery -i 3166 -c | cut -f 1,4 > html/domains.tab
 
        install -m 755 *.cgi $(i)/var/www/userdir-ldap/
        install -m 644 Util.pm $(i)/var/www/userdir-ldap/
index 882992a..af5540f 100644 (file)
-ad   Andorra
-ae   United Arab Emirates
-af   Afghanistan
-ag   Antigua and Barbuda
-ai   Anguilla
-al   Albania
-am   Armenia
-an   Netherlands Antilles
-ao   Angola
-aq   Antarctica
-ar   Argentina
-arpa   Old style Arpanet
-as   American Samoa
-at   Austria
-au   Australia
-aw   Aruba
-az   Azerbaidjan
-ba   Bosnia-Herzegovina
-bb   Barbados
-bd   Bangladesh
-be   Belgium
-bf   Burkina Faso
-bg   Bulgaria
-bh   Bahrain
-bi   Burundi
-bj   Benin
-bm   Bermuda
-bn   Brunei Darussalam
-bo   Bolivia
-br   Brazil
-bs   Bahamas
-bt   Bhutan
-bv   Bouvet Island
-bw   Botswana
-by   Belarus
-bz   Belize
-ca   Canada
-cc   Cocos (Keeling) Islands
-cd   Democratic Republic of Congo
-cf   Central African Republic
-cg   Congo
-ch   Switzerland
-ci   Ivory Coast (Cote d'Ivoire)
-ck   Cook Islands
-cl   Chile
-cm   Cameroon
-cn   China
-co   Colombia
-com   Commercial
-cr   Costa Rica
-cs   Czech Republic and Slovakia
-cu   Cuba
-cv   Cape Verde
-cx   Christmas Island
-cy   Cyprus
-cz   Czech Republic
-de   Germany
-dj   Djibouti
-dk   Denmark
-dm   Dominica
-do   Dominican Republic
-dz   Algeria
-ec   Ecuador
-edu   USA Educational
-ee   Estonia
-eg   Egypt
-eh   Western Sahara
-er   Eritrea
-es   Spain
-et   Ethiopia
-fi   Finland
-fj   Fiji
-fk   Falkland Islands
-fm   Micronesia
-fo   Faroe Islands
-fr   France
-fx   France (European Territory)
-ga   Gabon
-gd   Grenada
-ge   Georgia
-gf   French Guyana
-gg   Guernsey
-gh   Ghana
-gi   Gibraltar
-gl   Greenland
-gm   Gambia
-gn   Guinea
-gov   USA Government
-gp   Guadeloupe (French)
-gq   Equatorial Guinea
-gr   Greece
-gs   S. Georgia & S. Sandwich Isls.
-gt   Guatemala
-gu   Guam (USA)
-gw   Guinea Bissau
-gy   Guyana
-hk   Hong Kong
-hm   Heard and McDonald Islands
-hn   Honduras
-hr   Croatia
-ht   Haiti
-hu   Hungary
-id   Indonesia
-ie   Ireland
-il   Israel
-im   Isle of Man
-in   India
-int   International
-io   British Indian Ocean Territory
-iq   Iraq
-ir   Iran
-is   Iceland
-it   Italy
-je   Jersey
-jm   Jamaica
-jo   Jordan
-jp   Japan
-ke   Kenya
-kg   Kyrgyzstan
-kh   Cambodia
-ki   Kiribati
-km   Comoros
-kn   Saint Kitts & Nevis Anguilla
-kp   North Korea
-kr   South Korea
-kw   Kuwait
-ky   Cayman Islands
-kz   Kazakhstan
-la   Laos
-lb   Lebanon
-lc   Saint Lucia
-li   Liechtenstein
-lk   Sri Lanka
-lr   Liberia
-ls   Lesotho
-lt   Lithuania
-lu   Luxembourg
-lv   Latvia
-ly   Libya
-ma   Morocco
-mc   Monaco
-md   Moldavia
-mg   Madagascar
-mh   Marshall Islands
-mil   USA Military
-mk   Macedonia
-ml   Mali
-mm   Myanmar
-mn   Mongolia
-mo   Macau
-mp   Northern Mariana Islands
-mq   Martinique (French)
-mr   Mauritania
-ms   Montserrat
-mt   Malta
-mu   Mauritius
-mv   Maldives
-mw   Malawi
-mx   Mexico
-my   Malaysia
-mz   Mozambique
-na   Namibia
-nato   NATO
-nc   New Caledonia (French)
-ne   Niger
-net   Network
-nf   Norfolk Island
-ng   Nigeria
-ni   Nicaragua
-nl   Netherlands
-no   Norway
-np   Nepal
-nr   Nauru
-nu   Niue
-nz   New Zealand
-om   Oman
-org   Non-Profit Making Organisations
-pa   Panama
-pe   Peru
-pf   Polynesia (French)
-pg   Papua New Guinea
-ph   Philippines
-pk   Pakistan
-pl   Poland
-pm   Saint Pierre and Miquelon
-pn   Pitcairn Island
-pr   Puerto Rico
-pt   Portugal
-pw   Palau
-py   Paraguay
-qa   Qatar
-re   Reunion (French)
-ro   Romania
-ru   Russia
-rw   Rwanda
-sa   Saudi Arabia
-sb   Solomon Islands
-sc   Seychelles
-sd   Sudan
-se   Sweden
-sg   Singapore
-sh   Saint Helena
-si   Slovenia
-sj   Svalbard and Jan Mayen Islands
-sk   Slovak Republic
-sl   Sierra Leone
-sm   San Marino
-sn   Senegal
-so   Somalia
-sr   Suriname
-st   Saint Tome and Principe
-su   Former USSR
-sv   El Salvador
-sy   Syria
-sz   Swaziland
-tc   Turks and Caicos Islands
-td   Chad
-tf   French Southern Territories
-tg   Togo
-th   Thailand
-tj   Tadjikistan
-tk   Tokelau
-tm   Turkmenistan
-tn   Tunisia
-to   Tonga
-tp   East Timor
-tr   Turkey
-tt   Trinidad and Tobago
-tv   Tuvalu
-tw   Taiwan
-tz   Tanzania
-ua   Ukraine
-ug   Uganda
-uk   United Kingdom
-um   USA Minor Outlying Islands
-us   United States
-uy   Uruguay
-uz   Uzbekistan
-va   Vatican City State
-vc   Saint Vincent & Grenadines
-ve   Venezuela
-vg   Virgin Islands (British)
-vi   Virgin Islands (USA)
-vn   Vietnam
-vu   Vanuatu
-wf   Wallis and Futuna Islands
-ws   Samoa
-ye   Yemen
-yt   Mayotte
-yu   Yugoslavia
-za   South Africa
-zr   Democratic Republic of the Congo
-zm   Zambia
-zw   Zimbabwe
+AF     Afghanistan
+AX     Åland Islands
+AL     Albania
+DZ     Algeria
+AS     American Samoa
+AD     Andorra
+AO     Angola
+AI     Anguilla
+AQ     Antarctica
+AG     Antigua and Barbuda
+AR     Argentina
+AM     Armenia
+AW     Aruba
+AU     Australia
+AT     Austria
+AZ     Azerbaijan
+BS     Bahamas
+BH     Bahrain
+BD     Bangladesh
+BB     Barbados
+BY     Belarus
+BE     Belgium
+BZ     Belize
+BJ     Benin
+BM     Bermuda
+BT     Bhutan
+BO     Bolivia
+BQ     Bonaire, Sint Eustatius and Saba
+BA     Bosnia and Herzegovina
+BW     Botswana
+BV     Bouvet Island
+BR     Brazil
+IO     British Indian Ocean Territory
+BN     Brunei Darussalam
+BG     Bulgaria
+BF     Burkina Faso
+BI     Burundi
+KH     Cambodia
+CM     Cameroon
+CA     Canada
+CV     Cape Verde
+KY     Cayman Islands
+CF     Central African Republic
+TD     Chad
+CL     Chile
+CN     China
+CX     Christmas Island
+CC     Cocos (Keeling) Islands
+CO     Colombia
+KM     Comoros
+CG     Congo
+CD     Congo, The Democratic Republic of the
+CK     Cook Islands
+CR     Costa Rica
+CI     Côte d'Ivoire
+HR     Croatia
+CU     Cuba
+CW     Curaçao
+CY     Cyprus
+CZ     Czech Republic
+DK     Denmark
+DJ     Djibouti
+DM     Dominica
+DO     Dominican Republic
+EC     Ecuador
+EG     Egypt
+SV     El Salvador
+GQ     Equatorial Guinea
+ER     Eritrea
+EE     Estonia
+ET     Ethiopia
+FK     Falkland Islands (Malvinas)
+FO     Faroe Islands
+FJ     Fiji
+FI     Finland
+FR     France
+GF     French Guiana
+PF     French Polynesia
+TF     French Southern Territories
+GA     Gabon
+GM     Gambia
+GE     Georgia
+DE     Germany
+GH     Ghana
+GI     Gibraltar
+GR     Greece
+GL     Greenland
+GD     Grenada
+GP     Guadeloupe
+GU     Guam
+GT     Guatemala
+GG     Guernsey
+GN     Guinea
+GW     Guinea-Bissau
+GY     Guyana
+HT     Haiti
+HM     Heard Island and McDonald Islands
+VA     Holy See (Vatican City State)
+HN     Honduras
+HK     Hong Kong
+HU     Hungary
+IS     Iceland
+IN     India
+ID     Indonesia
+IR     Iran, Islamic Republic of
+IQ     Iraq
+IE     Ireland
+IM     Isle of Man
+IL     Israel
+IT     Italy
+JM     Jamaica
+JP     Japan
+JE     Jersey
+JO     Jordan
+KZ     Kazakhstan
+KE     Kenya
+KI     Kiribati
+KP     Korea, Democratic People's Republic of
+KR     Korea, Republic of
+KW     Kuwait
+KG     Kyrgyzstan
+LA     Lao People's Democratic Republic
+LV     Latvia
+LB     Lebanon
+LS     Lesotho
+LR     Liberia
+LY     Libya
+LI     Liechtenstein
+LT     Lithuania
+LU     Luxembourg
+MO     Macao
+MK     Macedonia, Republic of
+MG     Madagascar
+MW     Malawi
+MY     Malaysia
+MV     Maldives
+ML     Mali
+MT     Malta
+MH     Marshall Islands
+MQ     Martinique
+MR     Mauritania
+MU     Mauritius
+YT     Mayotte
+MX     Mexico
+FM     Micronesia, Federated States of
+MD     Moldova
+MC     Monaco
+MN     Mongolia
+ME     Montenegro
+MS     Montserrat
+MA     Morocco
+MZ     Mozambique
+MM     Myanmar
+NA     Namibia
+NR     Nauru
+NP     Nepal
+NL     Netherlands
+NC     New Caledonia
+NZ     New Zealand
+NI     Nicaragua
+NE     Niger
+NG     Nigeria
+NU     Niue
+NF     Norfolk Island
+MP     Northern Mariana Islands
+NO     Norway
+OM     Oman
+PK     Pakistan
+PW     Palau
+PS     Palestine, State of
+PA     Panama
+PG     Papua New Guinea
+PY     Paraguay
+PE     Peru
+PH     Philippines
+PN     Pitcairn
+PL     Poland
+PT     Portugal
+PR     Puerto Rico
+QA     Qatar
+RE     Réunion
+RO     Romania
+RU     Russian Federation
+RW     Rwanda
+BL     Saint Barthélemy
+SH     Saint Helena, Ascension and Tristan da Cunha
+KN     Saint Kitts and Nevis
+LC     Saint Lucia
+MF     Saint Martin (French part)
+PM     Saint Pierre and Miquelon
+VC     Saint Vincent and the Grenadines
+WS     Samoa
+SM     San Marino
+ST     Sao Tome and Principe
+SA     Saudi Arabia
+SN     Senegal
+RS     Serbia
+SC     Seychelles
+SL     Sierra Leone
+SG     Singapore
+SX     Sint Maarten (Dutch part)
+SK     Slovakia
+SI     Slovenia
+SB     Solomon Islands
+SO     Somalia
+ZA     South Africa
+GS     South Georgia and the South Sandwich Islands
+ES     Spain
+LK     Sri Lanka
+SD     Sudan
+SR     Suriname
+SS     South Sudan
+SJ     Svalbard and Jan Mayen
+SZ     Swaziland
+SE     Sweden
+CH     Switzerland
+SY     Syrian Arab Republic
+TW     Taiwan
+TJ     Tajikistan
+TZ     Tanzania, United Republic of
+TH     Thailand
+TL     Timor-Leste
+TG     Togo
+TK     Tokelau
+TO     Tonga
+TT     Trinidad and Tobago
+TN     Tunisia
+TR     Turkey
+TM     Turkmenistan
+TC     Turks and Caicos Islands
+TV     Tuvalu
+UG     Uganda
+UA     Ukraine
+AE     United Arab Emirates
+GB     United Kingdom
+US     United States
+UM     United States Minor Outlying Islands
+UY     Uruguay
+UZ     Uzbekistan
+VU     Vanuatu
+VE     Venezuela
+VN     Viet Nam
+VG     Virgin Islands, British
+VI     Virgin Islands, U.S.
+WF     Wallis and Futuna
+EH     Western Sahara
+YE     Yemen
+ZM     Zambia
+ZW     Zimbabwe
index ac24e00..43c3436 100644 (file)
@@ -34,7 +34,7 @@
       close (DOMAINS);
     }
     foreach (sort keys %domain) {
-      printf "    <option value=%s>%s\n", $domain{$_}, encode_entities($_);
+      printf "    <option value=%s>%s\n", lc($domain{$_}), encode_entities($_);
     }
 :>
 </select>
index 1b91ddd..9d7e9e8 100644 (file)
@@ -61,7 +61,7 @@
       close (DOMAINS);
     }
     foreach (sort keys %domain) {
-      printf "    <option value=%s>%s\n", $domain{$_}, encode_entities($_);
+      printf "    <option value=%s>%s\n", lc($domain{$_}), encode_entities($_);
     }
 :>
     </select>