# 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 args import * # yeah, I know argparse is a thing, but I don't like it... def get_arg_from_indicator(indicator): for option in ARGUMENT_OPTIONS: if indicator in ARGUMENT_OPTIONS[option]["indicators"]: return option return None def get_arg_description(name): return ARGUMENT_OPTIONS[name]["description"] def parseargs(argv): options = {} for arg in argv: opt = get_arg_from_indicator(arg) return options