<commit_before>import argparse

import util.store

MODULE_HELP = 'Specify a space-separated list of modules to load. The order of the list determines their order in the i3bar (from left to right). Use <module>:<alias> to provide an alias in case you want to load the same module multiple times, but specify different parameters.'
PARAMETER_HELP = 'Provide configuration parameters in the form of <module>.<key>=<value>'
THEME_HELP = 'Specify the theme to use for drawing modules'

class Config(util.store.Store):
    def __init__(self, args):
        super(Config, self).__init__()

        parser = argparse.ArgumentParser(description='bumblebee-status is a modular, theme-able status line generator for the i3 window manager. https://github.com/tobi-wan-kenobi/bumblebee-status/wiki')
        parser.add_argument('-m', '--modules', nargs='+', action='append', default=[],
            help=MODULE_HELP)
        parser.add_argument('-p', '--parameters', nargs='+', action='append', default=[],
            help=PARAMETER_HELP)
        parser.add_argument('-t', '--theme', default='default', help=THEME_HELP)
        parser.add_argument('-i', '--iconset', default='auto',
            help='Specify the name of an iconset to use (overrides theme default)')
        self._args = parser.parse_args(args)

        parameters = [ item for sub in self._args.parameters for item in sub ]
        for param in parameters:
            key, value = param.split('=', 1)
            self.set(key, value)

    def modules(self):
        return [item for sub in self._args.modules for item in sub]

    def interval(self):
        return float(self.get('interval', 1))

    def theme(self):
        return self._args.theme

    def iconset(self):
        return self._args.iconset

# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4<commit_msg>[core/config] Add stub for autohide<commit_after>import argparse

import util.store

MODULE_HELP = 'Specify a space-separated list of modules to load. The order of the list determines their order in the i3bar (from left to right). Use <module>:<alias> to provide an alias in case you want to load the same module multiple times, but specify different parameters.'
PARAMETER_HELP = 'Provide configuration parameters in the form of <module>.<key>=<value>'
THEME_HELP = 'Specify the theme to use for drawing modules'

class Config(util.store.Store):
    def __init__(self, args):
        super(Config, self).__init__()

        parser = argparse.ArgumentParser(description='bumblebee-status is a modular, theme-able status line generator for the i3 window manager. https://github.com/tobi-wan-kenobi/bumblebee-status/wiki')
        parser.add_argument('-m', '--modules', nargs='+', action='append', default=[],
            help=MODULE_HELP)
        parser.add_argument('-p', '--parameters', nargs='+', action='append', default=[],
            help=PARAMETER_HELP)
        parser.add_argument('-t', '--theme', default='default', help=THEME_HELP)
        parser.add_argument('-i', '--iconset', default='auto',
            help='Specify the name of an iconset to use (overrides theme default)')
        parser.add_argument("-a", "--autohide", nargs="+", default=[],
            help="Specify a list of modules to hide when not in warning/error state")
        self._args = parser.parse_args(args)

        parameters = [ item for sub in self._args.parameters for item in sub ]
        for param in parameters:
            key, value = param.split('=', 1)
            self.set(key, value)

    def modules(self):
        return [item for sub in self._args.modules for item in sub]

    def interval(self):
        return float(self.get('interval', 1))

    def theme(self):
        return self._args.theme

    def iconset(self):
        return self._args.iconset

# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
{'fraction_non_alphanumeric': 0.11969815248503773, 'fraction_numerical': 0.0036429872495446266, 'mean_word_length': 3.2853957636566333, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2430844', 'n_tokens_mistral': 1107, 'n_tokens_neox': 1097, 'n_words': 361}