mirror of
https://github.com/rzeldent/esp32cam-rtsp.git
synced 2025-11-11 10:46:23 +00:00
20 lines
391 B
Python
20 lines
391 B
Python
#!/usr/bin/python3
|
|
|
|
import sys
|
|
import minify_html
|
|
|
|
if (len(sys.argv) <= 2):
|
|
print('Usage: minify.py input.html output.html')
|
|
sys.exit(1)
|
|
|
|
input_file = open(sys.argv[1], 'r')
|
|
output_file = open(sys.argv[2], 'w')
|
|
|
|
html = input_file.read()
|
|
input_file.close()
|
|
|
|
html_minified = minify_html.minify(html, minify_css=True)
|
|
output_file.write(html_minified)
|
|
|
|
output_file.close()
|
|
print('Done.') |