mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-11 23:39:31 -05:00
Move graphical banner into common, and display it in GUI too
This commit is contained in:
parent
dac508d06e
commit
ee3761af6c
@ -43,39 +43,7 @@ def main(cwd=None):
|
|||||||
onionshare uses.
|
onionshare uses.
|
||||||
"""
|
"""
|
||||||
common = Common()
|
common = Common()
|
||||||
|
common.display_banner()
|
||||||
# Display OnionShare banner
|
|
||||||
print(f"OnionShare {common.version} | https://onionshare.org/")
|
|
||||||
print(common.C_DARKPURPLE)
|
|
||||||
print(" ▄▄█████████▄▄ ")
|
|
||||||
print(" ▄███████████████████▄ ")
|
|
||||||
print(" ▄█████████████████████████▄ ")
|
|
||||||
print(" █████████████████████████████ ")
|
|
||||||
print(" ▀████████████████████████████▄ ")
|
|
||||||
print(" ▄▄ ▀██████▀▀▀ ▀▀▀█████████████ ")
|
|
||||||
print(" ▄████▄ ▀█▀ ▀███████████ ")
|
|
||||||
print(" ▄████████▄ ██████████ ")
|
|
||||||
print(" ▄████████████▄ ██████████ ")
|
|
||||||
print(" ▄████████████████▄ █████████ ")
|
|
||||||
print(" █████████ ▀████████████████▀ ")
|
|
||||||
print(" ██████████ ▀████████████▀ ")
|
|
||||||
print(" ██████████ ▀████████▀ ")
|
|
||||||
print(" ███████████▄ ▄█▄ ▀████▀ ")
|
|
||||||
print(" █████████████▄▄▄ ▄▄▄██████▄ ▀▀ ")
|
|
||||||
print(" █████████████████████████████▄ ")
|
|
||||||
print(" ▀█████████████████████████████ ")
|
|
||||||
print(" ▀█████████████████████████ ")
|
|
||||||
print(" ▀███████████████████ ")
|
|
||||||
print(" ▀▀█████████▀▀ ")
|
|
||||||
print("")
|
|
||||||
print(common.C_LIGHTPURPLE)
|
|
||||||
print(" ▄██▄ ███ █ ")
|
|
||||||
print(" █ █ █▀ █ ")
|
|
||||||
print(" █ █ ▀ █▄▄ █ ")
|
|
||||||
print(" █ █ █▄█▄ █ ▄██▄ █▄█▄ ▀▀█ █▄█▄ ▄██▄ █▄█▄ ▄██▄ ")
|
|
||||||
print(" █ █ █▀ █ █ █ █ █▀ █ ▄█ █▀ █ █ █ █▀ █▄▄▀ ")
|
|
||||||
print(" ▀██▀ █ █ █ ▀██▀ █ █ ███ █ █ ▀█▀█ █ ▀▄▄▄ ")
|
|
||||||
print(common.C_RESET)
|
|
||||||
|
|
||||||
# OnionShare CLI in OSX needs to change current working directory (#132)
|
# OnionShare CLI in OSX needs to change current working directory (#132)
|
||||||
if common.platform == "Darwin":
|
if common.platform == "Darwin":
|
||||||
|
@ -62,6 +62,39 @@ class Common:
|
|||||||
with open(self.get_resource_path("version.txt")) as f:
|
with open(self.get_resource_path("version.txt")) as f:
|
||||||
self.version = f.read().strip()
|
self.version = f.read().strip()
|
||||||
|
|
||||||
|
def display_banner(self):
|
||||||
|
print(f"OnionShare {self.version} | https://onionshare.org/")
|
||||||
|
print(self.C_DARKPURPLE)
|
||||||
|
print(" ▄▄█████████▄▄ ")
|
||||||
|
print(" ▄███████████████████▄ ")
|
||||||
|
print(" ▄█████████████████████████▄ ")
|
||||||
|
print(" █████████████████████████████ ")
|
||||||
|
print(" ▀████████████████████████████▄ ")
|
||||||
|
print(" ▄▄ ▀██████▀▀▀ ▀▀▀█████████████ ")
|
||||||
|
print(" ▄████▄ ▀█▀ ▀███████████ ")
|
||||||
|
print(" ▄████████▄ ██████████ ")
|
||||||
|
print(" ▄████████████▄ ██████████ ")
|
||||||
|
print(" ▄████████████████▄ █████████ ")
|
||||||
|
print(" █████████ ▀████████████████▀ ")
|
||||||
|
print(" ██████████ ▀████████████▀ ")
|
||||||
|
print(" ██████████ ▀████████▀ ")
|
||||||
|
print(" ███████████▄ ▄█▄ ▀████▀ ")
|
||||||
|
print(" █████████████▄▄▄ ▄▄▄██████▄ ▀▀ ")
|
||||||
|
print(" █████████████████████████████▄ ")
|
||||||
|
print(" ▀█████████████████████████████ ")
|
||||||
|
print(" ▀█████████████████████████ ")
|
||||||
|
print(" ▀███████████████████ ")
|
||||||
|
print(" ▀▀█████████▀▀ ")
|
||||||
|
print("")
|
||||||
|
print(self.C_LIGHTPURPLE)
|
||||||
|
print(" ▄██▄ ███ █ ")
|
||||||
|
print(" █ █ █▀ █ ")
|
||||||
|
print(" █ █ ▀ █▄▄ █ ")
|
||||||
|
print(" █ █ █▄█▄ █ ▄██▄ █▄█▄ ▀▀█ █▄█▄ ▄██▄ █▄█▄ ▄██▄ ")
|
||||||
|
print(" █ █ █▀ █ █ █ █ █▀ █ ▄█ █▀ █ █ █ █▀ █▄▄▀ ")
|
||||||
|
print(" ▀██▀ █ █ █ ▀██▀ █ █ ███ █ █ ▀█▀█ █ ▀▄▄▄ ")
|
||||||
|
print(self.C_RESET)
|
||||||
|
|
||||||
def load_settings(self, config=None):
|
def load_settings(self, config=None):
|
||||||
"""
|
"""
|
||||||
Loading settings, optionally from a custom config json file.
|
Loading settings, optionally from a custom config json file.
|
||||||
|
@ -75,14 +75,12 @@ def main():
|
|||||||
The main() function implements all of the logic that the GUI version of onionshare uses.
|
The main() function implements all of the logic that the GUI version of onionshare uses.
|
||||||
"""
|
"""
|
||||||
common = Common()
|
common = Common()
|
||||||
|
common.display_banner()
|
||||||
|
|
||||||
# Required for macOS Big Sur: https://stackoverflow.com/a/64878899
|
# Required for macOS Big Sur: https://stackoverflow.com/a/64878899
|
||||||
if common.platform == "Darwin":
|
if common.platform == "Darwin":
|
||||||
os.environ["QT_MAC_WANTS_LAYER"] = "1"
|
os.environ["QT_MAC_WANTS_LAYER"] = "1"
|
||||||
|
|
||||||
# Display OnionShare banner
|
|
||||||
print(f"OnionShare {common.version} | https://onionshare.org/")
|
|
||||||
|
|
||||||
# Start the Qt app
|
# Start the Qt app
|
||||||
global qtapp
|
global qtapp
|
||||||
qtapp = Application(common)
|
qtapp = Application(common)
|
||||||
|
Loading…
Reference in New Issue
Block a user