2020-06-15 00:08:17 +00:00
|
|
|
"""Onionr - Private P2P Communication.
|
|
|
|
|
|
|
|
Show nice logo
|
|
|
|
"""
|
2020-06-29 07:30:37 +00:00
|
|
|
import os
|
|
|
|
|
2020-06-15 00:08:17 +00:00
|
|
|
import config
|
|
|
|
import logger
|
|
|
|
|
|
|
|
from .quotes import QUOTE
|
|
|
|
from utils.boxprint import bordered
|
|
|
|
from utils import logoheader
|
2020-06-29 07:30:37 +00:00
|
|
|
"""
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
"""
|
|
|
|
|
2020-06-15 00:08:17 +00:00
|
|
|
|
|
|
|
def show_logo():
|
|
|
|
logger.raw('', terminal=True)
|
|
|
|
# print nice header thing :)
|
|
|
|
if config.get('general.display_header', True):
|
|
|
|
logoheader.header("")
|
2020-06-29 07:30:37 +00:00
|
|
|
if os.get_terminal_size().columns >= 120:
|
|
|
|
if QUOTE[1]: # If there is an author to show for the quote
|
|
|
|
logger.info(
|
|
|
|
"\u001b[33m\033[F" + bordered(QUOTE[0] + '\n -' + QUOTE[1]),
|
|
|
|
terminal=True)
|
|
|
|
else:
|
|
|
|
logger.info("\u001b[33m\033[F" + bordered(QUOTE[0]), terminal=True)
|
2020-06-15 00:08:17 +00:00
|
|
|
else:
|
2020-06-29 07:30:37 +00:00
|
|
|
if QUOTE[1]:
|
|
|
|
logger.info("\u001b[33m\033[F" + QUOTE[0] + '\n -' + QUOTE[1],
|
|
|
|
terminal=True)
|
|
|
|
else:
|
|
|
|
logger.info("\u001b[33m\033[F" + QUOTE[0], terminal=True)
|