Compare commits
2 Commits
d3e575dd93
...
c5ea674db6
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c5ea674db6 | ||
![]() |
b1689df8cd |
258
country_flags.csv
Normal file
258
country_flags.csv
Normal file
@ -0,0 +1,258 @@
|
|||||||
|
Afghanistan
|
||||||
|
Åland Islands
|
||||||
|
Albania
|
||||||
|
Algeria
|
||||||
|
American Samoa
|
||||||
|
Andorra
|
||||||
|
Angola
|
||||||
|
Anguilla
|
||||||
|
Antarctica
|
||||||
|
Antigua and Barbuda
|
||||||
|
Argentina
|
||||||
|
Armenia
|
||||||
|
Aruba
|
||||||
|
Australia
|
||||||
|
Austria
|
||||||
|
Azerbaijan
|
||||||
|
Bahamas
|
||||||
|
Bahrain
|
||||||
|
Bangladesh
|
||||||
|
Barbados
|
||||||
|
Belarus
|
||||||
|
Belgium
|
||||||
|
Belize
|
||||||
|
Benin
|
||||||
|
Bermuda
|
||||||
|
Bhutan
|
||||||
|
Bolivia
|
||||||
|
"Bonaire, Sint Eustatius and Saba"
|
||||||
|
Bosnia and Herzegovina
|
||||||
|
Botswana
|
||||||
|
Bouvet Island
|
||||||
|
Brazil
|
||||||
|
British Indian Ocean Territory
|
||||||
|
British Virgin Islands
|
||||||
|
Brunei Darussalam
|
||||||
|
Bulgaria
|
||||||
|
Burkina Faso
|
||||||
|
Burma
|
||||||
|
Burundi
|
||||||
|
Cambodia
|
||||||
|
Cameroon
|
||||||
|
Canada
|
||||||
|
Cape Verde
|
||||||
|
Cayman Islands
|
||||||
|
Central African Republic
|
||||||
|
Chad
|
||||||
|
Chile
|
||||||
|
China
|
||||||
|
Christmas Island
|
||||||
|
Cocos (Keeling) Islands
|
||||||
|
Colombia
|
||||||
|
Comoros
|
||||||
|
Congo
|
||||||
|
Cook Islands
|
||||||
|
Costa Rica
|
||||||
|
Côte d'Ivoire
|
||||||
|
Croatia
|
||||||
|
Cuba
|
||||||
|
Cyprus
|
||||||
|
Czech Republic
|
||||||
|
Czechoslovakia
|
||||||
|
Democratic Republic of the Congo
|
||||||
|
Denmark
|
||||||
|
Djibouti
|
||||||
|
Dominica
|
||||||
|
Dominican Republic
|
||||||
|
East Germany
|
||||||
|
Ecuador
|
||||||
|
Egypt
|
||||||
|
El Salvador
|
||||||
|
Equatorial Guinea
|
||||||
|
Eritrea
|
||||||
|
Estonia
|
||||||
|
Ethiopia
|
||||||
|
Falkland Islands
|
||||||
|
Faroe Islands
|
||||||
|
Federal Republic of Yugoslavia
|
||||||
|
Federated States of Micronesia
|
||||||
|
Fiji
|
||||||
|
Finland
|
||||||
|
France
|
||||||
|
French Guiana
|
||||||
|
French Polynesia
|
||||||
|
French Southern Territories
|
||||||
|
Gabon
|
||||||
|
Gambia
|
||||||
|
Georgia
|
||||||
|
Germany
|
||||||
|
Ghana
|
||||||
|
Gibraltar
|
||||||
|
Greece
|
||||||
|
Greenland
|
||||||
|
Grenada
|
||||||
|
Guadeloupe
|
||||||
|
Guam
|
||||||
|
Guatemala
|
||||||
|
Guernsey
|
||||||
|
Guinea
|
||||||
|
Guinea-Bissau
|
||||||
|
Guyana
|
||||||
|
Haiti
|
||||||
|
Heard Island and McDonald Islands
|
||||||
|
Holy See (Vatican City State)
|
||||||
|
Honduras
|
||||||
|
Hong Kong
|
||||||
|
Hungary
|
||||||
|
Iceland
|
||||||
|
India
|
||||||
|
Indonesia
|
||||||
|
Iran
|
||||||
|
Iraq
|
||||||
|
Ireland
|
||||||
|
Isle of Man
|
||||||
|
Israel
|
||||||
|
Italy
|
||||||
|
Jamaica
|
||||||
|
Japan
|
||||||
|
Jersey
|
||||||
|
Jordan
|
||||||
|
Kazakhstan
|
||||||
|
Kenya
|
||||||
|
Kiribati
|
||||||
|
Korea
|
||||||
|
Kosovo
|
||||||
|
Kuwait
|
||||||
|
Kyrgyzstan
|
||||||
|
Laos,🇱🇦
|
||||||
|
Latvia,🇱🇻
|
||||||
|
Lebanon,🇱🇧
|
||||||
|
Lesotho,🇱🇸
|
||||||
|
Liberia,🇱🇷
|
||||||
|
Libya,🇱🇾
|
||||||
|
Liechtenstein,🇱🇮
|
||||||
|
Lithuania,🇱🇹
|
||||||
|
Luxembourg,🇱🇺
|
||||||
|
Macao,🇲🇴
|
||||||
|
Madagascar,🇲🇬
|
||||||
|
Malawi,🇲🇼
|
||||||
|
Malaysia,🇲🇾
|
||||||
|
Maldives,🇲🇻
|
||||||
|
Mali,🇲🇱
|
||||||
|
Malta,🇲🇹
|
||||||
|
Marshall Islands,🇲🇭
|
||||||
|
Martinique,🇲🇶
|
||||||
|
Mauritania,🇲🇷
|
||||||
|
Mauritius,🇲🇺
|
||||||
|
Mayotte,🇾🇹
|
||||||
|
Mexico,🇲🇽
|
||||||
|
Moldova,🇲🇩
|
||||||
|
Monaco,🇲🇨
|
||||||
|
Mongolia,🇲🇳
|
||||||
|
Montenegro,🇲🇪
|
||||||
|
Montserrat,🇲🇸
|
||||||
|
Morocco,🇲🇦
|
||||||
|
Mozambique,🇲🇿
|
||||||
|
Myanmar,🇲🇲
|
||||||
|
Namibia,🇳🇦
|
||||||
|
Nauru,🇳🇷
|
||||||
|
Nepal,🇳🇵
|
||||||
|
Netherlands,🇳🇱
|
||||||
|
Netherlands Antilles,🇳🇱
|
||||||
|
New Caledonia,🇳🇨
|
||||||
|
New Zealand,🇳🇿
|
||||||
|
Nicaragua,🇳🇮
|
||||||
|
Niger,🇳🇪
|
||||||
|
Nigeria,🇳🇬
|
||||||
|
Niue,🇳🇺
|
||||||
|
Norfolk Island,🇳🇫
|
||||||
|
North Korea,🇰🇵
|
||||||
|
North Vietnam,🇻🇳
|
||||||
|
Northern Mariana Islands,🇲🇵
|
||||||
|
Norway,🇳🇴
|
||||||
|
Oman,🇴🇲
|
||||||
|
Pakistan,🇵🇰
|
||||||
|
Palau,🇵🇼
|
||||||
|
Palestine,🇵🇸
|
||||||
|
Palestinian Territory,🇵🇸
|
||||||
|
Panama,🇵🇦
|
||||||
|
Papua New Guinea,🇵🇬
|
||||||
|
Paraguay,🇵🇾
|
||||||
|
Peru,🇵🇪
|
||||||
|
Philippines,🇵🇭
|
||||||
|
Poland,🇵🇱
|
||||||
|
Portugal,🇵🇹
|
||||||
|
Pitcairn,🇵🇳
|
||||||
|
Puerto Rico,🇵🇷
|
||||||
|
Qatar,🇶🇦
|
||||||
|
Republic of Macedonia,🇲🇰
|
||||||
|
Réunion,🇷🇪
|
||||||
|
Romania,🇷🇴
|
||||||
|
Russia,🇷🇺
|
||||||
|
Rwanda,🇷🇼
|
||||||
|
Saint Barthélemy,🇧🇱
|
||||||
|
Saint Helena,🇸🇭
|
||||||
|
Saint Kitts and Nevis,🇰🇳
|
||||||
|
Saint Lucia,🇱🇨
|
||||||
|
Saint Martin (French part),🇫🇷
|
||||||
|
Saint Pierre and Miquelon,🇵🇲
|
||||||
|
Saint Vincent and the Grenadines,🇻🇨
|
||||||
|
Samoa,🇼🇸
|
||||||
|
San Marino,🇸🇲
|
||||||
|
Sao Tome and Principe,🇸🇹
|
||||||
|
Saudi Arabia,🇸🇦
|
||||||
|
Senegal,🇸🇳
|
||||||
|
Serbia,🇷🇸
|
||||||
|
Serbia and Montenegro🇷🇸🇲🇪
|
||||||
|
Seychelles,🇸🇨
|
||||||
|
Siam,🇹🇭
|
||||||
|
Sierra Leone,🇸🇱
|
||||||
|
Singapore,🇸🇬
|
||||||
|
Slovakia,🇸🇰
|
||||||
|
Slovenia,🇸🇮
|
||||||
|
Solomon Islands,🇸🇧
|
||||||
|
Somalia,🇸🇴
|
||||||
|
South Africa🇿🇦
|
||||||
|
South Georgia and the South Sandwich Islands,🇬🇸
|
||||||
|
South Korea,🇰🇷
|
||||||
|
Spain,🇪🇸
|
||||||
|
Sri Lanka,🇱🇰
|
||||||
|
Sudan,🇸🇩
|
||||||
|
Suriname,🇸🇷
|
||||||
|
Svalbard and Jan Mayen,🇸🇯
|
||||||
|
Swaziland,🇸🇿
|
||||||
|
Sweden,🇸🇪
|
||||||
|
Switzerland,🇨🇭
|
||||||
|
Syria,🇸🇾
|
||||||
|
Taiwan,🇹🇼
|
||||||
|
Tajikistan,🇹🇯
|
||||||
|
Tanzania,🇹🇿
|
||||||
|
Thailand,🇹🇭
|
||||||
|
Timor-Leste,🇹🇱
|
||||||
|
Togo,🇹🇬
|
||||||
|
Tokelau,🇹🇰
|
||||||
|
Tonga,🇹🇴
|
||||||
|
Trinidad and Tobago,🇹🇹
|
||||||
|
Tunisia,🇹🇳
|
||||||
|
Turkey,🇹🇷
|
||||||
|
Turkmenistan,🇹🇲
|
||||||
|
Turks and Caicos Islands,🇹🇨
|
||||||
|
Tuvalu,🇹🇻
|
||||||
|
U.S. Virgin Islands,🇻🇮
|
||||||
|
Uganda,🇺🇬
|
||||||
|
Ukraine,🇺🇦
|
||||||
|
United Arab Emirates,🇦🇪
|
||||||
|
United Kingdom,🇬🇧
|
||||||
|
United States,🇺🇸
|
||||||
|
United States Minor Outlying Islands,🇺🇲
|
||||||
|
Uruguay,🇺🇾
|
||||||
|
Uzbekistan,🇺🇿
|
||||||
|
Vanuatu,🇻🇺
|
||||||
|
Venezuela,🇻🇪
|
||||||
|
Vietnam,🇻🇳
|
||||||
|
Wallis and Futuna,🇫🇷
|
||||||
|
West Germany,⬅️🇩🇪
|
||||||
|
Western Sahara,🇪🇭
|
||||||
|
Yemen,🇾🇪
|
||||||
|
Zambia,🇿🇲
|
||||||
|
Zimbabwe,🇿🇼
|
Can't render this file because it has a wrong number of fields in line 127.
|
@ -7,7 +7,7 @@ from bookstack import Bookstack
|
|||||||
from vcinema_utils import VCinemaUtils
|
from vcinema_utils import VCinemaUtils
|
||||||
|
|
||||||
|
|
||||||
def update_viewings_csv_file_from_page(token_id, token_secret):
|
def update_viewings_csv(token_id, token_secret, check_existing=True):
|
||||||
# Page ID of https://wiki.jacknet.io/books/vcinema/page/csv
|
# Page ID of https://wiki.jacknet.io/books/vcinema/page/csv
|
||||||
page_id = 11
|
page_id = 11
|
||||||
|
|
||||||
@ -17,23 +17,21 @@ def update_viewings_csv_file_from_page(token_id, token_secret):
|
|||||||
soup = BeautifulSoup(html_page, 'html.parser')
|
soup = BeautifulSoup(html_page, 'html.parser')
|
||||||
csv_data = soup.find("code").text.strip().encode('utf-8')
|
csv_data = soup.find("code").text.strip().encode('utf-8')
|
||||||
|
|
||||||
print("Retrieving existing file")
|
if check_existing:
|
||||||
existing_attachment_id = VCinemaUtils.get_viewings_csv_attachment_id(token_id, token_secret)
|
print("Retrieving existing file")
|
||||||
|
existing_attachment_id = VCinemaUtils.get_viewings_csv_attachment_id(token_id, token_secret)
|
||||||
|
attachment = Bookstack.get_attachment(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, existing_attachment_id)
|
||||||
|
existing_attachment_hash = hashlib.md5(attachment).hexdigest()
|
||||||
|
page_hash = hashlib.md5(csv_data).hexdigest()
|
||||||
|
|
||||||
attachment = Bookstack.get_attachment(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, existing_attachment_id)
|
if not check_existing or page_hash != existing_attachment_hash:
|
||||||
|
|
||||||
existing_attachment_hash = hashlib.md5(attachment).hexdigest()
|
|
||||||
|
|
||||||
page_hash = hashlib.md5(csv_data).hexdigest()
|
|
||||||
|
|
||||||
if page_hash != existing_attachment_hash:
|
|
||||||
print("Updating file")
|
print("Updating file")
|
||||||
# bookstack update file via api doesn't work
|
# bookstack update file via api doesn't work
|
||||||
Bookstack.post_attachment(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, "vcinema.csv", csv_data, page_id)
|
Bookstack.post_attachment(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, "vcinema.csv", csv_data, page_id)
|
||||||
Bookstack.delete_attachment(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, existing_attachment_id)
|
Bookstack.delete_attachment(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, existing_attachment_id)
|
||||||
print("Done")
|
print("File updated")
|
||||||
else:
|
else:
|
||||||
print("File already up to date")
|
print("File already up-to-date")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
@ -43,4 +41,4 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
update_viewings_csv_file_from_page(args.token_id, args.token_secret)
|
update_viewings_csv(args.token_id, args.token_secret)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user