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