# installer for the 'basic' skin
# Copyright 2014-2021 Matthew Wall

from weecfg.extension import ExtensionInstaller


def loader():
    return BasicInstaller()


class BasicInstaller(ExtensionInstaller):
    def __init__(self):
        super(BasicInstaller, self).__init__(
            version="0.3",
            name='Basic',
            description='Very basic skin for weewx.',
            author="Matthew Wall",
            author_email="mwall@users.sourceforge.net",
            config={
                'StdReport': {
                    'BasicReport': {
                        'skin': 'basic',
                        'enable' : 'True',
                        'HTML_ROOT': 'basic',
                        'lang': 'en',
                        'units': 'US'
                    }
                }
            },
            files=[
                ('skins/basic',
                 ['skins/basic/basic.css',
                  'skins/basic/current.inc',
                  'skins/basic/favicon.ico',
                  'skins/basic/hilo.inc',
                  'skins/basic/index.html.tmpl',
                  'skins/basic/skin.conf',
                  'skins/basic/lang/en.conf',
                  'skins/basic/lang/fr.conf',
                  ]),
            ]
        )

    def configure(self, engine):
        """Customized configuration that sets a language code"""
        # TODO: Set a units code as well
        code = engine.get_lang_code('basic', 'en')
        self['config']['StdReport']['BasicReport']['lang'] = code
        return True

f76a55771b5d010e0331a08e65e26b42d1f3656d
<mask token>


class BasicInstaller(ExtensionInstaller):

    def __init__(self):
        super(BasicInstaller, self).__init__(version='0.3', name='Basic',
            description='Very basic skin for weewx.', author='Matthew Wall',
            author_email='mwall@users.sourceforge.net', config={'StdReport':
            {'BasicReport': {'skin': 'basic', 'enable': 'True', 'HTML_ROOT':
            'basic', 'lang': 'en', 'units': 'US'}}}, files=[('skins/basic',
            ['skins/basic/basic.css', 'skins/basic/current.inc',
            'skins/basic/favicon.ico', 'skins/basic/hilo.inc',
            'skins/basic/index.html.tmpl', 'skins/basic/skin.conf',
            'skins/basic/lang/en.conf', 'skins/basic/lang/fr.conf'])])
    <mask token>

<mask token>


class BasicInstaller(ExtensionInstaller):

    def __init__(self):
        super(BasicInstaller, self).__init__(version='0.3', name='Basic',
            description='Very basic skin for weewx.', author='Matthew Wall',
            author_email='mwall@users.sourceforge.net', config={'StdReport':
            {'BasicReport': {'skin': 'basic', 'enable': 'True', 'HTML_ROOT':
            'basic', 'lang': 'en', 'units': 'US'}}}, files=[('skins/basic',
            ['skins/basic/basic.css', 'skins/basic/current.inc',
            'skins/basic/favicon.ico', 'skins/basic/hilo.inc',
            'skins/basic/index.html.tmpl', 'skins/basic/skin.conf',
            'skins/basic/lang/en.conf', 'skins/basic/lang/fr.conf'])])

    def configure(self, engine):
        """Customized configuration that sets a language code"""
        code = engine.get_lang_code('basic', 'en')
        self['config']['StdReport']['BasicReport']['lang'] = code
        return True

<mask token>


def loader():
    return BasicInstaller()


class BasicInstaller(ExtensionInstaller):

    def __init__(self):
        super(BasicInstaller, self).__init__(version='0.3', name='Basic',
            description='Very basic skin for weewx.', author='Matthew Wall',
            author_email='mwall@users.sourceforge.net', config={'StdReport':
            {'BasicReport': {'skin': 'basic', 'enable': 'True', 'HTML_ROOT':
            'basic', 'lang': 'en', 'units': 'US'}}}, files=[('skins/basic',
            ['skins/basic/basic.css', 'skins/basic/current.inc',
            'skins/basic/favicon.ico', 'skins/basic/hilo.inc',
            'skins/basic/index.html.tmpl', 'skins/basic/skin.conf',
            'skins/basic/lang/en.conf', 'skins/basic/lang/fr.conf'])])

    def configure(self, engine):
        """Customized configuration that sets a language code"""
        code = engine.get_lang_code('basic', 'en')
        self['config']['StdReport']['BasicReport']['lang'] = code
        return True

from weecfg.extension import ExtensionInstaller


def loader():
    return BasicInstaller()


class BasicInstaller(ExtensionInstaller):

    def __init__(self):
        super(BasicInstaller, self).__init__(version='0.3', name='Basic',
            description='Very basic skin for weewx.', author='Matthew Wall',
            author_email='mwall@users.sourceforge.net', config={'StdReport':
            {'BasicReport': {'skin': 'basic', 'enable': 'True', 'HTML_ROOT':
            'basic', 'lang': 'en', 'units': 'US'}}}, files=[('skins/basic',
            ['skins/basic/basic.css', 'skins/basic/current.inc',
            'skins/basic/favicon.ico', 'skins/basic/hilo.inc',
            'skins/basic/index.html.tmpl', 'skins/basic/skin.conf',
            'skins/basic/lang/en.conf', 'skins/basic/lang/fr.conf'])])

    def configure(self, engine):
        """Customized configuration that sets a language code"""
        code = engine.get_lang_code('basic', 'en')
        self['config']['StdReport']['BasicReport']['lang'] = code
        return True

# installer for the 'basic' skin
# Copyright 2014-2021 Matthew Wall

from weecfg.extension import ExtensionInstaller


def loader():
    return BasicInstaller()


class BasicInstaller(ExtensionInstaller):
    def __init__(self):
        super(BasicInstaller, self).__init__(
            version="0.3",
            name='Basic',
            description='Very basic skin for weewx.',
            author="Matthew Wall",
            author_email="mwall@users.sourceforge.net",
            config={
                'StdReport': {
                    'BasicReport': {
                        'skin': 'basic',
                        'enable' : 'True',
                        'HTML_ROOT': 'basic',
                        'lang': 'en',
                        'units': 'US'
                    }
                }
            },
            files=[
                ('skins/basic',
                 ['skins/basic/basic.css',
                  'skins/basic/current.inc',
                  'skins/basic/favicon.ico',
                  'skins/basic/hilo.inc',
                  'skins/basic/index.html.tmpl',
                  'skins/basic/skin.conf',
                  'skins/basic/lang/en.conf',
                  'skins/basic/lang/fr.conf',
                  ]),
            ]
        )

    def configure(self, engine):
        """Customized configuration that sets a language code"""
        # TODO: Set a units code as well
        code = engine.get_lang_code('basic', 'en')
        self['config']['StdReport']['BasicReport']['lang'] = code
        return True
