laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/pysim/+/34943?usp=email )
Change subject: pySim-shell: Add copyright statement and link to online manual to banner
......................................................................
pySim-shell: Add copyright statement and link to online manual to banner
This way the users are reminded where they can go to read the manual.
Change-Id: Ie86822e73bccb3c585cecc818d4462d4ca6e43c2
---
M docs/shell.rst
M pySim-shell.py
2 files changed, 23 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/43/34943/1
diff --git a/docs/shell.rst b/docs/shell.rst
index 97a1829..7e04792 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -202,6 +202,14 @@
~~~~~
[Re-]Display the introductory banner
+Example:
+::
+
+ pySIM-shell (00:MF)> intro
+ Welcome to pySim-shell!
+ (C) 2021-2023 by Harald Welte, sysmocom - s.f.m.c. GmbH and contributors
+ Online manual available at
https://downloads.osmocom.org/docs/pysim/master/html/shell.html
+
equip
~~~~~
diff --git a/pySim-shell.py b/pySim-shell.py
index bbb14b2..c02555f 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -174,6 +174,9 @@
class PysimApp(Cmd2Compat):
CUSTOM_CATEGORY = 'pySim Commands'
+ BANNER = """Welcome to pySim-shell!
+(C) 2021-2023 by Harald Welte, sysmocom - s.f.m.c. GmbH and contributors
+Online manual available at
https://downloads.osmocom.org/docs/pysim/master/html/shell.html """
def __init__(self, card, rs, sl, ch, script=None):
if version.parse(cmd2.__version__) < version.parse("2.0.0"):
@@ -184,7 +187,7 @@
# pylint: disable=unexpected-keyword-arg
super().__init__(persistent_history_file='~/.pysim_shell_history',
allow_cli_args=False,
auto_load_commands=False, startup_script=script, **kwargs)
- self.intro = style('Welcome to pySim-shell!', fg=RED)
+ self.intro = style(self.BANNER, fg=RED)
self.default_category = 'pySim-shell built-in commands'
self.card = None
self.rs = None
--
To view, visit
https://gerrit.osmocom.org/c/pysim/+/34943?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie86822e73bccb3c585cecc818d4462d4ca6e43c2
Gerrit-Change-Number: 34943
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange