mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-22 06:03:23 +02:00
use new config vars for html index writing
This commit is contained in:
@@ -14,6 +14,9 @@ from ..config import (
|
|||||||
FOOTER_INFO,
|
FOOTER_INFO,
|
||||||
ARCHIVE_DIR_NAME,
|
ARCHIVE_DIR_NAME,
|
||||||
HTML_INDEX_FILENAME,
|
HTML_INDEX_FILENAME,
|
||||||
|
STATIC_DIR_NAME,
|
||||||
|
ROBOTS_TXT_FILENAME,
|
||||||
|
FAVICON_FILENAME,
|
||||||
)
|
)
|
||||||
from ..util import (
|
from ..util import (
|
||||||
enforce_types,
|
enforce_types,
|
||||||
@@ -40,9 +43,9 @@ TITLE_LOADING_MSG = 'Not yet archived...'
|
|||||||
def write_html_main_index(links: List[Link], out_dir: str=OUTPUT_DIR, finished: bool=False) -> None:
|
def write_html_main_index(links: List[Link], out_dir: str=OUTPUT_DIR, finished: bool=False) -> None:
|
||||||
"""write the html link index to a given path"""
|
"""write the html link index to a given path"""
|
||||||
|
|
||||||
copy_and_overwrite(join(TEMPLATES_DIR, 'favicon.ico'), join(out_dir, 'favicon.ico'))
|
copy_and_overwrite(join(TEMPLATES_DIR, FAVICON_FILENAME), join(out_dir, FAVICON_FILENAME))
|
||||||
copy_and_overwrite(join(TEMPLATES_DIR, 'robots.txt'), join(out_dir, 'robots.txt'))
|
copy_and_overwrite(join(TEMPLATES_DIR, ROBOTS_TXT_FILENAME), join(out_dir, ROBOTS_TXT_FILENAME))
|
||||||
copy_and_overwrite(join(TEMPLATES_DIR, 'static'), join(out_dir, 'static'))
|
copy_and_overwrite(join(TEMPLATES_DIR, STATIC_DIR_NAME), join(out_dir, STATIC_DIR_NAME))
|
||||||
|
|
||||||
rendered_html = main_index_template(links, finished=finished)
|
rendered_html = main_index_template(links, finished=finished)
|
||||||
atomic_write(rendered_html, join(out_dir, HTML_INDEX_FILENAME))
|
atomic_write(rendered_html, join(out_dir, HTML_INDEX_FILENAME))
|
||||||
|
Reference in New Issue
Block a user