summaryrefslogtreecommitdiff
path: root/src/hydrilla/server/serve.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/server/serve.py')
-rw-r--r--src/hydrilla/server/serve.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/hydrilla/server/serve.py b/src/hydrilla/server/serve.py
index 6cb98c2..9e51324 100644
--- a/src/hydrilla/server/serve.py
+++ b/src/hydrilla/server/serve.py
@@ -556,6 +556,15 @@ def query():
return Response(json.dumps(result), mimetype='application/json')
+@bp.route('/--help')
+def mm_help():
+ return start.get_help(click.Context(start)) + '\n'
+
+@bp.route('/--version')
+def mm_version():
+ prog_info = {'prog': 'Hydrilla', 'version': _version.version}
+ return _('%(prog)s_%(version)s_license') % prog_info + '\n'
+
default_config_path = Path('/etc/hydrilla/config.json')
default_malcontent_dir = '/var/lib/hydrilla/malcontent'
default_project_url = 'https://hydrillabugs.koszko.org/projects/hydrilla/wiki'
@@ -575,6 +584,9 @@ _ = console_gettext
help=_('path_to_config_file_explain_default'))
@click.option('-l', '--language', type=click.STRING,
help=_('language_to_use_overrides_config'))
+@click.version_option(version=_version.version, prog_name='Hydrilla',
+ message=_('%(prog)s_%(version)s_license'),
+ help=_('version_printing'))
def start(malcontent_dir: Optional[str], hydrilla_project_url: Optional[str],
port: Optional[int], config_path: Optional[str],
language: Optional[str]) -> None: