Compare commits
22 commits
v2025.06.0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 412fc6a9a5 | |||
| 9e24f7cb85 | |||
| 699f808951 | |||
| 327852af40 | |||
| 267a100b09 | |||
| 906b0510bb | |||
| a8f3261ab8 | |||
| ac7c7010df | |||
| 754143b395 | |||
| 99ed8efc43 | |||
| 403e056802 | |||
| ff1f2c8760 | |||
| ce224275e9 | |||
| 4c68e226bf | |||
| 9962068019 | |||
| a78f53740a | |||
| 2b5b7f7fe9 | |||
| 410666e0b0 | |||
| 1a31aa838e | |||
| ad74f48679 | |||
| 6ec4f958ff | |||
| 4341df0114 |
17 changed files with 145 additions and 67 deletions
14
README.md
14
README.md
|
|
@ -12,11 +12,11 @@ Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/
|
||||||
|
|
||||||
To install with pipx:
|
To install with pipx:
|
||||||
|
|
||||||
pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.07
|
pipx install git+https://forgejo.tail556789.ts.net/ahamilton/eris@v2025.07.11
|
||||||
|
|
||||||
or to install with uv:
|
or to install with uv:
|
||||||
|
|
||||||
uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.07
|
uv tool install git+https://forgejo.tail556789.ts.net/ahamilton/eris@v2025.07.11
|
||||||
|
|
||||||
Then use eris to install all the tools it uses:
|
Then use eris to install all the tools it uses:
|
||||||
|
|
||||||
|
|
@ -29,21 +29,23 @@ Then to run:
|
||||||
|
|
||||||
## Tools
|
## Tools
|
||||||
|
|
||||||
File types(100) | Tools(56)
|
File types(103) | Tools(63)
|
||||||
----------:| -----
|
----------:| -----
|
||||||
.* | [contents](http://pygments.org/) • [metadata](https://github.com/ahamilton/eris) • [git_diff](https://git-scm.com/docs/git-diff) • [git_blame](https://git-scm.com/docs/git-blame) • [git_log](https://git-scm.com/docs/git-log)
|
.* | [contents](http://pygments.org/) • [metadata](https://github.com/ahamilton/eris) • [git_diff](https://git-scm.com/docs/git-diff) • [git_blame](https://git-scm.com/docs/git-blame) • [git_log](https://git-scm.com/docs/git-log)
|
||||||
.py | [python_syntax](https://en.wikipedia.org/wiki/Python_syntax_and_semantics) • [python_unittests](https://docs.python.org/3/library/unittest.html) • [pytest](https://docs.pytest.org/en/latest/) • [pydoc](https://docs.python.org/3/library/pydoc.html) • [mypy](http://mypy-lang.org/) • [python_coverage](https://coverage.readthedocs.io/) • [pycodestyle](http://pycodestyle.pycqa.org/en/latest/) • [pyflakes](https://pypi.org/project/pyflakes/) • [pylint](https://www.pylint.org/) • [python_gut](https://github.com/ahamilton/eris) • [python_mccabe](https://pypi.org/project/mccabe/) • [bandit](https://pypi.org/project/bandit/)
|
.py | [python_syntax](https://en.wikipedia.org/wiki/Python_syntax_and_semantics) • [python_unittests](https://docs.python.org/3/library/unittest.html) • [pytest](https://docs.pytest.org/en/latest/) • [pydoc](https://docs.python.org/3/library/pydoc.html) • [mypy](http://mypy-lang.org/) • [python_coverage](https://coverage.readthedocs.io/) • [pycodestyle](http://pycodestyle.pycqa.org/en/latest/) • [pyflakes](https://pypi.org/project/pyflakes/) • [pylint](https://www.pylint.org/) • [python_gut](https://github.com/ahamilton/eris) • [python_mccabe](https://pypi.org/project/mccabe/) • [bandit](https://pypi.org/project/bandit/) • [black](https://github.com/psf/black) • [isort](https://pycqa.github.io/isort/)
|
||||||
.pl .pm .t | [perl_syntax](https://en.wikipedia.org/wiki/Perl) • [perldoc](http://perldoc.perl.org/)
|
.pl .pm .t | [perl_syntax](https://en.wikipedia.org/wiki/Perl) • [perldoc](http://perldoc.perl.org/)
|
||||||
.p6 .pm6 | [perl6_syntax](https://rakudo.org/)
|
.p6 .pm6 | [perl6_syntax](https://rakudo.org/)
|
||||||
.pod .pod6 | [perldoc](http://perldoc.perl.org/)
|
.pod .pod6 | [perldoc](http://perldoc.perl.org/)
|
||||||
.c .h | [c_syntax_gcc](https://gcc.gnu.org/) • [cppcheck](http://sourceforge.net/p/cppcheck/wiki/Home/)
|
.c .h | [c_syntax_gcc](https://gcc.gnu.org/) • [cppcheck](http://sourceforge.net/p/cppcheck/wiki/Home/)
|
||||||
.cc .cpp .hpp | [cpp_syntax_gcc](https://gcc.gnu.org/) • [cppcheck](http://sourceforge.net/p/cppcheck/wiki/Home/)
|
.cc .cpp .hpp | [cpp_syntax_gcc](https://gcc.gnu.org/) • [cppcheck](http://sourceforge.net/p/cppcheck/wiki/Home/)
|
||||||
.rb | [ruby_syntax](http://www.ruby-lang.org/)
|
.rb | [ruby_syntax](http://www.ruby-lang.org/) • [rubocop](https://rubocop.org/)
|
||||||
|
.rs | [rustfmt](https://github.com/rust-lang/rustfmt) • [clippy](https://github.com/rust-lang/rust-clippy)
|
||||||
.lua | [lua_syntax](http://www.lua.org) • [lua_check](https://github.com/mpeterv/luacheck)
|
.lua | [lua_syntax](http://www.lua.org) • [lua_check](https://github.com/mpeterv/luacheck)
|
||||||
.js | [js_syntax](http://nodejs.org/)
|
.js .ts | [js_syntax](http://nodejs.org/) • [typescript_check](https://www.typescriptlang.org/)
|
||||||
.php | [php8_syntax](https://en.wikipedia.org/wiki/PHP)
|
.php | [php8_syntax](https://en.wikipedia.org/wiki/PHP)
|
||||||
.go | [go_vet](https://github.com/golang/go) • [godoc](https://github.com/golang/go)
|
.go | [go_vet](https://github.com/golang/go) • [godoc](https://github.com/golang/go)
|
||||||
.bash .sh .dash .ksh | [shellcheck](https://www.shellcheck.net/)
|
.bash .sh .dash .ksh | [shellcheck](https://www.shellcheck.net/)
|
||||||
|
.wat | [wat_syntax_check](https://github.com/WebAssembly/wabt)
|
||||||
.wasm | [wasm_validate](https://github.com/WebAssembly/wabt) • [wasm_objdump](https://github.com/WebAssembly/wabt)
|
.wasm | [wasm_validate](https://github.com/WebAssembly/wabt) • [wasm_objdump](https://github.com/WebAssembly/wabt)
|
||||||
.pdf | [pdf2txt](https://github.com/pdfminer/pdfminer.six)
|
.pdf | [pdf2txt](https://github.com/pdfminer/pdfminer.six)
|
||||||
.html .htm | [html_syntax](https://www.html-tidy.org/) • [html2text](http://www.mbayer.de/html2text/) • [elinks](http://elinks.cz/)
|
.html .htm | [html_syntax](https://www.html-tidy.org/) • [html2text](http://www.mbayer.de/html2text/) • [elinks](http://elinks.cz/)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1 @@
|
||||||
|
__version__ = "v2025.07.11"
|
||||||
|
|
||||||
__version__ = "v2025.06.07"
|
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ KEYS_DOC = """Keys:
|
||||||
R - Refresh all reports of the current tool.
|
R - Refresh all reports of the current tool.
|
||||||
f - Resize the focused pane to the full screen. (toggle)
|
f - Resize the focused pane to the full screen. (toggle)
|
||||||
o - Open the current file with xdg-open.
|
o - Open the current file with xdg-open.
|
||||||
|
p - Patch the current file. (When viewing a patch from a tool)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -786,6 +787,15 @@ class Screen:
|
||||||
in_green(f" at line {line_num}…")])
|
in_green(f" at line {line_num}…")])
|
||||||
subprocess.Popen(f"{self.editor_command} +{line_num} {path}", shell=True,
|
subprocess.Popen(f"{self.editor_command} +{line_num} {path}", shell=True,
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
def patch_file(self):
|
||||||
|
result = self._summary.get_selection()
|
||||||
|
if hasattr(result.tool, "patch_command") and result.tool.patch_command is not None:
|
||||||
|
path = result.path
|
||||||
|
path_colored = lscolors.path_colored(path)
|
||||||
|
self._log.log_message([in_green("Patching file: "), path_colored])
|
||||||
|
subprocess.run(f"{result.tool.patch_command} {path} | patch -p0", shell=True,
|
||||||
|
capture_output=True)
|
||||||
|
subprocess.run(["touch", path])
|
||||||
|
|
||||||
def toggle_status_style(self):
|
def toggle_status_style(self):
|
||||||
self._summary.toggle_status_style(self._log)
|
self._summary.toggle_status_style(self._log)
|
||||||
|
|
@ -915,7 +925,7 @@ class Screen:
|
||||||
tools.STATUS_TO_TERMSTR[widget.status] + divider + "line " + str(y+1))
|
tools.STATUS_TO_TERMSTR[widget.status] + divider + "line " + str(y+1))
|
||||||
|
|
||||||
_STATUS_BAR = highlight_chars(" *help *quit *t*a*b:focus *turn *log *edit *next *sort"
|
_STATUS_BAR = highlight_chars(" *help *quit *t*a*b:focus *turn *log *edit *next *sort"
|
||||||
" *refresh *fullscreen *open", Log._GREEN_STYLE)
|
" *refresh *fullscreen *open *patch", Log._GREEN_STYLE)
|
||||||
|
|
||||||
@functools.cache
|
@functools.cache
|
||||||
def _get_partial_bar_chars(self, bar_transparency):
|
def _get_partial_bar_chars(self, bar_transparency):
|
||||||
|
|
@ -963,9 +973,9 @@ class Screen:
|
||||||
terminal.RIGHT: cursor_right, terminal.PAGE_DOWN: cursor_page_down,
|
terminal.RIGHT: cursor_right, terminal.PAGE_DOWN: cursor_page_down,
|
||||||
terminal.PAGE_UP: cursor_page_up, "s": toggle_order, terminal.HOME: cursor_home,
|
terminal.PAGE_UP: cursor_page_up, "s": toggle_order, terminal.HOME: cursor_home,
|
||||||
terminal.END: cursor_end, "n": move_to_next_issue, "N": move_to_next_issue_of_tool,
|
terminal.END: cursor_end, "n": move_to_next_issue, "N": move_to_next_issue_of_tool,
|
||||||
"e": edit_file, "q": quit_, terminal.ESC: quit_, terminal.CTRL_C: quit_,
|
"e": edit_file, "p": patch_file, "q": quit_, terminal.ESC: quit_,
|
||||||
"r": refresh, "R": refresh_tool, "\t": toggle_focus, "f": toggle_fullscreen,
|
terminal.CTRL_C: quit_, "r": refresh, "R": refresh_tool, "\t": toggle_focus,
|
||||||
"o": xdg_open}
|
"f": toggle_fullscreen, "o": xdg_open}
|
||||||
|
|
||||||
|
|
||||||
def setup_inotify(root_path, loop, on_filesystem_event, exclude_filter):
|
def setup_inotify(root_path, loop, on_filesystem_event, exclude_filter):
|
||||||
|
|
@ -1109,23 +1119,36 @@ def manage_cache(root_path):
|
||||||
gitignore_file.write("*")
|
gitignore_file.write("*")
|
||||||
|
|
||||||
|
|
||||||
|
@contextlib.contextmanager
|
||||||
|
def print_to_pager(pager_command=["less", "-RFEX"]):
|
||||||
|
try:
|
||||||
|
with subprocess.Popen(pager_command, stdin=subprocess.PIPE, text=True) as pager_process:
|
||||||
|
with contextlib.redirect_stdout(pager_process.stdin):
|
||||||
|
yield
|
||||||
|
except FileNotFoundError:
|
||||||
|
yield
|
||||||
|
|
||||||
|
|
||||||
def print_tool_info():
|
def print_tool_info():
|
||||||
extensions_for_tool = {}
|
extensions_for_tool = {}
|
||||||
for extensions, tools_ in tools.TOOLS_FOR_EXTENSIONS:
|
for extensions, tools_ in tools.TOOLS_FOR_EXTENSIONS:
|
||||||
for extension in extensions:
|
for extension in extensions:
|
||||||
for tool in tools_:
|
for tool in tools_:
|
||||||
extensions_for_tool.setdefault(tool, {extension}).add(extension)
|
extensions_for_tool.setdefault(tool, {extension}).add(extension)
|
||||||
for tool in sorted(tools.tools_all(), key=lambda t: t.__name__):
|
with print_to_pager():
|
||||||
print(termstr.TermStr(tool.__name__, is_bold=True) if tools.is_tool_available(tool)
|
for tool in sorted(tools.tools_all(), key=lambda t: t.__name__):
|
||||||
else termstr.TermStr(tool.__name__, fg_color=termstr.Color.red) + " (not available)")
|
print(termstr.TermStr(tool.__name__, is_bold=True) if tools.is_tool_available(tool)
|
||||||
if hasattr(tool, "command"):
|
else termstr.TermStr(tool.__name__, fg_color=termstr.Color.red) + " (not available)")
|
||||||
print(f"command: {tool.command} foo.{extensions[0]}")
|
extensions = list(extensions_for_tool.get(tool, {"*"}))
|
||||||
else:
|
if hasattr(tool, "command"):
|
||||||
print("function:", "eris.tools." + tool.__name__)
|
print(f"command: {tool.command} foo.{extensions[0]}")
|
||||||
print("url:", tool.url)
|
else:
|
||||||
extensions = list(extensions_for_tool.get(tool, {"*"}))
|
print("function:", "eris.tools." + tool.__name__)
|
||||||
print("extensions:", ", ".join(extensions))
|
if hasattr(tool, "patch_command") and tool.patch_command is not None:
|
||||||
print()
|
print(f"patch command: {tool.patch_command} foo.{extensions[0]}")
|
||||||
|
print("url:", tool.url)
|
||||||
|
print("extensions:", ", ".join(extensions))
|
||||||
|
print("")
|
||||||
|
|
||||||
|
|
||||||
def install_all_tools():
|
def install_all_tools():
|
||||||
|
|
@ -1134,8 +1157,7 @@ def install_all_tools():
|
||||||
install_command = ["apt", "-y", "install"] # debian / ubuntu
|
install_command = ["apt", "-y", "install"] # debian / ubuntu
|
||||||
if "ID=fedora\n" in os_release_lines:
|
if "ID=fedora\n" in os_release_lines:
|
||||||
tools_.remove("lua-check")
|
tools_.remove("lua-check")
|
||||||
renames = {"lua5.3": "lua", "python3-bandit": "bandit", "ruby3.1": "ruby",
|
renames = {"lua5.3": "lua", "python3-bandit": "bandit", "xz-utils": "xz"}
|
||||||
"xz-utils": "xz"}
|
|
||||||
tools_ = [renames.get(tool, tool) for tool in tools_]
|
tools_ = [renames.get(tool, tool) for tool in tools_]
|
||||||
install_command = ["dnf", "-y", "install"]
|
install_command = ["dnf", "-y", "install"]
|
||||||
elif "ID=arch\n" in os_release_lines:
|
elif "ID=arch\n" in os_release_lines:
|
||||||
|
|
@ -1143,8 +1165,8 @@ def install_all_tools():
|
||||||
tools_.remove("python3-pdfminer") # pdf2txt is not in arch
|
tools_.remove("python3-pdfminer") # pdf2txt is not in arch
|
||||||
tools_.remove("perl-doc") # perldoc is in perl but not in the path
|
tools_.remove("perl-doc") # perldoc is in perl but not in the path
|
||||||
tools_.remove("7zip")
|
tools_.remove("7zip")
|
||||||
renames = {"genisoimage": "cdrkit", "lua5.3": "lua", "ruby3.1": "ruby", "xz-utils": "xz",
|
renames = {"genisoimage": "cdrkit", "lua5.3": "lua", "xz-utils": "xz", "g++": "gcc",
|
||||||
"g++": "gcc", "golang-go": "go", "lua-check": "luacheck", "php-cli": "php",
|
"golang-go": "go", "lua-check": "luacheck", "php-cli": "php",
|
||||||
"pylint": "python-pylint", "python3-bandit": "bandit", "python3-mypy": "mypy"}
|
"pylint": "python-pylint", "python3-bandit": "bandit", "python3-mypy": "mypy"}
|
||||||
tools_ = [renames.get(tool, tool) for tool in tools_]
|
tools_ = [renames.get(tool, tool) for tool in tools_]
|
||||||
tools_ = ["python-" + tool[len("python3-"):] if tool.startswith("python3-") else tool
|
tools_ = ["python-" + tool[len("python3-"):] if tool.startswith("python3-") else tool
|
||||||
|
|
@ -1153,8 +1175,8 @@ def install_all_tools():
|
||||||
elif "ID=alpine\n" in os_release_lines:
|
elif "ID=alpine\n" in os_release_lines:
|
||||||
tools_.remove("python3-bandit")
|
tools_.remove("python3-bandit")
|
||||||
tools_.remove("wabt")
|
tools_.remove("wabt")
|
||||||
renames = {"genisoimage": "cdrkit", "lua5.3": "lua", "ruby3.1": "ruby", "xz-utils": "xz",
|
renames = {"genisoimage": "cdrkit", "lua5.3": "lua", "xz-utils": "xz", "g++": "gcc",
|
||||||
"g++": "gcc", "golang-go": "go", "lua-check": "luacheck", "php-cli": "php",
|
"golang-go": "go", "lua-check": "luacheck", "php-cli": "php",
|
||||||
"pylint": "py3-pylint", "tidy": "tidyhtml"}
|
"pylint": "py3-pylint", "tidy": "tidyhtml"}
|
||||||
tools_ = [renames.get(tool, tool) for tool in tools_]
|
tools_ = [renames.get(tool, tool) for tool in tools_]
|
||||||
tools_ = ["py3-" + tool[len("python3-"):] if tool.startswith("python3-") else tool
|
tools_ = ["py3-" + tool[len("python3-"):] if tool.startswith("python3-") else tool
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,7 @@ import tomllib
|
||||||
import eris
|
import eris
|
||||||
|
|
||||||
|
|
||||||
PYTHON_VERSION = "3.11"
|
PYTHON_EXECUTABLE = "/usr/bin/python3"
|
||||||
PYTHON_EXECUTABLE = "python" + PYTHON_VERSION
|
|
||||||
CACHE_PATH = ".eris"
|
CACHE_PATH = ".eris"
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -438,7 +437,7 @@ def git_log(path):
|
||||||
|
|
||||||
|
|
||||||
def make_tool_function(dependencies, command, url=None, error_status=None,
|
def make_tool_function(dependencies, command, url=None, error_status=None,
|
||||||
has_color=False, timeout=None):
|
has_color=False, timeout=None, patch_command=None):
|
||||||
if url is None:
|
if url is None:
|
||||||
url = dependencies[0]
|
url = dependencies[0]
|
||||||
command_parts = command.split()
|
command_parts = command.split()
|
||||||
|
|
@ -449,6 +448,7 @@ def make_tool_function(dependencies, command, url=None, error_status=None,
|
||||||
def func(path):
|
def func(path):
|
||||||
return _run_command(command_parts + [path], error_status, has_color, timeout)
|
return _run_command(command_parts + [path], error_status, has_color, timeout)
|
||||||
func.command = command
|
func.command = command
|
||||||
|
func.patch_command = patch_command
|
||||||
return func
|
return func
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -654,13 +654,16 @@ def splitext(path):
|
||||||
return root, ext
|
return root, ext
|
||||||
|
|
||||||
|
|
||||||
|
def python_has_module(python_path, module_name):
|
||||||
|
one_liner = ("import importlib, sys; "
|
||||||
|
f"sys.exit(importlib.util.find_spec('{module_name}') is not None)")
|
||||||
|
return bool(subprocess.call([python_path, "-c", one_liner]))
|
||||||
|
|
||||||
|
|
||||||
@functools.cache
|
@functools.cache
|
||||||
def is_tool_available(tool):
|
def is_tool_available(tool):
|
||||||
if (hasattr(tool, "command") and tool.command.startswith(f"{PYTHON_EXECUTABLE} -m ")):
|
if (hasattr(tool, "command") and tool.command.startswith(f"{PYTHON_EXECUTABLE} -m ")):
|
||||||
try:
|
return python_has_module(PYTHON_EXECUTABLE, tool.command.split()[2])
|
||||||
return importlib.util.find_spec(tool.command.split()[2]) is not None
|
|
||||||
except ModuleNotFoundError:
|
|
||||||
return False
|
|
||||||
try:
|
try:
|
||||||
return all(shutil.which(executable) for executable in tool.executables)
|
return all(shutil.which(executable) for executable in tool.executables)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,24 @@
|
||||||
|
|
||||||
|
# tools_for_extensions is a mapping that defines which tools are run on files of
|
||||||
|
# certain types. The tools are defined below.
|
||||||
tools_for_extensions = [
|
tools_for_extensions = [
|
||||||
[["py"], ["python_syntax", "python_unittests", "pytest", "pydoc", "mypy",
|
[["py"], ["python_syntax", "python_unittests", "pytest", "pydoc", "mypy",
|
||||||
"python_coverage", "pycodestyle", "pyflakes",
|
"python_coverage", "pycodestyle", "pyflakes",
|
||||||
"pylint", "python_gut", "python_mccabe", "bandit"]],
|
"pylint", "python_gut", "python_mccabe", "bandit", "black", "isort"]],
|
||||||
# [["pyc"], ["pydisasm"]],
|
# [["pyc"], ["pydisasm"]],
|
||||||
[["pl", "pm", "t"], ["perl_syntax", "perldoc"]],
|
[["pl", "pm", "t"], ["perl_syntax", "perldoc"]],
|
||||||
[["p6", "pm6"], ["perl6_syntax"]],
|
[["p6", "pm6"], ["perl6_syntax"]],
|
||||||
[["pod", "pod6"], ["perldoc"]],
|
[["pod", "pod6"], ["perldoc"]],
|
||||||
[["c", "h"], ["c_syntax_gcc", "cppcheck"]],
|
[["c", "h"], ["c_syntax_gcc", "cppcheck"]],
|
||||||
[["cc", "cpp", "hpp"], ["cpp_syntax_gcc", "cppcheck"]],
|
[["cc", "cpp", "hpp"], ["cpp_syntax_gcc", "cppcheck"]],
|
||||||
[["rb"], ["ruby_syntax"]],
|
[["rb"], ["ruby_syntax", "rubocop"]],
|
||||||
|
[["rs"], ["rustfmt", "clippy"]],
|
||||||
[["lua"], ["lua_syntax", "lua_check"]],
|
[["lua"], ["lua_syntax", "lua_check"]],
|
||||||
[["js"], ["js_syntax"]],
|
[["js", "ts"], ["js_syntax", "typescript_check"]],
|
||||||
[["php"], ["php8_syntax"]],
|
[["php"], ["php8_syntax"]],
|
||||||
[["go"], ["go_vet", "godoc"]],
|
[["go"], ["go_vet", "godoc"]],
|
||||||
[["bash", "sh", "dash", "ksh"], ["shellcheck"]],
|
[["bash", "sh", "dash", "ksh"], ["shellcheck"]],
|
||||||
|
[["wat"], ["wat_syntax_check"]],
|
||||||
[["wasm"], ["wasm_validate", "wasm_objdump"]],
|
[["wasm"], ["wasm_validate", "wasm_objdump"]],
|
||||||
[["pdf"], ["pdf2txt"]],
|
[["pdf"], ["pdf2txt"]],
|
||||||
[["html", "htm"], ["html_syntax", "html2text", "elinks"]],
|
[["html", "htm"], ["html_syntax", "html2text", "elinks"]],
|
||||||
|
|
@ -41,6 +44,17 @@ tools_for_extensions = [
|
||||||
[["iso"], ["isoinfo"]],
|
[["iso"], ["isoinfo"]],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Now define all the tools.
|
||||||
|
#
|
||||||
|
# Each section defines a tool by these attributes:
|
||||||
|
# dependencies: A list of debian packages that need to be installed for the tool to run.
|
||||||
|
# url: Where the tool is documented.
|
||||||
|
# command: The shell command to run the tool. All tools must produce a text report given a
|
||||||
|
# file in the codebase. The file's path is added to the end of the command.
|
||||||
|
# All reports are ideally in color. All tools should return an error code of 0 iff
|
||||||
|
# there are no issues with the file.
|
||||||
|
# has_color: Is true if the command's output is in color.
|
||||||
|
# timeout: Some commands have a timeout if they can't be trusted to finish in a reasonable time.
|
||||||
|
|
||||||
[python_syntax]
|
[python_syntax]
|
||||||
dependencies = []
|
dependencies = []
|
||||||
|
|
@ -78,6 +92,20 @@ tools_for_extensions = [
|
||||||
has_color = true
|
has_color = true
|
||||||
timeout = 60
|
timeout = 60
|
||||||
|
|
||||||
|
[black]
|
||||||
|
dependencies = ["black"]
|
||||||
|
url = "https://github.com/psf/black"
|
||||||
|
command = "black --check --diff --color"
|
||||||
|
patch_command = "black --diff"
|
||||||
|
has_color = true
|
||||||
|
|
||||||
|
[isort]
|
||||||
|
dependencies = ["python3-isort", "python3-colorama"]
|
||||||
|
url = "https://pycqa.github.io/isort/"
|
||||||
|
command = "/usr/bin/python3 -m isort --check-only --diff --color"
|
||||||
|
patch_command = "/usr/bin/python3 -m isort --overwrite-in-place"
|
||||||
|
has_color = true
|
||||||
|
|
||||||
[perl_syntax]
|
[perl_syntax]
|
||||||
dependencies = ["perl"]
|
dependencies = ["perl"]
|
||||||
url = "https://en.wikipedia.org/wiki/Perl"
|
url = "https://en.wikipedia.org/wiki/Perl"
|
||||||
|
|
@ -100,6 +128,7 @@ tools_for_extensions = [
|
||||||
dependencies = ["git"]
|
dependencies = ["git"]
|
||||||
url = "https://git-scm.com/docs/git-diff"
|
url = "https://git-scm.com/docs/git-diff"
|
||||||
command = "git diff --exit-code"
|
command = "git diff --exit-code"
|
||||||
|
patch_command = "git checkout"
|
||||||
has_color = true
|
has_color = true
|
||||||
|
|
||||||
[git_blame]
|
[git_blame]
|
||||||
|
|
@ -142,7 +171,7 @@ tools_for_extensions = [
|
||||||
[7z]
|
[7z]
|
||||||
dependencies = ["7zip"]
|
dependencies = ["7zip"]
|
||||||
url = "http://p7zip.sourceforge.net/"
|
url = "http://p7zip.sourceforge.net/"
|
||||||
command = "7zz l"
|
command = "7z l"
|
||||||
|
|
||||||
[unxz]
|
[unxz]
|
||||||
dependencies = ["xz-utils"]
|
dependencies = ["xz-utils"]
|
||||||
|
|
@ -219,10 +248,29 @@ tools_for_extensions = [
|
||||||
command = "cppcheck --error-exitcode=1"
|
command = "cppcheck --error-exitcode=1"
|
||||||
|
|
||||||
[ruby_syntax]
|
[ruby_syntax]
|
||||||
dependencies = ["ruby3.1"]
|
dependencies = ["ruby"]
|
||||||
url = "http://www.ruby-lang.org/"
|
url = "http://www.ruby-lang.org/"
|
||||||
command = "ruby -c"
|
command = "ruby -c"
|
||||||
|
|
||||||
|
[rubocop]
|
||||||
|
dependencies = ["rubocop"]
|
||||||
|
url = "https://rubocop.org/"
|
||||||
|
command = "rubocop --color --fail-level autocorrect --display-style-guide"
|
||||||
|
patch_command = "rubocop --autocorrect"
|
||||||
|
has_color = true
|
||||||
|
|
||||||
|
[rustfmt]
|
||||||
|
dependencies = ["rustfmt"]
|
||||||
|
url = "https://github.com/rust-lang/rustfmt"
|
||||||
|
command = "cargo fmt --check -- --color always"
|
||||||
|
has_color = true
|
||||||
|
|
||||||
|
[clippy]
|
||||||
|
dependencies = ["rust-clippy"]
|
||||||
|
url = "https://github.com/rust-lang/rust-clippy"
|
||||||
|
command = "rustc -Awarnings -Dclippy::all"
|
||||||
|
has_color = true
|
||||||
|
|
||||||
[lua_syntax]
|
[lua_syntax]
|
||||||
dependencies = ["lua5.3"]
|
dependencies = ["lua5.3"]
|
||||||
url = "http://www.lua.org"
|
url = "http://www.lua.org"
|
||||||
|
|
@ -233,6 +281,12 @@ tools_for_extensions = [
|
||||||
url = "http://nodejs.org/"
|
url = "http://nodejs.org/"
|
||||||
command = "node --check"
|
command = "node --check"
|
||||||
|
|
||||||
|
[typescript_check]
|
||||||
|
dependencies = ["node-typescript"]
|
||||||
|
url = "https://www.typescriptlang.org/"
|
||||||
|
command = "tsc --pretty --noEmit"
|
||||||
|
has_color = true
|
||||||
|
|
||||||
[lua_check]
|
[lua_check]
|
||||||
dependencies = ["lua-check"]
|
dependencies = ["lua-check"]
|
||||||
url = "https://github.com/mpeterv/luacheck"
|
url = "https://github.com/mpeterv/luacheck"
|
||||||
|
|
@ -244,6 +298,11 @@ tools_for_extensions = [
|
||||||
url = "https://github.com/golang/go"
|
url = "https://github.com/golang/go"
|
||||||
command = "go vet"
|
command = "go vet"
|
||||||
|
|
||||||
|
[wat_syntax_check]
|
||||||
|
dependencies = ["wabt"]
|
||||||
|
url = "https://github.com/WebAssembly/wabt"
|
||||||
|
command = "wat2wasm --check-only"
|
||||||
|
|
||||||
[wasm_validate]
|
[wasm_validate]
|
||||||
dependencies = ["wabt"]
|
dependencies = ["wabt"]
|
||||||
url = "https://github.com/WebAssembly/wabt"
|
url = "https://github.com/WebAssembly/wabt"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import fill3.terminal as terminal
|
||||||
import termstr
|
import termstr
|
||||||
|
|
||||||
|
|
||||||
__version__ = "v2025.06.07"
|
__version__ = "v2025.07.11"
|
||||||
|
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ tool.uv.package = true
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "fill3"
|
name = "fill3"
|
||||||
version = "v2025.06.07"
|
version = "v2025.07.11"
|
||||||
description = "Fill3 provides basic widgets for a tui."
|
description = "Fill3 provides basic widgets for a tui."
|
||||||
authors = [
|
authors = [
|
||||||
{ name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" },
|
{ name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" },
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import lscolors
|
||||||
import termstr
|
import termstr
|
||||||
|
|
||||||
|
|
||||||
__version__ = "v2025.06.07"
|
__version__ = "v2025.07.11"
|
||||||
|
|
||||||
|
|
||||||
FILE_KEY = "fi"
|
FILE_KEY = "fi"
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ allow-direct-references = true
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "lscolors"
|
name = "lscolors"
|
||||||
version = "v2025.06.07"
|
version = "v2025.07.11"
|
||||||
description = "Give coloring for file types as in the ls command."
|
description = "Give coloring for file types as in the ls command."
|
||||||
authors = [
|
authors = [
|
||||||
{ name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" },
|
{ name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" },
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,11 @@ Eris can be installed by pipx or [uv](https://docs.astral.sh/uv/getting-started/
|
||||||
|
|
||||||
To install with pipx:
|
To install with pipx:
|
||||||
|
|
||||||
pipx install git+https://gitlab.com/ahamilton/eris@v2025.06.07
|
pipx install git+https://forgejo.tail556789.ts.net/ahamilton/eris@v2025.07.11
|
||||||
|
|
||||||
or to install with uv:
|
or to install with uv:
|
||||||
|
|
||||||
uv tool install git+https://gitlab.com/ahamilton/eris@v2025.06.07
|
uv tool install git+https://forgejo.tail556789.ts.net/ahamilton/eris@v2025.07.11
|
||||||
|
|
||||||
Then use eris to install all the tools it uses:
|
Then use eris to install all the tools it uses:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ tool.uv.package = true
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "eris"
|
name = "eris"
|
||||||
version = "v2025.06.07"
|
version = "v2025.07.11"
|
||||||
description = "Eris maintains an up-to-date set of reports for every file in a codebase."
|
description = "Eris maintains an up-to-date set of reports for every file in a codebase."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [
|
authors = [
|
||||||
|
|
@ -11,13 +11,13 @@ authors = [
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.11"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"docopt-ng==0.9.0",
|
"docopt-ng==0.9.0",
|
||||||
"fill3 @ git+https://gitlab.com/ahamilton/eris@v2025.06.07#subdirectory=fill3",
|
"fill3 @ git+https://forgejo.tail556789.ts.net/ahamilton/eris@v2025.07.11#subdirectory=fill3",
|
||||||
"lscolors @ git+https://gitlab.com/ahamilton/eris@v2025.06.07#subdirectory=lscolors",
|
"lscolors @ git+https://forgejo.tail556789.ts.net/ahamilton/eris@v2025.07.11#subdirectory=lscolors",
|
||||||
"pexpect==4.9.0",
|
"pexpect==4.9.0",
|
||||||
"pillow==11.2.1",
|
"pillow==11.2.1",
|
||||||
"pygments==2.19.1",
|
"pygments==2.19.1",
|
||||||
"pyinotify-elephant-fork==0.0.1",
|
"pyinotify-elephant-fork==0.0.1",
|
||||||
"termstr @ git+https://gitlab.com/ahamilton/eris@v2025.06.07#subdirectory=termstr",
|
"termstr @ git+https://forgejo.tail556789.ts.net/ahamilton/eris@v2025.07.11#subdirectory=termstr",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.uv.sources]
|
[tool.uv.sources]
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ tool.uv.package = true
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "termstr"
|
name = "termstr"
|
||||||
version = "v2025.06.07"
|
version = "v2025.07.11"
|
||||||
description = "Termstr provides strings with extra terminal styling."
|
description = "Termstr provides strings with extra terminal styling."
|
||||||
authors = [
|
authors = [
|
||||||
{ name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" },
|
{ name = "Andrew Hamilton", email = "and_hamilton@yahoo.com" },
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import weakref
|
||||||
import cwcwidth
|
import cwcwidth
|
||||||
|
|
||||||
|
|
||||||
__version__ = "v2025.06.07"
|
__version__ = "v2025.07.11"
|
||||||
|
|
||||||
|
|
||||||
ESC = "\x1b"
|
ESC = "\x1b"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[m[38;2;255;255;255m[48;2;32;32;32m [m[38;2;255;255;255m[48;2;0;0;0m
|
[m[38;2;255;255;255m[48;2;32;32;32m [m[38;2;255;255;255m[48;2;0;0;0m
|
||||||
[m[38;2;255;255;255m[48;2;32;32;32m [m[38;2;255;255;255m[48;2;0;0;0m
|
[m[38;2;255;255;255m[48;2;32;32;32m [m[38;2;255;255;255m[48;2;0;0;0m
|
||||||
[m[38;2;110;191;38m[48;2;32;32;32m[1mdef[m[38;2;208;208;208m[48;2;32;32;32m [m[38;2;113;173;255m[48;2;32;32;32mhi[m[38;2;208;208;208m[48;2;32;32;32m():[m[38;2;255;255;255m[48;2;32;32;32m [m[38;2;255;255;255m[48;2;0;0;0m
|
[m[38;2;110;191;38m[48;2;32;32;32m[1mdef[m[38;2;102;102;102m[48;2;32;32;32m [m[38;2;113;173;255m[48;2;32;32;32mhi[m[38;2;208;208;208m[48;2;32;32;32m():[m[38;2;255;255;255m[48;2;32;32;32m [m[38;2;255;255;255m[48;2;0;0;0m
|
||||||
[m[38;2;208;208;208m[48;2;32;32;32m [m[38;2;47;188;205m[48;2;32;32;32mprint[m[38;2;208;208;208m[48;2;32;32;32m([m[38;2;237;157;19m[48;2;32;32;32m"hi"[m[38;2;208;208;208m[48;2;32;32;32m)[m
|
[m[38;2;208;208;208m[48;2;32;32;32m [m[38;2;47;188;205m[48;2;32;32;32mprint[m[38;2;208;208;208m[48;2;32;32;32m([m[38;2;237;157;19m[48;2;32;32;32m"hi"[m[38;2;208;208;208m[48;2;32;32;32m)[m
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
[m[38;2;255;255;255m[48;2;32;32;32m [m[38;2;255;255;255m[48;2;0;0;0m
|
[m[38;2;255;255;255m[48;2;32;32;32m [m[38;2;255;255;255m[48;2;0;0;0m
|
||||||
[m[38;2;255;255;255m[48;2;32;32;32m [m[38;2;255;255;255m[48;2;0;0;0m
|
[m[38;2;255;255;255m[48;2;32;32;32m [m[38;2;255;255;255m[48;2;0;0;0m
|
||||||
[m[38;2;110;191;38m[48;2;32;32;32m[1mdef[m[38;2;208;208;208m[48;2;32;32;32m [m[38;2;113;173;255m[48;2;32;32;32mhi[m[38;2;208;208;208m[48;2;32;32;32m():[m
|
[m[38;2;110;191;38m[48;2;32;32;32m[1mdef[m[38;2;102;102;102m[48;2;32;32;32m [m[38;2;113;173;255m[48;2;32;32;32mhi[m[38;2;208;208;208m[48;2;32;32;32m():[m
|
||||||
|
|
@ -107,12 +107,6 @@ class ToolsTestCase(unittest.TestCase):
|
||||||
def test_c_syntax_gcc(self):
|
def test_c_syntax_gcc(self):
|
||||||
self._test_tool(tools.c_syntax_gcc, [("hello.c", tools.Status.ok)])
|
self._test_tool(tools.c_syntax_gcc, [("hello.c", tools.Status.ok)])
|
||||||
|
|
||||||
def test_objdump_headers(self):
|
|
||||||
self._test_tool(tools.objdump_headers, [("rotatingtree.o", tools.Status.ok)])
|
|
||||||
|
|
||||||
def test_objdump_disassemble(self):
|
|
||||||
self._test_tool(tools.objdump_disassemble, [("rotatingtree.o", tools.Status.problem)])
|
|
||||||
|
|
||||||
def test_readelf(self):
|
def test_readelf(self):
|
||||||
self._test_tool(tools.readelf, [("rotatingtree.o", tools.Status.ok)])
|
self._test_tool(tools.readelf, [("rotatingtree.o", tools.Status.ok)])
|
||||||
|
|
||||||
|
|
|
||||||
8
uv.lock
generated
8
uv.lock
generated
|
|
@ -27,7 +27,7 @@ wheels = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "eris"
|
name = "eris"
|
||||||
version = "2025.6.7"
|
version = "2025.7.11"
|
||||||
source = { editable = "." }
|
source = { editable = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "docopt-ng" },
|
{ name = "docopt-ng" },
|
||||||
|
|
@ -54,7 +54,7 @@ requires-dist = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fill3"
|
name = "fill3"
|
||||||
version = "2025.6.7"
|
version = "2025.7.11"
|
||||||
source = { editable = "fill3" }
|
source = { editable = "fill3" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "termstr" },
|
{ name = "termstr" },
|
||||||
|
|
@ -65,7 +65,7 @@ requires-dist = [{ name = "termstr", editable = "termstr" }]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lscolors"
|
name = "lscolors"
|
||||||
version = "2025.6.7"
|
version = "2025.7.11"
|
||||||
source = { editable = "lscolors" }
|
source = { editable = "lscolors" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "termstr" },
|
{ name = "termstr" },
|
||||||
|
|
@ -171,7 +171,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/d6/b4/b44fccc7040b01449
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "termstr"
|
name = "termstr"
|
||||||
version = "2025.6.7"
|
version = "2025.7.11"
|
||||||
source = { editable = "termstr" }
|
source = { editable = "termstr" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "cwcwidth" },
|
{ name = "cwcwidth" },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue