# lognestmonster Copyright (c) 2019 Joshua 'joshuas3' Stockin
# .
# This file is part of lognestmonster.
# lognestmonster 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.
# lognestmonster 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 lognestmonster. If not, see .
from format import *
TITLE = "lognestmonster"
VERSION = "0.1.0"
VERSION_SHORT = "{0}/{1} Copyright (c) 2019 Joshua 'joshuas3' Stockin".format(TITLE, VERSION)
VERSION_MESSAGE = """{0}
Licensed under version 3 of the GNU General Public License
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 .
Written by Joshua 'joshuas3' Stockin.""".format(VERSION_SHORT)
# Help screen information
HELP_MESSAGE = "Run with --help to display usage information"
USAGE_MESSAGE = "[-h, -?, --help]&[--version]&[-e, --errors]&[-w, --warnings]&[-i, --info]&[-d, --debug]&[-v, --verbose]&[-vv, --veryverbose]&[-a TIMESTAMP, --after TIMESTAMP]&[-b TIMESTAMP, --before TIMESTAMP]&[-t TAG_NAME, --tag TAG_NAME]&[-c STATEMENT_ID | -q EVENT_ID]&[-f, --follow]&[-s, --status]&(-x, --stdin) | "
COMMAND_INFO = """Use the lognestmonster comand to parse files generated by the lognestmonster library.
By default, inputting a queue file, a folder with queue files, or switching stdin (-x, --stdin) will display an interactive textual interface where keyboard events are used to sift through log statements. Using the status switch (-s, --status), you can do a quick read of the instream and only display metadata, such as the number of statements or events. If the follow switch is used (-f, --follow), the parser will keep the instreams open and generate live logtrees. See other switches and options for the ability to narrow down log results.
Unless manually switched, the verbosity levels `verbose` (-v) and `veryverbose` (-vv) are not displayed in the interactive textual interface."""
DESCRIPTION_HELP = "Displays program description and a list of valid options and other arguments"
DESCRIPTION_VERSION = "Displays program information about copyright and the version"
DESCRIPTION_STATUS = "Reads the directory and outputs file and log metadata for each log tree"
DESCRIPTION_ERRORS = "Omits all statements besides errors. Stackable with other verbosity level commands"
DESCRIPTION_WARNINGS = "Omits all statements besides warnings. Stackable with other verbosity level commands"
DESCRIPTION_INFO = "Omits all statements besides those with verbosity type 'info'. Stackable with other verbosity level commands"
DESCRIPTION_DEBUG = "Omits all statements besides those with verbosity type 'debug'. Stackable with other verbosity level commands"
DESCRIPTION_VERBOSE = "Omits all statements besides those with verbosty type 'verbose'. Stackable with other verbosity level commands"
DESCRIPTION_VERYVERBOSE = "Omits all statements besides those with verbosity type 'veryverbose'. Stackable with other verbosity level commands"
DESCRIPTION_BEFORE = "Limits log results to before a certain timestamp"
DESCRIPTION_AFTER = "Limits log results to after a certain timestamp"
DESCRIPTION_TAG = "Limits log results to a tag"
DESCRIPTION_STATEMENT = "Limits log results to a numbered statement"
DESCRIPTION_EVENT = "Limits log results to a numbered event and its children"
DESCRIPTION_FOLLOW = "Provides a live view of the log tree stream, similar to the 'tail -f' command"
DESCRIPTION_STDIN = "Reads logtree data from stdin as compared to logs from a log directory. Implicitly uses --tail"
# TUI messages
HEADER_MESSAGE = "lognestmonster - {0}"
METADATA_MESSAGE = "Size: {0} bytes | Timestamp: {1}"
DATA_MESSAGE_DEFAULT = "{0} Statements | {1} Events | {2} Unsaved Data Trees"
CONTROLS_MESSAGE = "press q to exit | h for help"
CONTROLS_SCREEN = """h for help
q to exit
up and down arrow keys to select
right arrow key to expand
left arrow key to collapse
spacebar to pause
"""