Index

lognestmonster / 0021206

A general-purpose single-header C logging library and parser for event-based logs. (Incomplete)

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
7221 Aug 2019 21:33f5472c4Argument parsing and processingJosh Stockin126N

Blob @ lognestmonster / parser / args.py

application/x-python2211 bytesdownload raw
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
20from text import *
21
22ARGUMENT_OPTIONS = {
23
24 # Command meta
25
26 "help": {
27 "indicators": ["-h", "-?", "--help"],
28 "description": DESCRIPTION_HELP
29 },
30 "version": {
31 "indicators": ["--version"],
32 "description": DESCRIPTION_VERSION
33 },
34
35 # Data
36
37 "status": {
38 "indicators": ["-s", "--status"],
39 "description": DESCRIPTION_STATUS
40 },
41
42 # Verbosity levels
43
44 "errors": {
45 "indicators": ["-e", "--errors"],
46 "description": DESCRIPTION_ERRORS
47 },
48 "warnings": {
49 "indicators": ["-w", "--warnings"],
50 "description": DESCRIPTION_WARNINGS
51 },
52 "info": {
53 "indicators": ["-i", "--info"],
54 "description": DESCRIPTION_INFO
55 },
56 "debug": {
57 "indicators": ["-d", "--debug"],
58 "description": DESCRIPTION_DEBUG
59 },
60 "verbose": {
61 "indicators": ["-v", "--verbose"],
62 "description": DESCRIPTION_VERBOSE
63 },
64 "veryverbose": {
65 "indicators": ["-vv", "--veryverbose"],
66 "description": DESCRIPTION_VERYVERBOSE
67 },
68
69 # filters
70
71 "after": {
72 "indicators": ["--after"],
73 "description": DESCRIPTION_AFTER
74 },
75 "before": {
76 "indicators": ["--before"],
77 "description": DESCRIPTION_BEFORE
78 },
79 "tag": {
80 "indicators": ["-t", "--tag"],
81 "description": DESCRIPTION_TAG
82 },
83 "statement": {
84 "indicators": ["-c"],
85 "description": DESCRIPTION_STATEMENT
86 },
87 "event": {
88 "indicators": ["-q"],
89 "description": DESCRIPTION_EVENT
90 },
91
92 # other
93
94 "follow": {
95 "indicators": ["-f", "--follow"],
96 "description": DESCRIPTION_FOLLOW
97 }
98}
99