Ver código fonte

only show archive.org if enabled

Nick Sweeting 4 anos atrás
pai
commit
15e87353bd
2 arquivos alterados com 4 adições e 0 exclusões
  1. 2 0
      archivebox/index/html.py
  2. 2 0
      archivebox/index/schema.py

+ 2 - 0
archivebox/index/html.py

@@ -23,6 +23,7 @@ from ..config import (
     GIT_SHA,
     GIT_SHA,
     FOOTER_INFO,
     FOOTER_INFO,
     HTML_INDEX_FILENAME,
     HTML_INDEX_FILENAME,
+    SAVE_ARCHIVE_DOT_ORG,
 )
 )
 
 
 MAIN_INDEX_TEMPLATE = 'static_index.html'
 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': 'archived' if link.is_archived else 'not yet archived',
         'status_color': 'success' if link.is_archived else 'danger',
         'status_color': 'success' if link.is_archived else 'danger',
         'oldest_archive_date': ts_to_date(link.oldest_archive_date),
         'oldest_archive_date': ts_to_date(link.oldest_archive_date),
+        'SAVE_ARCHIVE_DOT_ORG': SAVE_ARCHIVE_DOT_ORG,
     })
     })
 
 
 @enforce_types
 @enforce_types

+ 2 - 0
archivebox/index/schema.py

@@ -412,6 +412,8 @@ class Link:
         """predict the expected output paths that should be present after archiving"""
         """predict the expected output paths that should be present after archiving"""
 
 
         from ..extractors.wget import wget_output_path
         from ..extractors.wget import wget_output_path
+        # TODO: banish this awful duplication from the codebase and import these
+        # from their respective extractor files
         canonical = {
         canonical = {
             'index_path': 'index.html',
             'index_path': 'index.html',
             'favicon_path': 'favicon.ico',
             'favicon_path': 'favicon.ico',