diff --git a/zooms_generator.py b/zooms_generator.py
index d075a87..a3baf88 100644
--- a/zooms_generator.py
+++ b/zooms_generator.py
@@ -10,45 +10,8 @@ import argparse
from pathlib import Path
-HTML_START_CONSTANT = """\
-
-
-
\n')
+ with open(HTML_TEMPLATE) as template_file, open(dest_file, "w") as data_file:
- for page_idx in sorted(zooms.keys()):
- img_url = f"{prefix}{zooms[page_idx]['name']}.{extention}"
- zoom_html_data = [','.join([str(zoom) for zoom in page_zooms]) for page_zooms in zooms[page_idx]["zooms"]]
- zoom_html_str = ';'.join(zoom_html_data)
- data_file.write(f'
\n')
-
- data_file.write(f'
\n')
-
- data_file.write(HTML_END_CONSTANT)
+ data = template_file.read().replace(HTML_TO_REPLACE, img_tags)
+
+ data_file.write(data)
+
def generate_argparse():
""" Generate Melpomene's generator input parser"""