summaryrefslogtreecommitdiff
path: root/scripts/static.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-09-08 01:28:21 +0200
committeremkael <emkael@tlen.pl>2017-09-08 01:28:21 +0200
commit8f795b1d445441daab5ffb75060a6dbf8ed0934a (patch)
tree15e55a2a7e03867ac0cccfb8303674d478510503 /scripts/static.py
parent655a9847513332e8e119f37f7ed95f4ab002b1a1 (diff)
Renaming scripts so that their names make sense
Diffstat (limited to 'scripts/static.py')
-rw-r--r--scripts/static.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/scripts/static.py b/scripts/static.py
deleted file mode 100644
index 16d82ae..0000000
--- a/scripts/static.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import copy, os, sys
-from bs4 import BeautifulSoup as bs4
-
-content_files = []
-page_header = ''
-
-arguments = sys.argv[1:]
-
-while True:
- page_header = arguments[0]
- arguments = arguments[1:]
- if os.path.exists(page_header):
- content_files.append(page_header)
- page_header = ''
- if len(arguments) == 0:
- break
-
-template = bs4(file('templates/static.html'), 'lxml')
-
-content_wrapper = template.find('div', {'id': 'wrapper'}).extract()
-del content_wrapper['id']
-
-template.select('h2 small')[0].string = page_header
-
-footer = template.find('div', {'id': 'footer'})
-
-for content_file in content_files:
- content = copy.copy(content_wrapper)
- content.div.append(
- bs4(file(content_file).read(), 'html.parser')
- )
- footer.insert_before(content)
-
-print template.prettify().encode('utf-8')