mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-26 09:56:17 -05:00
Creating debian install scripts.
Modifying Ubuntu 20.04 install script to work with Debian 11. Should not need to compile mod_tile. Uncommenting branch checkout. Not removing nodejs. Not installing nodejs. Installing nodejs instead of npm?? Using debian 11 npm sources. Installing archive tools using git+https Updating carto location. Using global renderd.conf in apache config. Using -I to get debian ip. Updating more file locations for debian 11. Checking alternative locations for single-file and readability-extractor
This commit is contained in:
parent
70c972a046
commit
849a3fd43f
6 changed files with 315 additions and 8 deletions
|
|
@ -152,6 +152,8 @@ def request_archive(url: str):
|
|||
def local_singlefile(url: str):
|
||||
"""Run the single-file executable to create an HTML file archive."""
|
||||
single_file_path = pathlib.Path('/usr/bin/single-file')
|
||||
if not single_file_path.is_file():
|
||||
single_file_path = pathlib.Path('/usr/local/bin/single-file')
|
||||
if not single_file_path.is_file():
|
||||
raise FileNotFoundError(f'single-file not found at {single_file_path}')
|
||||
|
||||
|
|
@ -190,6 +192,8 @@ def local_extract_readability(path: str, url: str) -> dict:
|
|||
"""Extract the readability from an HTML file, typically from single-file."""
|
||||
logger.info(f'readability for {url}')
|
||||
readability_path = pathlib.Path('/usr/bin/readability-extractor')
|
||||
if not readability_path.is_file():
|
||||
readability_path = pathlib.Path('/usr/local/bin/readability-extractor')
|
||||
if not readability_path.is_file():
|
||||
raise FileNotFoundError(f'Readability extractor not found at {readability_path}')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue