Coding style.

- Removing references in elinks output.
- Allows pandoc tool to use elinks tool.
This commit is contained in:
Andrew Hamilton 2019-08-27 16:34:00 +10:00
parent 76df9366cb
commit 8840fd9713
2 changed files with 3 additions and 7 deletions

View file

@ -392,16 +392,12 @@ def html_syntax(path):
return status, stderr
@deps(deps={"pandoc", "elinks"}, url="pandoc",
executables={"pandoc", "elinks"})
@deps(deps={"pandoc"}, url="pandoc", executables={"pandoc"})
def pandoc(path):
with tempfile.TemporaryDirectory() as temp_dir:
temp_path = os.path.join(temp_dir, "temp.html")
_do_command(["pandoc", "-t", "html", "-o", temp_path, path])
return _run_command(
["elinks", "-no-numbering", "-no-references",
"-dump-color-mode", "1", "-dump", temp_path],
has_color=True, success_status=Status.normal)
return elinks(temp_path)
MAX_IMAGE_SIZE = 200

View file

@ -208,7 +208,7 @@ tools_for_extensions = [
[elinks]
dependencies = ["elinks"]
command = "elinks -dump-color-mode 1 -dump"
command = "elinks -dump-color-mode 1 -dump -no-numbering -no-references"
success_status = "normal"
has_color = true