Skip to content

Commit

Permalink
Switch to new version: SVG and PNG fully from Wikipedia and in PD
Browse files Browse the repository at this point in the history
No trace of old data from CIA left.  All flags from Wikipedia, in
optimized SVG and PNG, and non-copyrighted.
  • Loading branch information
behdad committed Aug 7, 2014
1 parent b2d50e9 commit b631c74
Show file tree
Hide file tree
Showing 767 changed files with 164,050 additions and 997 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
__pycache__
*.pyc
1 change: 1 addition & 0 deletions ALIASES-WP
Expand Up @@ -14,6 +14,7 @@ Guadeloupe Guadeloupe (local)
Holy See (Vatican City State) the Vatican City
Islamic Republic of Iran Iran
Isle of Man the Isle of Man
Kosovo Kosovo GovOutline PD
Lao People's Democratic Republic Laos
Macao Macau
Marshall Islands the Marshall Islands
Expand Down
3 changes: 3 additions & 0 deletions AUTHORS
@@ -1 +1,4 @@
Shervin Afshar
Behdad Esfahbod
Behnam Esfahbod
Roozbeh Pournader
87 changes: 16 additions & 71 deletions COPYING
@@ -1,73 +1,18 @@
== Copying ==

The flags in this package, unless otherwise stated below, are in public
domain.

Unless otherwise specified below, the flgs were downloaded from CIA
World Factbook at [0]. Quoting the Factbook's license from [1]:

The Factbook is in the public domain. Accordingly, it may be copied
freely without permission of the Central Intelligence Agency (CIA).

The flag of Palestine was downloaded from [3] with following notice:

This file is ineligible for copyright and therefore in the public
domain, because it consists entirely of information that is common
property and contains no original authorship.View

The flag / map of Antarctica was downloaded from [4] with following notice:

Description: public domain art uploaded anonymously from OCAL 0.18

The flag of Canary Islands was downloaded from [5] with following notice:

This work has been released into the public domain by its author,
Zirland. This applies worldwide. In some countries this may not be
legally possible; if so: Zirland grants anyone the right to use this
work for any purpose, without any conditions, unless such conditions
are required by law.

The flag of Tristan da Cunha was downloaded from [6] with following notice:

This file is in the public domain, because the creator of the image
released the image in to the public domain. In case this is not
legally possible: The right to use this work is granted to anyone for
any purpose, without any conditions, unless such conditions are
required by law.

The flag of Åland was downloaded from [8] with following notice:

This file is in the public domain because it is a part of a decision
or a statement issued by a public authority or other public body in
Finland. Section 9 of the Finnish Copyright Act specifies that no
copyright exists in such material.

The flag of Qatar was downloaded from [9] with the following notice:

I, the copyright holder of this work, release this work into the public
domain. This applies worldwide. In some countries this may not be
legally possible; if so: I grant anyone the right to use this work for
any purpose, without any conditions, unless such conditions are
required by law.

The flag of Ascension Island was downloaded from [10] with the following notice:

I, the copyright holder of this work, release this work into the public
domain. This applies worldwide. In some countries this may not be
legally possible; if so: I grant anyone the right to use this work for
any purpose, without any conditions, unless such conditions are
required by law.


== References ==

[0] https://www.cia.gov/library/publications/the-world-factbook/docs/flagsoftheworld.html
[1] https://www.cia.gov/library/publications/the-world-factbook/docs/contributor_copyright.html
[2] http://europa.eu/about-eu/basic-information/symbols/flag/index_en.htm
[3] https://commons.wikimedia.org/wiki/File:Flag_of_Palestine.svg
[4] http://openclipart.org/detail/47329/antarctica-by-anonymous
[5] https://commons.wikimedia.org/wiki/File:Flag_of_the_Canary_Islands.svg
[6] https://commons.wikimedia.org/wiki/File:Flag_of_Tristan_da_Cunha.svg
[8] https://commons.wikimedia.org/wiki/File:Flag_of_%C3%85land.svg
[9] https://commons.wikimedia.org/wiki/File:Flag_of_Qatar.svg
[10] https://commons.wikimedia.org/wiki/File:Flag_of_Ascension_Island_PD.svg
The flags in this package were downloaded from Wikipedia and checked to be in
public domain or otherwise exempt from copyright. In particular, the following
are not explicitly tagged as "public_domain":

AM https://commons.wikimedia.org/wiki/File:Flag_of_Armenia.svg
AZ https://commons.wikimedia.org/wiki/File:Flag_of_Azerbaijan.svg
JE https://commons.wikimedia.org/wiki/File:Flag_of_Jersey.svg
KG https://commons.wikimedia.org/wiki/File:Flag_of_Kyrgyzstan.svg
KZ https://commons.wikimedia.org/wiki/File:Flag_of_Kazakhstan.svg
MD https://commons.wikimedia.org/wiki/File:Flag_of_Moldova.svg
MX https://commons.wikimedia.org/wiki/File:Flag_of_Mexico.svg
MY https://commons.wikimedia.org/wiki/File:Flag_of_Malaysia.svg
RS https://commons.wikimedia.org/wiki/File:Flag_of_Serbia.svg
YT https://commons.wikimedia.org/wiki/File:Flag_of_Mayotte_(local).svg

