2021-05-18 20:39:25 +10:00
|
|
|
#!/usr/bin/env python3.9
|
2016-11-19 16:26:23 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
2016-11-19 13:50:07 +01:00
|
|
|
|
|
|
|
|
|
2018-09-17 23:59:38 +10:00
|
|
|
import eris.tools as tools
|
2016-11-19 13:50:07 +01:00
|
|
|
|
|
|
|
|
|
2019-07-22 10:49:40 +10:00
|
|
|
def main():
|
2021-11-29 12:51:34 +10:00
|
|
|
git_tools = [tools.git_diff, tools.git_blame, tools.git_log]
|
|
|
|
|
all_tools = [(["*"], tools.generic_tools() + git_tools)] + tools.TOOLS_FOR_EXTENSIONS
|
2019-07-22 10:49:40 +10:00
|
|
|
tool_set = set()
|
|
|
|
|
extension_set = set()
|
|
|
|
|
for extensions, tools_ in all_tools:
|
|
|
|
|
tool_set.update(tools_)
|
|
|
|
|
extension_set.update(extensions)
|
|
|
|
|
print(f"""\
|
2018-09-25 10:41:55 +10:00
|
|
|
# Eris Codebase Monitor
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2020-01-10 14:04:57 +10:00
|
|
|
## Summary
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2018-09-17 23:59:38 +10:00
|
|
|
Eris maintains an up-to-date set of reports for every file in a codebase.
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2020-01-10 14:04:57 +10:00
|
|
|
## Installation
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2021-12-21 17:09:51 +10:00
|
|
|
#### Ubuntu (21.10)
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2021-12-21 13:09:51 +10:00
|
|
|
Install eris directly using pip, and apt install the tools eris relies on:
|
2021-12-21 13:11:59 +10:00
|
|
|
|
2021-12-29 22:52:52 +10:00
|
|
|
pip install --upgrade pip # A recent version of pip is needed.
|
2022-04-18 00:26:49 +10:00
|
|
|
pip install git+https://github.com/ahamilton/eris@v2022.04.18#subdirectory=eris
|
2021-12-21 19:01:32 +10:00
|
|
|
eris --apt-install-tools
|
2021-12-21 12:54:17 +10:00
|
|
|
|
2021-12-21 13:09:51 +10:00
|
|
|
Or install from source: (including tools)
|
2021-12-21 13:11:59 +10:00
|
|
|
|
2021-12-21 19:01:32 +10:00
|
|
|
git clone https://github.com/ahamilton/eris
|
|
|
|
|
cd eris
|
|
|
|
|
./install
|
2021-12-21 13:00:31 +10:00
|
|
|
|
2021-12-21 13:09:51 +10:00
|
|
|
Then to run:
|
2021-12-21 13:11:59 +10:00
|
|
|
|
2021-12-21 19:01:32 +10:00
|
|
|
eris -h
|
|
|
|
|
eris-webserver <project> # Or a simple web interface.
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2021-12-21 17:09:51 +10:00
|
|
|
#### Docker
|
2020-01-10 14:04:57 +10:00
|
|
|
|
2021-12-21 19:01:32 +10:00
|
|
|
git clone https://github.com/ahamilton/eris
|
|
|
|
|
cd eris
|
|
|
|
|
sudo docker build -t eris -f packaging/Dockerfile .
|
|
|
|
|
cp packaging/eris-docker ~/bin/eris # e.g. Put wrapper script in your PATH
|
2020-01-10 14:13:30 +10:00
|
|
|
|
2021-12-21 17:09:51 +10:00
|
|
|
#### Snap
|
2021-12-06 15:47:07 +10:00
|
|
|
|
2021-12-21 19:01:32 +10:00
|
|
|
# Download snap file from github releases page:
|
|
|
|
|
wget "https://github.com/ahamilton/eris/releases/download/v2021-12-06/eris_2021.12.06_amd64.snap"
|
|
|
|
|
snap install --dangerous eris_2021.12.06_amd64.snap
|
|
|
|
|
rm eris_2021.12.06_amd64.snap # The snap file is no longer needed.
|
2021-12-06 15:47:07 +10:00
|
|
|
|
2021-12-21 17:09:51 +10:00
|
|
|
#### AppImage
|
2020-01-10 14:13:30 +10:00
|
|
|
|
2021-12-21 19:01:32 +10:00
|
|
|
# Download AppImage file from github releases page:
|
|
|
|
|
wget "https://github.com/ahamilton/eris/releases/download/v2021-12-06/eris_2021.12.06.AppImage"
|
|
|
|
|
chmod +x eris_2021.12.06.AppImage
|
|
|
|
|
mv eris_2021.12.06.AppImage ~/bin/eris # e.g. Put appimage in your PATH
|
2020-01-10 14:04:57 +10:00
|
|
|
|
|
|
|
|
## Tools
|
2016-11-19 15:58:21 +01:00
|
|
|
|
2020-10-17 12:14:16 +10:00
|
|
|
File types({len(extension_set)-1}) | Tools({len(tool_set)})
|
2018-06-05 08:16:49 +10:00
|
|
|
----------:| -----""")
|
2019-07-22 10:49:40 +10:00
|
|
|
for extensions, tools_ in all_tools:
|
2021-11-29 12:51:34 +10:00
|
|
|
print("%s | %s" % (" ".join("." + extension for extension in extensions),
|
|
|
|
|
" • ".join(f"[{tool.__name__}]({tool.url})" for tool in tools_)))
|
2019-07-22 10:49:40 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
main()
|