1 | # lognestmonster Copyright (c) 2019 Joshua 'joshuas3' Stockin |
2 | # <https://github.com/JoshuaS3/lognestmonster/>. |
3 |
|
4 |
|
5 | # This file is part of lognestmonster. |
6 |
|
7 | # lognestmonster is free software: you can redistribute it and/or modify |
8 | # it under the terms of the GNU General Public License as published by |
9 | # the Free Software Foundation, either version 3 of the License, or |
10 | # (at your option) any later version. |
11 |
|
12 | # lognestmonster is distributed in the hope that it will be useful, |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | # GNU General Public License for more details. |
16 |
|
17 | # You should have received a copy of the GNU General Public License |
18 | # along with lognestmonster. If not, see <https://www.gnu.org/licenses/>. |
19 |
|
20 | from format import * |
21 |
|
22 | VERSION = "0.3.0" |
23 | TITLE = "lognestmonster" |
24 | YEAR = "2019" |
25 | AUTHOR = "Joshua 'joshuas3' Stockin" |
26 |
|
27 | VERSION_SHORT = "{0}/{1} Copyright (c) {2} {3}".format(TITLE, VERSION, YEAR, AUTHOR) |
28 |
|
29 | VERSION_MESSAGE = """{0} |
30 | Licensed under version 3 of the GNU General Public License |
31 | <https://github.com/JoshuaS3/lognestmonster/> |
32 | |
33 | |
34 | This program is free software: you can redistribute it and/or modify |
35 | it under the terms of the GNU General Public License as published by |
36 | the Free Software Foundation, either version 3 of the License, or |
37 | (at your option) any later version. |
38 | |
39 | This program is distributed in the hope that it will be useful, |
40 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
41 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
42 | GNU General Public License for more details. |
43 | |
44 | You should have received a copy of the GNU General Public License |
45 | along with this program. If not, see <https://www.gnu.org/licenses/>. |
46 | |
47 | |
48 | Written by {1}.""".format(VERSION_SHORT, AUTHOR) |
49 |
|
50 | # Help screen information |
51 |
|
52 | HELP_MESSAGE = "Run with --help to display usage information" |
53 | USAGE_MESSAGE = "[OPTION]... <QUEUE>" |
54 |
|
55 | COMMAND_INFO = """The lognestmonster library allows you to generate log files with an organized nesting format. Use this lognestmonster command to parse files generated by the lognestmonster library. |
56 | |
57 | |
58 | |
59 | By default, inputting a queue file, a folder with queue files, or switching stdin (passing "-" for QUEUE) 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, rather than a textual user interface. If the follow switch is used (-f, --follow), the parser will keep the instreams open and generate live logtrees. Switching stdin ("-") automatically switches follow. See other switches and options for the ability to narrow down log results. Log-unrelated commands (help, version, or no args) do not require a QUEUE variable. |
60 | |
61 | |
62 | |
63 | Unless manually switched, the verbosity levels `verbose` (-v) and `veryverbose` (-vv) are not displayed in the interactive textual interface.""" |
64 |
|
65 | DESCRIPTION_HELP = "Displays program description and a list of valid options and other arguments" |
66 | DESCRIPTION_VERSION = "Displays program information about copyright and the version" |
67 |
|
68 | DESCRIPTION_STATUS = "Reads the directory and outputs file and log metadata for each log tree" |
69 |
|
70 | DESCRIPTION_ERRORS = "Omits all statements besides errors. Stackable with other verbosity level commands" |
71 | DESCRIPTION_WARNINGS = "Omits all statements besides warnings. Stackable with other verbosity level commands" |
72 | DESCRIPTION_INFO = "Omits all statements besides those with verbosity type 'info'. Stackable with other verbosity level commands" |
73 | DESCRIPTION_DEBUG = "Omits all statements besides those with verbosity type 'debug'. Stackable with other verbosity level commands" |
74 | DESCRIPTION_VERBOSE = "Omits all statements besides those with verbosty type 'verbose'. Stackable with other verbosity level commands" |
75 | DESCRIPTION_VERYVERBOSE = "Omits all statements besides those with verbosity type 'veryverbose'. Stackable with other verbosity level commands" |
76 |
|
77 | DESCRIPTION_BEFORE = "Limits log results to before a certain timestamp. A millisecond UNIX timestamp must be provided." |
78 | DESCRIPTION_AFTER = "Limits log results to after a certain timestamp. A millisecond UNIX timestamp must be provided" |
79 | DESCRIPTION_TAG = "Limits log results to a tag. A string of the tag/invoker must be provided" |
80 | DESCRIPTION_STATEMENT = "Limits log results to a numbered statement" |
81 | DESCRIPTION_EVENT = "Limits log results to a numbered event and its children" |
82 |
|
83 | DESCRIPTION_FOLLOW = "Provides a live view of the log tree stream, similar to the 'tail -f' command" |
84 |
|
85 | # TUI messages |
86 |
|
87 | HEADER_MESSAGE = "lognestmonster - {0}" |
88 |
|
89 | METADATA_MESSAGE = "Size: {0} bytes | Timestamp: {1}" |
90 |
|
91 | DATA_MESSAGE_DEFAULT = "{0} Statements | {1} Events | {2} Unsaved Data Trees" |
92 |
|
93 | CONTROLS_MESSAGE = "press q to exit | h for help" |
94 |
|
95 | CONTROLS_SCREEN = """h for help |
96 | q to exit |
97 | up and down arrow keys to select |
98 | right arrow key to expand |
99 | left arrow key to collapse |
100 | spacebar to pause |
101 | """ |
102 |
|