entry['Keyword'] = keywords print('fixed "{}"'.format(entry['File'])) print('special ops finished') def complete_run(self): pass if __name__ == "__main__": m = EntriesMaintainer() actions = { 'Read entries': m.read_entries, 'Write entries': m.write_entries, 'Check template leftovers': m.check_template_leftovers, 'Check inconsistencies': m.check_inconsistencies, 'Check rejected entries': m.clean_rejected, 'Check external links (takes quite long)': m.check_external_links, 'Clean backlog': m.clean_backlog, 'Update Readme and TOCs': m.update_readme_tocs, 'Update statistics': m.update_statistics, 'Update HTML': m.update_html, 'Update repository list': m.update_repos, 'Special': m.special_ops, 'Complete run': m.complete_run } osg_ui.run_simple_button_app('Entries developer', actions)
def special_ops(self): # need entries loaded if not self.entries: print('entries not yet loaded') return for entry in self.entries: for developer in entry.get('Developer', []): if developer.comment: print('{:<25} - {:<25} - {}'.format( entry['File'], developer.value, developer.comment)) if __name__ == "__main__": m = DevelopersMaintainer() actions = { 'Read developers': m.read_developer, 'Write developers': m.write_developer, 'Check for duplicates': m.check_for_duplicates, 'Check for orphans': m.check_for_orphans, 'Check for games in developers not listed': m.check_for_missing_developers_in_entries, 'Update developers from entries': m.update_developers_from_entries, 'Special': m.special_ops, 'Read entries': m.read_entries } osg_ui.run_simple_button_app('Maintenance developer', actions)
inspiration = inspiration.value if inspiration in self.inspirations: self.inspirations[inspiration]['Inspired entries'].append(entry_name) else: self.inspirations[inspiration] = {'Name': inspiration, 'Inspired entries': [entry_name]} print('inspired entries updated') def read_entries(self): self.entries = osg.read_entries() print('{} entries read'.format(len(self.entries))) if __name__ == "__main__": m = InspirationMaintainer() actions = { 'Read inspirations': m.read_inspirations, 'Write inspirations': m.write_inspirations, 'Check for duplicates': m.check_for_duplicates, 'Check for orphans': m.check_for_orphans, 'Check for inspirations not listed': m.check_for_missing_inspirations_in_entries, 'Update inspirations from entries': m.update_inspired_entries, 'Read entries': m.read_entries } osg_ui.run_simple_button_app('Maintenance inspirations', actions)