''' Main Program Flow ''' if len(sys.argv) > 1: lang = sys.argv[1] alternate_urls = urlmapper.generate_urls(lang) pinout.load(lang) overlays = pinout.settings['overlays'] strings = pinout.get_string('strings', {}) if type(strings) == list: _strings = {} for item in strings: _strings[item.keys()[0]] = item.values()[0] strings = _strings for key, val in default_strings.items(): if key not in strings: strings[key] = val base_url = pinout.get_setting('base_url', '/pinout/') # '/pinout-tr/pinout/' resource_url = pinout.get_setting( 'resource_url', '/pinout/resources/') # '/pinout-tr/resources/' url_suffix = pinout.get_setting('url_suffix', '') # '.html'
''' Main Program Flow ''' if len(sys.argv) > 1: lang = sys.argv[1] alternate_urls = urlmapper.generate_urls(lang) pinout.load(lang) overlays = pinout.settings['overlays'] strings = pinout.get_string('strings', {}) if type(strings) == list: _strings = {} for item in strings: _strings[item.keys()[0]] = item.values()[0] strings = _strings for key, val in default_strings.items(): if key not in strings: strings[key] = val base_url = pinout.get_setting('base_url', '/pinout/') # '/pinout-tr/pinout/' resource_url = pinout.get_setting('resource_url', '/resources/') # '/pinout-tr/resources/' url_suffix = pinout.get_setting('url_suffix', '') # '.html'