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 args import * |
21 | # yeah, I know argparse is a thing, but I don't like it... |
22 |
|
23 | def get_arg_from_indicator(indicator): |
24 | for option in ARGUMENT_OPTIONS: |
25 | if indicator in ARGUMENT_OPTIONS[option]["indicators"]: |
26 | return option |
27 | return None |
28 |
|
29 | def get_arg_description(name): |
30 | return ARGUMENT_OPTIONS[name]["description"] |
31 |
|
32 | def parseargs(argv): |
33 | options = {} |
34 | for arg in argv: |
35 | opt = get_arg_from_indicator(arg) |
36 | return options |
37 |
|