diff options
author | emkael <emkael@tlen.pl> | 2023-02-07 17:30:13 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2023-02-07 17:30:13 +0100 |
commit | 13e5db0637204b9164ed5cab4cef129505548407 (patch) | |
tree | 7ff1c97ac01a256c9dc3f4bbc269e06b33096376 /scripts/statics-compile.py | |
parent | 79d084a1222062df47528b8340a83ef679735267 (diff) |
Python 2.x -> 3.x conversion
Diffstat (limited to 'scripts/statics-compile.py')
-rw-r--r-- | scripts/statics-compile.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/statics-compile.py b/scripts/statics-compile.py index 16d82ae..dc2f53a 100644 --- a/scripts/statics-compile.py +++ b/scripts/statics-compile.py @@ -15,7 +15,7 @@ while True: if len(arguments) == 0: break -template = bs4(file('templates/static.html'), 'lxml') +template = bs4(open('templates/static.html'), 'lxml') content_wrapper = template.find('div', {'id': 'wrapper'}).extract() del content_wrapper['id'] @@ -27,8 +27,8 @@ 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') + bs4(open(content_file).read(), 'html.parser') ) footer.insert_before(content) -print template.prettify().encode('utf-8') +print(template.prettify()) |