From 4060fa99c23bca17895029ae1ffad24d0d024269 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 7 Sep 2017 02:10:36 +0200 Subject: Moving *.py scripts to separate directory, cleaning things up --- ranking.py | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 ranking.py (limited to 'ranking.py') 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') -- cgit v1.2.3