For individual details see files in html/.
87 changes: 38 additions & 49 deletions README
Expand Up @@ -2,9 +2,9 @@

This package is a collection of flags for BCP 47 region codes. Most people
think of these as country flags, but there are a few codes / flags that do
not correspond to countries. The icons are in PNG format and named by their
BCP 47 region code, which for countries is the same as ISO 3166-2 country
code.
not correspond to countries. The flags are in SVG and PNG format and named
by their BCP 47 region code, which for countries is the same as ISO 3166-2
country code.

The canonical way to get all region codes is to look for records in
language-subtag-registry (which is downloaded from [0]) with the following
Expand All @@ -15,58 +15,56 @@ fields:
AND NOT Description: Private use
AND NOT Deprecated: .*

The script regions.py lists all regions with their metadata.
The script missing.sh shows all such regions that we don't have flags for.
Regions not in that repository can be added to language-subtag-private.
One such region has been added.

Some regions do not have their own flag. In such cases, they are symlinked to
the best flag to represent them, which in most cases is the flag of their
regional or political parent. These are listed in file ALIASES.

== CIA World Factbook ==
The flags are downloaded from Wikipedia. When Wikipedia flags were
copyrighted, we worked we Wikipedia editors to either relicense them, or drew /
sourced and uploaded new public-domain versions. In particular, the license
for these flags were resolved for the initial import:

This repository was originally populated using flags from the CIA World
Factbook. Original images where downloaded in gif format from [1]. The
file appendix-d.txt is a massaged version of [2] used for scripted
downloading.
Montenegro
Nicaragua
Sint Maarten
Ascension Island
Lesotho
Kosovo

The script download-cia.sh downloads missing images and converts them to
PNG. Note that some flags have been manually edited to address various
issues. See commit history for such modifications.

Using the download script the following entries fail:
== Scripts ==

Downloading: AQ Antarctica (AY; .aq)
ERROR: Download failed. Investigate.
Downloading: PS Gaza Strip (GZ; .ps)
ERROR: Download failed. Investigate.
Downloading: PS West Bank (WE; .ps)
ERROR: Download failed. Investigate.
The script regions.py lists all regions with their metadata.

We fullfilled those (and others) manually. See below.
The script regions-wp.py shows the Wikipedia URL for the flag page.

The script missing.sh shows all such regions that we don't have flags for.

The script make-aliases.sh makes symlinks for regions that use flag of
another region.

== Exceptions ==
The script download-wp.py downloads missing flags from Wikipedia and
generating optimized SVG and PNG versions.

CIA World Factbook does not have an entry for some regions, or some
are not correctly mapped. The following have been sourced separately:

- The European Union flag was downloaded from [1] manually.
== Updating ==

- The following flags have been downloaded from Wikipedia either
because they were missing before or because Wikipedia had a better
version. We only do this when the file is in Public Domain (and NOT Creative
Commons) in Wikipedia.
If new regions are needed, update language-subtag-registry [0], or add new
regions to language-subtag-private before. Then update ALIASES and ALIASES-WP
as needed.

* Flag of Palestine (PS) [3]
* Flag of the Canary Islands (IC) [5]
* Flag of Tristan da Cunha (TA) [6]
* Flag of Åland (AX) [8]
* Flag of Qatar (QA) [9]
* Flag of Ascension Island (AC) [10]
If Wikipedia's flag is under Creative Commons, work with Wikipedia editors to
relicense it to public domain. If the flag is not explicitly marked
public_domain but otherwise exempt from copyright (typically, because of
national laws), make a note of it in file COPYING.

- The flag / map of Antarctica was downloaded from [4].
To download missing flags, run download-wp.py.

- Some regions do not have their own flag. In such cases, they are
symlinked to the best flag to represent them, which in most cases is
the flag of their regional or political parent. These are listed in
file name ALIASES.
To update to latest flags from Wikipedia, delete the html, svg, and png
directories, then run make-aliases.sh followed by download-wp.py.


== License ==
Expand All @@ -77,12 +75,3 @@ See file COPYING for details.
== References ==

[0] http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
[1] https://www.cia.gov/library/publications/the-world-factbook/docs/flagsoftheworld.html
[2] https://www.cia.gov/library/publications/the-world-factbook/appendix/appendix-d.html
[3] https://commons.wikimedia.org/wiki/File:Flag_of_Palestine.svg
[4] http://openclipart.org/detail/47329/antarctica-by-anonymous
[5] https://commons.wikimedia.org/wiki/File:Flag_of_the_Canary_Islands.svg
[6] https://commons.wikimedia.org/wiki/File:Flag_of_Tristan_da_Cunha.svg
[8] https://commons.wikimedia.org/wiki/File:Flag_of_%C3%85land.svg
[9] https://commons.wikimedia.org/wiki/File:Flag_of_Qatar.svg
[10] https://commons.wikimedia.org/wiki/File:Flag_of_Ascension_Island_PD.svg

0 comments on commit b631c74

Please sign in to comment.