From 15e87353bd83fcc12e1086fbcce308a249a7b351 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sat, 30 Jan 2021 22:03:59 -0500 Subject: [PATCH] only show archive.org if enabled --- archivebox/index/html.py | 2 ++ archivebox/index/schema.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/archivebox/index/html.py b/archivebox/index/html.py index cff50085..c8b9d07e 100644 --- a/archivebox/index/html.py +++ b/archivebox/index/html.py @@ -23,6 +23,7 @@ from ..config import ( GIT_SHA, FOOTER_INFO, HTML_INDEX_FILENAME, + SAVE_ARCHIVE_DOT_ORG, ) MAIN_INDEX_TEMPLATE = 'static_index.html' @@ -103,6 +104,7 @@ def link_details_template(link: Link) -> str: 'status': 'archived' if link.is_archived else 'not yet archived', 'status_color': 'success' if link.is_archived else 'danger', 'oldest_archive_date': ts_to_date(link.oldest_archive_date), + 'SAVE_ARCHIVE_DOT_ORG': SAVE_ARCHIVE_DOT_ORG, }) @enforce_types diff --git a/archivebox/index/schema.py b/archivebox/index/schema.py index 7e2c784d..7501da3a 100644 --- a/archivebox/index/schema.py +++ b/archivebox/index/schema.py @@ -412,6 +412,8 @@ class Link: """predict the expected output paths that should be present after archiving""" from ..extractors.wget import wget_output_path + # TODO: banish this awful duplication from the codebase and import these + # from their respective extractor files canonical = { 'index_path': 'index.html', 'favicon_path': 'favicon.ico',