|
@ -102,20 +102,18 @@ def check_distribusi_index(args, index): |
|
|
|
|
|
|
|
|
def write_index(args, index, html): |
|
|
def write_index(args, index, html): |
|
|
with open(index, "w") as index_file: |
|
|
with open(index, "w") as index_file: |
|
|
if not args.no_template: |
|
|
if args.style: |
|
|
if args.style: |
|
|
file_style = open(args.style, "r") |
|
|
file_style = open(args.style, "r") |
|
|
style = file_style.read() |
|
|
style = file_style.read() |
|
|
styled_html_head = html_head % style |
|
|
styled_html_head = html_head % style |
|
|
else: |
|
|
else: |
|
|
styled_html_head = html_head % "" |
|
|
styled_html_head = html_head % "" |
|
|
|
|
|
index_file.write(styled_html_head) |
|
|
index_file.write(styled_html_head) |
|
|
|
|
|
|
|
|
for line in html: |
|
|
for line in html: |
|
|
index_file.write(line + "\n") |
|
|
index_file.write(line + "\n") |
|
|
|
|
|
|
|
|
if not args.no_template: |
|
|
index_file.write(html_footer) |
|
|
index_file.write(html_footer) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def handle_text_files(name, full_path, subtype): |
|
|
def handle_text_files(name, full_path, subtype): |
|
|