def get_csv(self): header = self.get_header() data = self.get_data() return_dict = dict() for language in header.languages: if is_language_valid(language): return_dict[language] = [ '%d,%s' % (id, ','.join([repr(value) for value in values])) for id, values in data[language].items() ] return return_dict
def _extract_data(self): header = self.get_header() self._data = {} for language in header.languages: if is_language_valid(language): language_name = get_language_name(language) if language_name != '': language_name = '_%s' % language_name self._data[language] = {} for exd_file in header.exds: language_name = get_language_name(language) if language_name != '': language_name = '_%s' % language_name self._data[language].update(extract_data( self._dat_manager.get_file(Category.EXD_NAME % (self._name, exd_file, language_name)), header))