[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #6130 [Vidalia]: The countries' list in CountryInfo.cpp is not complete
#6130: The countries' list in CountryInfo.cpp is not complete
-------------------------------------+--------------------------------------
Reporter: sirop | Owner: chiiph
Type: defect | Status: needs_review
Priority: normal | Milestone: Vidalia: 0.3.x
Component: Vidalia | Version: Vidalia: 0.3.2-alpha
Keywords: geoip , countries' list | Parent:
Points: | Actualpoints:
-------------------------------------+--------------------------------------
Changes (by sirop):
* status: new => needs_review
Comment:
Have to correct some awk commands, that's why once more:
{{{
wget
http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip
awk -F"\",\"" '{print "\""tolower($5)"\" \"" $6}' GeoIPCountryWhois.csv |
sort | uniq > geoip_uniq
}}}
Compare country-coordinates.csv and GeoIPCountryWhois.csv
{{{
awk -F, '{print "\""$1"\"" }' country-coordinates.csv | sort | uniq > c1
awk -F, '{print tolower($5) }' GeoIPCountryWhois.csv | sort | uniq > c2
diff c1 c2 > diffc1c2
}}}
http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains
> "a1" "Anonymous Proxy"
> "a2" "Satellite Provider"
> "ap" "Asia/Pacific Region"
> "bl" "Saint Barthelemy"
< "cs" Czecho-Slovakia domain has not been use since 1993. The ISO-code
cs was later allocated
for Serbia and Montenegro, which used .yu instead.
> "eu" "European Union" , "Europe"
< "fx" As I found, it means French exterretorial, but is not used; we
do not have "fx" in GeoIPCountryWhois.csv .
< "mf" "Saint Martin" , ok, http://en.wikipedia.org/wiki/ISO_3166-2:MF
< "su" Soviet Union , no correspondence in GeoIPCountryWhois.csv
> "tl" "Timor-Leste"
< "tp" Before it became independent from Indonesia in 2002, East Timor
was officially assigned the ISO 3166-1 alpha-2 code TP.
< "yu" Yougoslavia, no correspondence in GeoIPCountryWhois.csv
< "zr" .zr is the former Internet country code top-level domain (ccTLD)
for Zaire. Because Zaire was renamed Democratic Republic of the Congo in
1997, .zr was phased out
and .cd took its place. In 2001, .zr was finally terminated.
So really questionable things are:
> "a1" "Anonymous Proxy"
> "a2" "Satellite Provider"
> "ap" "Asia/Pacific Region"
> "eu" "European Union"
as I do not know how to assign geographic coordinates to them.
We'll also need more flags, maybe, these:
http://www.famfamfam.com/lab/icons/flags/ .
Edit country-coordinates.csv
{{{
awk -F, '{print "\""$1"\"" }' country-coordinates.csv | sort | uniq > c1
awk -F, '{print tolower($5) }' GeoIPCountryWhois.csv | sort | uniq > c2
diff c1 c2 > diffc1c2_2
}}}
0a1,2
> "a1"
> "a2"
9a12
> "ap"
68a72
> "eu"
Only these 4 abbreviations will be shown as "unknown".
Edit CountryInfo.cpp
{{{
awk -F"\" \"" '{print " db.insert("$1"\", QT_TR_NOOP(\""$2"));"}'
geoip_uniq > CountryInfo_edit
}}}
Download
http://joomlacode.org/gf/download/frsrelease/11986/48430/phoca_flag_icons_22-14.zip
License: Public Domain
{{{
mkdir flags
cd flags
ls | sed -e 's/\.[a-z]\{3\}$//' > flags
awk '{print "\""$1"\""}' flags > flags2
diff ../c2 flags2 > diff_flags2_c2
rm catalonia.png
rm england.png
rm galicia.png
rm scotland.png
rm wales.png
rm cs.png
rm nc2.png
cp fr.png bl.png
}}}
"aq" "Antarctica" flag is missing.
Download
http://upload.wikimedia.org/wikipedia/commons/thumb/6/68/Flag_of_the_Antarctic_Treaty.svg
/200px-Flag_of_the_Antarctic_Treaty.svg.png
{{{
for i in *.png; do convert $i -bordercolor Black -border 1x1 $i ; done
for i in *.png; do convert $i -geometry 18x12! $i ; done
}}}
https://github.com/sirop/vidalia_0.3.2_alpha/commit/78b41ae72374a8d386183217561ed50e64b17e6b
country-coordinates.csv had a double space before every LF,
i cleaned out the double spaces.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6130#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs