diff options
author | emkael <emkael@tlen.pl> | 2017-09-08 01:28:21 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-09-08 01:28:21 +0200 |
commit | 8f795b1d445441daab5ffb75060a6dbf8ed0934a (patch) | |
tree | 15e55a2a7e03867ac0cccfb8303674d478510503 /scripts/ranking.py | |
parent | 655a9847513332e8e119f37f7ed95f4ab002b1a1 (diff) |
Renaming scripts so that their names make sense
Diffstat (limited to 'scripts/ranking.py')
-rw-r--r-- | scripts/ranking.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/scripts/ranking.py b/scripts/ranking.py deleted file mode 100644 index 52b036f..0000000 --- a/scripts/ranking.py +++ /dev/null @@ -1,26 +0,0 @@ -import os, sys -from bs4 import BeautifulSoup as bs4 - -ranking_date = sys.argv[4] -subtitle = 'notowanie %s (%s), stan na %s' % ( - sys.argv[1], sys.argv[2], '.'.join(ranking_date.split('-')[::-1]) -) - -table = bs4(file('templates/ranking.html'), 'lxml') -table.select('.page-header h2 small')[0].string = subtitle - -table.select('table.data-table')[0]['data-ranking'] = '_data/%s.json' % ( - ranking_date) - -script_src = table.select('script[src="_res/ranking.js"]')[0] -script_src['src'] = '%s?%d' % ('_res/ranking.js', os.path.getmtime('http/_res/ranking.js')) - -rawlink = table.select('a#rawlink')[0] -rawlink['href'] = '%s/%s.csv' % (rawlink['href'], ranking_date) - -menu_file = file(sys.argv[3]) -menu = table.select('div.static-menu')[0] -menu.clear() -menu.append(bs4(menu_file, 'html.parser')) - -print table.prettify().encode('utf-8') |