make filenames consistent with program name
This commit is contained in:
parent
37df00a08b
commit
5b6eb5e4ad
4 changed files with 6 additions and 7 deletions
|
@ -23,7 +23,7 @@ from ..logging_util import TimedProgress
|
|||
def should_save_singlefile(link: Link, out_dir: Optional[str]=None) -> bool:
|
||||
out_dir = out_dir or link.link_dir
|
||||
|
||||
output = Path(out_dir or link.link_dir) / 'single-file.html'
|
||||
output = Path(out_dir or link.link_dir) / 'singlefile.html'
|
||||
return SAVE_SINGLEFILE and (not output.exists())
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ def save_singlefile(link: Link, out_dir: Optional[str]=None, timeout: int=TIMEOU
|
|||
"""download full site using single-file"""
|
||||
|
||||
out_dir = out_dir or link.link_dir
|
||||
output = str(Path(out_dir).absolute() / "single-file.html")
|
||||
output = str(Path(out_dir).absolute() / "singlefile.html")
|
||||
|
||||
# SingleFile CLI Docs: https://github.com/gildas-lormeau/SingleFile/tree/master/cli
|
||||
cmd = [
|
||||
|
|
|
@ -365,7 +365,7 @@ class Link:
|
|||
'screenshot.png',
|
||||
'output.html',
|
||||
'media',
|
||||
'single-file.html'
|
||||
'singlefile.html'
|
||||
)
|
||||
|
||||
return any(
|
||||
|
@ -406,7 +406,7 @@ class Link:
|
|||
'google_favicon_path': 'https://www.google.com/s2/favicons?domain={}'.format(self.domain),
|
||||
'wget_path': wget_output_path(self),
|
||||
'warc_path': 'warc',
|
||||
'singlefile_path': 'single-file.html',
|
||||
'singlefile_path': 'singlefile.html',
|
||||
'pdf_path': 'output.pdf',
|
||||
'screenshot_path': 'screenshot.png',
|
||||
'dom_path': 'output.html',
|
||||
|
@ -430,4 +430,3 @@ class Link:
|
|||
})
|
||||
return canonical
|
||||
|
||||
|
||||
|
|
|
@ -344,7 +344,7 @@
|
|||
<img src="../../static/external.png" class="external"/>
|
||||
</a>
|
||||
<a href="$singlefile_path" target="preview"><h4 class="card-title">SingleFile</h4></a>
|
||||
<p class="card-text">archive/single-file.html</p>
|
||||
<p class="card-text">archive/singlefile.html</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,5 +17,5 @@ def test_ignore_methods():
|
|||
def test_singlefile_works(tmp_path, process):
|
||||
add_process = subprocess.run(['archivebox', 'add', 'http://127.0.0.1:8080/static/example.com.html'], capture_output=True)
|
||||
archived_item_path = list(tmp_path.glob('archive/**/*'))[0]
|
||||
output_file = archived_item_path / "single-file.html"
|
||||
output_file = archived_item_path / "singlefile.html"
|
||||
assert output_file.exists()
|
||||
|
|
Loading…
Reference in a new issue