diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-06-23 13:14:42 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-06-23 13:14:42 +0200 |
commit | 9471b31e5dada25afeb71356a536d9e2017bc625 (patch) | |
tree | 546b3d82ee9f2b9ce47bdfcdfedf705895dae7bc | |
parent | a4c3c559a248dc90367f1e1b343d18d52f742416 (diff) | |
download | qutebrowser-9471b31e5dada25afeb71356a536d9e2017bc625.tar.gz qutebrowser-9471b31e5dada25afeb71356a536d9e2017bc625.zip |
Add ASCII-art logo to :version
Thanks to Ingvix in IRC for the ASCII-art! :)
-rw-r--r-- | qutebrowser/utils/version.py | 23 | ||||
-rw-r--r-- | tests/unit/utils/test_version.py | 2 |
2 files changed, 23 insertions, 2 deletions
diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index 59ef04f1f..00b60c4dd 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -58,6 +58,25 @@ except ImportError: # pragma: no cover webenginesettings = None # type: ignore[assignment] +_LOGO = r''' + ______ ,, + ,.-"` | ,-` | + .^ || | + / ,-*^| || | +; / | || ;-*```^*. +; ; | |;,-*` \ +| | | ,-*` ,-"""\ \ +| \ ,-"` ,-^`| \ | + \ `^^ ,-;| | ; | + *; ,-*` || | / ;; + `^^`` | || | ,^ / + | || `^^` ,^ + | _,"| _,-" + -*` ****"""`` + +''' + + @attr.s class DistributionInfo: @@ -418,7 +437,9 @@ def _config_py_loaded() -> str: def version_info() -> str: """Return a string with various version information.""" - lines = ["qutebrowser v{}".format(qutebrowser.__version__)] + lines = _LOGO.lstrip('\n').splitlines() + + lines.append("qutebrowser v{}".format(qutebrowser.__version__)) gitver = _git_str() if gitver is not None: lines.append("Git commit: {}".format(gitver)) diff --git a/tests/unit/utils/test_version.py b/tests/unit/utils/test_version.py index 8d3542cd7..de89b5913 100644 --- a/tests/unit/utils/test_version.py +++ b/tests/unit/utils/test_version.py @@ -1019,7 +1019,7 @@ def test_version_info(params, stubs, monkeypatch, config_stub): else: monkeypatch.delattr(sys, 'frozen', raising=False) - template = textwrap.dedent(""" + template = version._LOGO.lstrip('\n') + textwrap.dedent(""" qutebrowser vVERSION{git_commit} Backend: {backend} Qt: {qt} |