summaryrefslogtreecommitdiff
path: root/app/python/weekdays.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-06-07 15:16:59 +0200
committeremkael <emkael@tlen.pl>2016-06-10 11:46:41 +0200
commitdf401552aac363655ab8f056a6c910a7611954d6 (patch)
treeccd02b63b8f915f02959b7890d71507e44679917 /app/python/weekdays.py
parentfaa340586f78beacff2e32df65d2f37c08f0df2b (diff)
* renaming python directory
Diffstat (limited to 'app/python/weekdays.py')
-rw-r--r--app/python/weekdays.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/app/python/weekdays.py b/app/python/weekdays.py
deleted file mode 100644
index 547f6b2..0000000
--- a/app/python/weekdays.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import json
-import os
-import urllib
-
-from lxml import etree
-
-
-def main():
- week_day_config = {}
-
- supplemental_data = etree.fromstring(
- urllib.urlopen(
- 'http://unicode.org/repos/cldr/trunk/common/supplemental/' +
- 'supplementalData.xml'
- ).read())
- for first_day in supplemental_data.xpath('weekData/firstDay[not(@alt)]'):
- day = first_day.get('day')
- territories = first_day.get('territories').split()
- for territory in territories:
- week_day_config[territory] = day
-
- json.dump(week_day_config,
- file(os.path.join(
- os.environ['PYTHONPATH'],
- 'config',
- 'weekdays.json'), 'w'),
- sort_keys=True,
- indent=4,
- separators=(',', ': '))
-
-if __name__ == '__main__':
- main()