Add a command-line option providing information about tools.
- All tools have a url. - Not deriving the url from the package database.
This commit is contained in:
parent
332666ec43
commit
e60bde2a84
5 changed files with 58 additions and 29 deletions
|
|
@ -9,8 +9,7 @@ import eris.tools as tools
|
|||
|
||||
|
||||
def tool_markup(tool):
|
||||
url = tools.url_of_tool(tool)
|
||||
return (tool.__name__ if url is None else f"[{tool.__name__}]({url})")
|
||||
return f"[{tool.__name__}]({tool.url})"
|
||||
|
||||
|
||||
def main():
|
||||
|
|
@ -76,7 +75,7 @@ Extensions({len(extension_set)-1}) | Tools({len(tool_set)})
|
|||
for extensions, tools_ in all_tools:
|
||||
print("%s | %s" % (
|
||||
" ".join("." + extension for extension in extensions),
|
||||
" • ".join(tool_markup(tool) for tool in tools_)))
|
||||
" • ".join(f"[{tool.__name__}]({tool.url})" for tool in tools_)))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue