2017-05-17 16:46:54 +01:00
|
|
|
#!/usr/bin/env python3
|
2016-11-19 16:26:23 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2017-02-05 18:29:09 +01:00
|
|
|
# Copyright (C) 2017 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
|
|
|
|
2017-06-27 14:03:32 +01:00
|
|
|
import vigil.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)
|
|
|
|
|
return (tool.__name__ if url is None else
|
|
|
|
|
"[%s](%s)" % (tool.__name__, url))
|
2016-11-19 16:47:05 +01:00
|
|
|
|
|
|
|
|
|
2016-11-19 15:52:48 +01:00
|
|
|
print("""\
|
2016-11-19 13:50:07 +01:00
|
|
|
# Vigil Code Monitor
|
|
|
|
|
|
|
|
|
|
### Summary
|
|
|
|
|
|
2017-04-12 10:14:36 +02:00
|
|
|
Vigil maintains an up-to-date set of reports for every file in a codebase.
|
2016-11-19 13:50:07 +01:00
|
|
|
|
|
|
|
|
### Installation
|
|
|
|
|
|
2017-06-27 14:20:30 +01:00
|
|
|
(Tested in Ubuntu 17.04)
|
2016-11-19 13:50:07 +01:00
|
|
|
|
|
|
|
|
# git clone https://github.com/ahamilton/vigil
|
|
|
|
|
# cd vigil
|
|
|
|
|
# ./install-dependencies
|
2017-06-28 09:07:40 +01:00
|
|
|
# sudo python3 setup.py install (pip3 can be used here)
|
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
|
|
|
|
2017-06-27 14:20:30 +01:00
|
|
|
# vigil <directory_path>
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2016-11-19 15:58:21 +01:00
|
|
|
### Tools
|
|
|
|
|
|
|
|
|
|
Extensions | Tools
|
|
|
|
|
---------- | -----""")
|
2016-11-19 13:50:07 +01:00
|
|
|
for extensions, tools_ in tools.TOOLS_FOR_EXTENSIONS:
|
2016-11-19 15:58:21 +01:00
|
|
|
print("%s | %s" % (" ".join("." + extension for extension in extensions),
|
2016-11-19 16:47:05 +01:00
|
|
|
" • ".join(tool_markup(tool) for tool in tools_)))
|