diff --git a/index.py b/index.py index 3882e1a8..168670d1 100644 --- a/index.py +++ b/index.py @@ -3,11 +3,13 @@ import json from datetime import datetime from string import Template +from distutils.dir_util import copy_tree from config import ( INDEX_TEMPLATE, INDEX_ROW_TEMPLATE, LINK_INDEX_TEMPLATE, + TEMPLATE_STATICFILES, ARCHIVE_PERMISSIONS, ARCHIVE_DIR, ANSI, @@ -31,11 +33,10 @@ def write_links_index(out_dir, links): write_json_links_index(out_dir, links) write_html_links_index(out_dir, links) - print('[√] [{}] Archive index is now up-to-date with {}{}{} links.'.format( + print('[√] [{}] Main archive index now up-to-date: {}/index.html'.format( datetime.now().strftime('%Y-%m-%d %H:%M:%S'), - ANSI['green'], - len(links), - ANSI['reset'], + out_dir, + )) def write_json_links_index(out_dir, links): @@ -71,6 +72,8 @@ def write_html_links_index(out_dir, links): path = os.path.join(out_dir, 'index.html') + copy_tree(TEMPLATE_STATICFILES, os.path.join(out_dir, "static")) + with open(INDEX_TEMPLATE, 'r', encoding='utf-8') as f: index_html = f.read() diff --git a/templates/static/archive.png b/templates/static/archive.png new file mode 100644 index 00000000..169f77f0 Binary files /dev/null and b/templates/static/archive.png differ diff --git a/templates/static/complete.png b/templates/static/complete.png new file mode 100644 index 00000000..6f8cf460 Binary files /dev/null and b/templates/static/complete.png differ diff --git a/templates/static/external.png b/templates/static/external.png new file mode 100644 index 00000000..7e1a5f02 Binary files /dev/null and b/templates/static/external.png differ diff --git a/templates/static/incomplete.png b/templates/static/incomplete.png new file mode 100644 index 00000000..77b07a65 Binary files /dev/null and b/templates/static/incomplete.png differ diff --git a/templates/static/spinner.gif b/templates/static/spinner.gif new file mode 100644 index 00000000..73388102 Binary files /dev/null and b/templates/static/spinner.gif differ