Browse Source

feat: Add readability output to legacy index.html

Cristian 5 years ago
parent
commit
eb3528fa9f
2 changed files with 14 additions and 0 deletions
  1. 2 0
      archivebox/index/schema.py
  2. 12 0
      archivebox/themes/legacy/link_details.html

+ 2 - 0
archivebox/index/schema.py

@@ -407,6 +407,7 @@ class Link:
             'wget_path': wget_output_path(self),
             'wget_path': wget_output_path(self),
             'warc_path': 'warc',
             'warc_path': 'warc',
             'singlefile_path': 'singlefile.html',
             'singlefile_path': 'singlefile.html',
+            'readability_path': 'readability/content.html',
             'pdf_path': 'output.pdf',
             'pdf_path': 'output.pdf',
             'screenshot_path': 'screenshot.png',
             'screenshot_path': 'screenshot.png',
             'dom_path': 'output.html',
             'dom_path': 'output.html',
@@ -427,6 +428,7 @@ class Link:
                 'screenshot_path': static_path,
                 'screenshot_path': static_path,
                 'dom_path': static_path,
                 'dom_path': static_path,
                 'singlefile_path': static_path,
                 'singlefile_path': static_path,
+                'readability_path': static_path,
             })
             })
         return canonical
         return canonical
 
 

+ 12 - 0
archivebox/themes/legacy/link_details.html

@@ -348,6 +348,18 @@
                           </div>
                           </div>
                         </div>
                         </div>
                     </div>
                     </div>
+                    <div class="col-lg-2">
+                        <div class="card">
+                          <iframe class="card-img-top" src="$readability_path" sandbox="allow-same-origin allow-scripts allow-forms" scrolling="no"></iframe>
+                          <div class="card-body">
+                            <a href="$readability_path" style="float:right" title="Open in new tab..." target="_blank" rel="noopener">
+                                <img src="../../static/external.png" class="external"/>
+                            </a>
+                            <a href="$readability_path" target="preview"><h4 class="card-title">Readability</h4></a>
+                            <p class="card-text">archive/readability/...</p>
+                          </div>
+                        </div>
+                    </div>
                     <div class="col-lg-2">
                     <div class="col-lg-2">
                         <div class="card">
                         <div class="card">
                           <iframe class="card-img-top pdf-frame" src="$pdf_path" scrolling="no"></iframe>
                           <iframe class="card-img-top pdf-frame" src="$pdf_path" scrolling="no"></iframe>