2019-11-06 14:07:33 +10:00
|
|
|
#!/usr/bin/env python3.8
|
2016-11-19 16:26:23 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2019-02-04 11:48:47 +10:00
|
|
|
# Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved.
|
2016-11-19 15:52:48 +01:00
|
|
|
# Licensed under the Artistic License 2.0.
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2016-11-19 16:47:05 +01:00
|
|
|
def tool_markup(tool):
|
2016-11-19 17:24:01 +01:00
|
|
|
url = tools.url_of_tool(tool)
|
2018-05-15 16:34:52 +10:00
|
|
|
return (tool.__name__ if url is None else f"[{tool.__name__}]({url})")
|
2016-11-19 16:47:05 +01:00
|
|
|
|
|
|
|
|
|
2019-07-22 10:49:40 +10:00
|
|
|
def main():
|
|
|
|
|
all_tools = ([(["*"], tools.generic_tools() +
|
|
|
|
|
[tools.git_blame, tools.git_log])] +
|
|
|
|
|
tools.TOOLS_FOR_EXTENSIONS)
|
|
|
|
|
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
|
|
|
|
|
|
|
|
### Summary
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
### Installation
|
|
|
|
|
|
2019-11-06 13:03:00 +10:00
|
|
|
(Tested in Ubuntu 19.10)
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2018-09-17 23:59:38 +10:00
|
|
|
# git clone https://github.com/ahamilton/eris
|
|
|
|
|
# cd eris
|
2016-11-19 13:50:07 +01:00
|
|
|
# ./install-dependencies
|
2019-11-06 14:07:33 +10:00
|
|
|
# python3.8 -m pip install .
|
2017-07-10 18:38:18 +01:00
|
|
|
|
|
|
|
|
To test its working properly:
|
|
|
|
|
|
|
|
|
|
# ./test-all
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2017-06-27 14:20:30 +01:00
|
|
|
then to run:
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2018-09-17 23:59:38 +10:00
|
|
|
# eris <directory_path>
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2018-06-01 09:48:42 +10:00
|
|
|
### Tools
|
2016-11-19 15:58:21 +01:00
|
|
|
|
2018-06-01 10:38:37 +10:00
|
|
|
Extensions({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:
|
|
|
|
|
print("%s | %s" % (" ".join("." + extension for extension in extensions),
|
|
|
|
|
" • ".join(tool_markup(tool) for tool in tools_)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
main()
|