diff options
author | emkael <emkael@tlen.pl> | 2017-09-07 02:10:36 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-09-07 02:10:36 +0200 |
commit | 4060fa99c23bca17895029ae1ffad24d0d024269 (patch) | |
tree | cf4f322e236d913e238366a2de30727d0d2561cb /ranking.py | |
parent | 26f2934bcdfec9b32131ec01bbdd493146b3ad57 (diff) |
Moving *.py scripts to separate directory, cleaning things up
Diffstat (limited to 'ranking.py')
-rw-r--r-- | ranking.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/ranking.py b/ranking.py deleted file mode 100644 index 4a16867..0000000 --- a/ranking.py +++ /dev/null @@ -1,21 +0,0 @@ -import os, sys -from bs4 import BeautifulSoup as bs4 - -ranking_date = sys.argv[3] -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) - -print table.prettify().encode('utf-8') |