summaryrefslogtreecommitdiff
path: root/src/hydrilla/server
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-04-27 12:05:15 +0200
committerWojtek Kosior <koszko@koszko.org>2022-04-27 12:05:15 +0200
commit17be770f9d55a9005b546e0f969af078fb359390 (patch)
treeaa8b56d4482da99382b0314ad4056b816bbd01e8 /src/hydrilla/server
parentcb8ce3160afd963cec6186e535232275d9930b3c (diff)
downloadhaketilo-hydrilla-1.0.tar.gz
haketilo-hydrilla-1.0.zip
make use of the 'help' parameter of click.command() decorator for localized help messagesv1.0
Diffstat (limited to 'src/hydrilla/server')
-rw-r--r--src/hydrilla/server/serve.py31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/hydrilla/server/serve.py b/src/hydrilla/server/serve.py
index d07d44f..a6a1204 100644
--- a/src/hydrilla/server/serve.py
+++ b/src/hydrilla/server/serve.py
@@ -572,6 +572,7 @@ default_project_url = 'https://hydrillabugs.koszko.org/projects/hydrilla/wiki'
console_gettext = util.translation(here / 'locales').gettext
_ = console_gettext
+@click.command(help=_('serve_hydrilla_packages_explain_wsgi_considerations'))
@click.option('-m', '--malcontent-dir',
type=click.Path(exists=True, file_okay=False),
help=_('directory_to_serve_from_overrides_config'))
@@ -590,7 +591,12 @@ _ = console_gettext
def start(malcontent_dir: Optional[str], hydrilla_project_url: Optional[str],
port: Optional[int], config_path: Optional[str],
language: Optional[str]) -> None:
- """<this will be replaced by a localized docstring for Click to pick up>"""
+ """
+ Run a development Hydrilla server.
+
+ This command is meant to be the entry point of hydrilla command exported by
+ this package.
+ """
config_load_opts = {} if config_path is None \
else {'config_path': [Path(config_path)]}
@@ -618,20 +624,19 @@ def start(malcontent_dir: Optional[str], hydrilla_project_url: Optional[str],
HydrillaApp(hydrilla_config).run()
-start.__doc__ = _('serve_hydrilla_packages_explain_wsgi_considerations')
-
-start = click.command()(start)
-
+@click.command(help=_('serve_hydrilla_packages_wsgi_help'),
+ context_settings={
+ 'ignore_unknown_options': True,
+ 'allow_extra_args': True
+ })
@click.version_option(version=_version.version, prog_name='Hydrilla',
message=_('%(prog)s_%(version)s_license'),
help=_('version_printing'))
def start_wsgi() -> None:
- """<this will be replaced by a localized docstring for Click to pick up>"""
- return HydrillaApp(click.get_current_context().obj or config.load())
-
-start_wsgi.__doc__ = _('serve_hydrilla_packages_wsgi_help')
+ """
+ Create application object for use in WSGI deployment.
-start_wsgi = click.command(context_settings={
- 'ignore_unknown_options': True,
- 'allow_extra_args': True
-})(start_wsgi)
+ This command Also handles --help and --version options in case it gets
+ called outside WSGI environment.
+ """
+ return HydrillaApp(click.get_current_context().obj or config.load())
116ea4267d88a294dd05f8dbbb8ce7bcc0'>gnu: vim: Update to 8.2.1805....* gnu/packages/vim.scm (vim): Update to 8.2.1805. Tobias Geerinckx-Rice 2020-10-06gnu: vim: Update to 8.2.1801....* gnu/packages/vim.scm (vim): Update to 8.2.1801. Tobias Geerinckx-Rice 2020-09-29gnu: vim: Update to 8.2.1770....* gnu/packages/vim.scm (vim): Update to 8.2.1770. Efraim Flashner 2020-09-25gnu: vim: Update to 8.2.1738....* gnu/packages/vim.scm (vim): Update to 8.2.1738. Efraim Flashner 2020-09-24gnu: vifm: Update to 0.11....* gnu/packages/vim.scm (vifm): Update to 0.11. Efraim Flashner 2020-09-23gnu: python-pynvim: Update to 0.4.2....* gnu/packages/vim.scm (python-pynvim): Update to 0.4.2. Tobias Geerinckx-Rice 2020-09-18gnu: xxd: Use cc-for-target....* gnu/packages/vim.scm (xxd)[arguments]: Replace hard-coded gcc with cc-for-target in make-flags. Efraim Flashner 2020-09-17gnu: vim-airline: Don't install tests....* gnu/packages/vim.scm (vim-airline)[arguments]: Adjust install-plan to not install tests. Efraim Flashner 2020-09-12gnu: editorconfig-vim: Update to 1.1.1....* gnu/packages/vim.scm (editorconfig-vim): Update to 1.1.1. [source]: Remove snippet. [arguments]: Remove custom 'patch-editorconfig-path phase. [inputs]: Remove editorconfig-core-c. Efraim Flashner 2020-08-21gnu: vim: Update to 8.2.1500....* gnu/packages/vim.scm (vim): Update to 8.2.1500. Jakub Kądziołka 2020-08-21gnu: vim: Install man pages.Jakub Kądziołka 2020-08-17gnu: vim: Update to 8.2.1471....* gnu/packages/vim.scm (vim): Update to 8.2.1471. [arguments]: Adjust custom 'patch-absolute-paths, 'skip-failing-tests phases for changes in the sources. Efraim Flashner 2020-08-06gnu: neovim: Update to 0.4.4....* gnu/package/vim.scm (neovim): Update to 0.4.4. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> HiPhish 2020-07-12gnu: Remove ".git" from "https://github/…/….git"....Until now, 'lookup-origin' and thus 'lookup-origin-revision' in (guix swh) would sometimes return #f for these because the ".git" URLs are redirects to the non-".git" URLs. Consequently, 'guix lint -c archival' would keep saying "scheduled Software Heritage archival"; likewise, the fallback download code would fail. * gnu/packages/ada.scm, gnu/packages/admin.scm, gnu/packages/aidc.scm, gnu/packages/algebra.scm, gnu/packages/android.scm, gnu/packages/animation.scm, gnu/packages/arcan.scm, gnu/packages/assembly.scm, gnu/packages/audio.scm, gnu/packages/authentication.scm, gnu/packages/avr.scm, gnu/packages/axoloti.scm, gnu/packages/backup.scm, gnu/packages/bash.scm, gnu/packages/benchmark.scm, gnu/packages/bioconductor.scm, gnu/packages/bioinformatics.scm, gnu/packages/bittorrent.scm, gnu/packages/boost.scm, gnu/packages/build-tools.scm, gnu/packages/c.scm, gnu/packages/calendar.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/chemistry.scm, gnu/packages/chez.scm, gnu/packages/clojure.scm, gnu/packages/code.scm, gnu/packages/compression.scm, gnu/packages/compton.scm, gnu/packages/coq.scm, gnu/packages/cpp.scm, gnu/packages/cran.scm, gnu/packages/crypto.scm, gnu/packages/curl.scm, gnu/packages/databases.scm, gnu/packages/datastructures.scm, gnu/packages/debug.scm, gnu/packages/disk.scm, gnu/packages/distributed.scm, gnu/packages/django.scm, gnu/packages/dlang.scm, gnu/packages/dns.scm, gnu/packages/docker.scm, gnu/packages/education.scm, gnu/packages/efi.scm, gnu/packages/elixir.scm, gnu/packages/emacs-xyz.scm, gnu/packages/embedded.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/erlang.scm, gnu/packages/fabric-management.scm, gnu/packages/file-systems.scm, gnu/packages/finance.scm, gnu/packages/firmware.scm, gnu/packages/flashing-tools.scm, gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/fpga.scm, gnu/packages/game-development.scm, gnu/packages/games.scm, gnu/packages/genealogy.scm, gnu/packages/genimage.scm, gnu/packages/geo.scm, gnu/packages/gimp.scm, gnu/packages/gl.scm, gnu/packages/gnome-xyz.scm, gnu/packages/gnome.scm, gnu/packages/gnuzilla.scm, gnu/packages/golang.scm, gnu/packages/gpodder.scm, gnu/packages/graph.scm, gnu/packages/graphics.scm, gnu/packages/graphviz.scm, gnu/packages/groff.scm, gnu/packages/groovy.scm, gnu/packages/gtk.scm, gnu/packages/guile-xyz.scm, gnu/packages/guile.scm, gnu/packages/hardware.scm, gnu/packages/haskell-apps.scm, gnu/packages/haskell-xyz.scm, gnu/packages/hexedit.scm, gnu/packages/i2p.scm, gnu/packages/ibus.scm, gnu/packages/image-processing.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/ipfs.scm, gnu/packages/java-graphics.scm, gnu/packages/java-maths.scm, gnu/packages/java.scm, gnu/packages/javascript.scm, gnu/packages/jrnl.scm, gnu/packages/julia.scm, gnu/packages/jupyter.scm, gnu/packages/kodi.scm, gnu/packages/language.scm, gnu/packages/lego.scm, gnu/packages/less.scm, gnu/packages/libusb.scm, gnu/packages/linux.scm, gnu/packages/lirc.scm, gnu/packages/lisp-xyz.scm, gnu/packages/llvm.scm, gnu/packages/logging.scm, gnu/packages/lolcode.scm, gnu/packages/lua.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/maths.scm, gnu/packages/maven.scm, gnu/packages/mes.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/node-xyz.scm, gnu/packages/ocaml.scm, gnu/packages/ocr.scm, gnu/packages/onc-rpc.scm, gnu/packages/opencl.scm, gnu/packages/opencog.scm, gnu/packages/pantheon.scm, gnu/packages/password-utils.scm, gnu/packages/patchutils.scm, gnu/packages/pdf.scm, gnu/packages/perl6.scm, gnu/packages/phabricator.scm, gnu/packages/popt.scm, gnu/packages/printers.scm, gnu/packages/prolog.scm, gnu/packages/protobuf.scm, gnu/packages/pulseaudio.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python-xyz.scm, gnu/packages/qt.scm, gnu/packages/radio.scm, gnu/packages/rails.scm, gnu/packages/rdf.scm, gnu/packages/rednotebook.scm, gnu/packages/rpc.scm, gnu/packages/rsync.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/screen.scm, gnu/packages/security-token.scm, gnu/packages/selinux.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/shellutils.scm, gnu/packages/simh.scm, gnu/packages/sml.scm, gnu/packages/ssh.scm, gnu/packages/statistics.scm, gnu/packages/stenography.scm, gnu/packages/sync.scm, gnu/packages/syncthing.scm, gnu/packages/synergy.scm, gnu/packages/telephony.scm, gnu/packages/terminals.scm, gnu/packages/tex.scm, gnu/packages/texinfo.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tmux.scm, gnu/packages/tor.scm, gnu/packages/toys.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/virtualization.scm, gnu/packages/vlang.scm, gnu/packages/vnc.scm, gnu/packages/vpn.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm, gnu/packages/wireservice.scm, gnu/packages/wm.scm, gnu/packages/wxwidgets.scm, gnu/packages/xdisorg.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, tests/lint.scm: Remove trailing ".git" from 'git-reference' URL. Ludovic Courtès 2020-07-06gnu: vim: Update to 8.2.1145....* gnu/packages/vim.scm (vim): Update to 8.2.1145. [arguments]: Patch the terminal2 test too, as it has been split from test_terminal. Make the name of the phase more accurate. (vim-full)[arguments]: Remove the skip-test87 phase, as the test no longer exists and its successor passes. Jakub Kądziołka 2020-07-05gnu: python-pynvim: Update to 0.4.1....* gnu/packages/vim.scm (python-pynvim): Update to 0.4.1. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Tanguy Le Carrour 2020-07-01gnu: vim-full: Remove unneeded phase....* gnu/packages/vim.scm (vim-full)[arguments]: Remove custom 'skip-previewpopup phase. Efraim Flashner 2020-07-01gnu: vim: Update to 8.2.1101....* gnu/packages/vim.scm (vim): Update to 8.2.1101. [arguments]: In 'patch-config-files patch more shell calls. Rename custom 'set-TZDIR phase to 'set-environment-variables phase and also set TERM. Adjust 'skip-failing-tests to skip more tests. Efraim Flashner 2020-06-25gnu: Add vim-eunuch....* gnu/packages/vim.scm (vim-eunuch): New variable. Efraim Flashner 2020-06-07gnu: Add vim-dispatch....* gnu/packages/vim.scm (vim-dispatch): New variable. Efraim Flashner