pywikitools.resourcesbot.write_summary#

Module Contents#

Classes#

WriteSummary

Write/update global status report with an overview over the translation progress in all languages:

class pywikitools.resourcesbot.write_summary.WriteSummary(site: pywikibot.site.APISite, *, force_rewrite: bool = False)#

Bases: pywikitools.resourcesbot.post_processing.GlobalPostProcessor

Write/update global status report with an overview over the translation progress in all languages:

How many worksheets are finished and how many of them are outdated? How many translations are finished but PDFs are missing? How many unfinished / very outdated translations do we have?

This is a summary of all the language reports written by WriteReport. It will be written to https://www.4training.net/4training:Summary - see also there for more explanations

run(self, language_data: Dict[str, pywikitools.resourcesbot.data_structures.LanguageInfo], changes: Dict[str, pywikitools.resourcesbot.changes.ChangeLog])#

Entry function

save_summary(self, language_data: Dict[str, pywikitools.resourcesbot.data_structures.LanguageInfo])#

Saving the summary report (URL: https://www.4training.net/4training:Summary)

Parameters

language_data – All the details for all languages

create_mediawiki(self, language_data: Dict[str, pywikitools.resourcesbot.data_structures.LanguageInfo]) str#

Build mediawiki code for the complete summary page

create_language_overview(self, language_data: Dict[str, pywikitools.resourcesbot.data_structures.LanguageInfo]) str#

Create mediawiki code to display the whole language overview table

create_language_line(self, language_info: pywikitools.resourcesbot.data_structures.LanguageInfo, english_info: pywikitools.resourcesbot.data_structures.LanguageInfo, row_class: str = '') str#

Create mediawiki code with report for one language (one line of the overview)

Parameters

row_class – CSS class to apply for the whole row (used to exclude English row from sorting) See https://meta.wikimedia.org/wiki/Help:Sorting#Excluding_the_first_row_from_sorting