summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2018-01-26 22:53:39 +0100
committerKali Kaneko <kali@leap.se>2018-02-15 16:36:37 +0100
commit7697beb7034acacbe6964af0385a03b2ea33ec93 (patch)
treed22248d908a59ce287229b9071429fb6ca726f13 /src/leap/bitmask
parenta93041b152b02d2c782baae2ccb39af905e6b9a3 (diff)
[feat] help string for bitmask gui
- Resolves: #8794
Diffstat (limited to 'src/leap/bitmask')
-rwxr-xr-xsrc/leap/bitmask/cli/bitmask_cli.py1
-rw-r--r--src/leap/bitmask/gui/app.py32
2 files changed, 25 insertions, 8 deletions
diff --git a/src/leap/bitmask/cli/bitmask_cli.py b/src/leap/bitmask/cli/bitmask_cli.py
index 40f119e9..b048bb69 100755
--- a/src/leap/bitmask/cli/bitmask_cli.py
+++ b/src/leap/bitmask/cli/bitmask_cli.py
@@ -62,7 +62,6 @@ GENERAL COMMANDS:
OPTIONAL ARGUMENTS:
--json print the raw json (useful for scripting)
-
'''
epilog = ("Use 'bitmaskctl <command> help' to learn more "
"about each command.")
diff --git a/src/leap/bitmask/gui/app.py b/src/leap/bitmask/gui/app.py
index 4a62adf6..d52636c2 100644
--- a/src/leap/bitmask/gui/app.py
+++ b/src/leap/bitmask/gui/app.py
@@ -223,6 +223,19 @@ def launch_gui(with_window=True):
sys.exit(qApp.exec_())
+usage = '''bitmask [<args>]
+
+Launches the Bitmask GUI.
+
+OPTIONAL ARGUMENTS:
+
+ --nowindow does not launch the main window, only the systray.
+
+SEE ALSO:
+
+ bitmaskctl controls bitmask daemon from the command line.
+'''
+
def start_app():
from leap.bitmask.util import STANDALONE
@@ -242,13 +255,18 @@ def start_app():
MIN_ARGS = 1
# DEBUG ====================================
- if STANDALONE and len(sys.argv) > MIN_ARGS:
- if sys.argv[1] == 'bitmask_helpers':
- from leap.bitmask.vpn.helpers import main
- return main()
-
- from leap.bitmask.cli import bitmask_cli
- return bitmask_cli.main()
+ if len(sys.argv) > MIN_ARGS:
+ if STANDALONE:
+ if sys.argv[1] == 'bitmask_helpers':
+ from leap.bitmask.vpn.helpers import main
+ return main()
+
+ from leap.bitmask.cli import bitmask_cli
+ return bitmask_cli.main()
+ else:
+ if sys.argv[1] == '--help' or sys.argv[1] == 'help':
+ print(usage)
+ sys.exit()
reset_authtoken()
with_window = '--nowindow' not in sys.argv