def Generate(self, projects, output_writer):
    self._GenerateSection(u'introduction.txt', {}, output_writer)

    versions_per_configuration = self._GetVersionsPerConfigurationFile(projects)
    versions_per_m4_script = self._GetVersionsPerM4Scripts(projects)
    versions_per_script = self._GetVersionsPerScripts(projects)

    projects_per_category = {}
    for project in projects:
      if project.category not in projects_per_category:
        projects_per_category[project.category] = []

      projects_per_category[project.category].append(project)

    table_of_contents = []

    table_of_contents.append(u'* [Configurations](Status#configurations)')
    for configuration in sorted(versions_per_configuration.keys()):
      configuration_reference = configuration.lower().replace(u'.', u'')
      table_of_contents.append(u'  * [{0:s}](Status#{1:s})'.format(
          configuration, configuration_reference))

    table_of_contents.append(u'* [Scripts](Status#scripts)')
    for script in sorted(versions_per_script.keys()):
      script_reference = script.lower().replace(u'.', u'')
      table_of_contents.append(u'  * [{0:s}](Status#{1:s})'.format(
          script, script_reference))

    table_of_contents.append(u'* [M4 scripts](Status#m4-scripts)')
    for m4_script in sorted(versions_per_m4_script.keys()):
      m4_script_reference = m4_script.lower().replace(u'.', u'')
      table_of_contents.append(u'  * [{0:s}](Status#{1:s})'.format(
          m4_script, m4_script_reference))

    # TODO: add version check for common.

    for category in self._ORDER_OF_LIBRARY_CATEGORIES:
      category_title = self._CATEGORIES[category][0]
      catergory_reference = category_title.lower().replace(u' ', u'-')
      table_of_contents.append(u'* [{0:s}](Status#{1:s})'.format(
          category_title, catergory_reference))

      for project in projects_per_category[category]:
        table_of_contents.append(u'  * [{0:s}](Status#{0:s})'.format(
            project.name))

    table_of_contents.append(u'')
    output_data = u'\n'.join(table_of_contents).encode(u'utf-8')
    output_writer.Write(output_data)

    template_mappings = {u'category_title': u'Configurations'}
    self._GenerateSection(u'category.txt', template_mappings, output_writer)

    for configuration, projects_per_version in sorted(
        versions_per_configuration.items()):
      template_mappings = {
          u'title': configuration,
      }
      self._GenerateSection(
          u'table_header.txt', template_mappings, output_writer)

      for version, project_names in sorted(
          projects_per_version.items(), reverse=True):
        project_names = self._FormatProjectNames(project_names)

        template_mappings = {
            u'project_names': project_names,
            u'version': version,
        }
        self._GenerateSection(
            u'table_entry.txt', template_mappings, output_writer)

    template_mappings = {u'category_title': u'Scripts'}
    self._GenerateSection(u'category.txt', template_mappings, output_writer)

    for script, projects_per_version in sorted(
        versions_per_script.items()):
      template_mappings = {
          u'title': script,
      }
      self._GenerateSection(
          u'table_header.txt', template_mappings, output_writer)

      for version, project_names in sorted(
          projects_per_version.items(), reverse=True):
        project_names = self._FormatProjectNames(project_names)

        template_mappings = {
            u'project_names': project_names,
            u'version': version,
        }
        self._GenerateSection(
            u'table_entry.txt', template_mappings, output_writer)

    template_mappings = {u'category_title': u'M4 scripts'}
    self._GenerateSection(u'category.txt', template_mappings, output_writer)

    for m4_script, projects_per_version in sorted(
        versions_per_m4_script.items()):
      template_mappings = {
          u'title': m4_script,
      }
      self._GenerateSection(
          u'table_header.txt', template_mappings, output_writer)

      for version, project_names in sorted(
          projects_per_version.items(), reverse=True):
        project_names = self._FormatProjectNames(project_names)

        template_mappings = {
            u'project_names': project_names,
            u'version': version,
        }
        self._GenerateSection(
            u'table_entry.txt', template_mappings, output_writer)

    # TODO: sort by groups.
    for category in self._ORDER_OF_LIBRARY_CATEGORIES:
      template_mappings = {
          u'category_title': self._CATEGORIES[category][0],
      }
      self._GenerateSection(u'category.txt', template_mappings, output_writer)

      versions_per_library = self._GetVersionsPerLibrary(projects, category)
      for library, projects_per_version in sorted(
          versions_per_library.items()):
        template_mappings = {
            u'title': library,
        }
        self._GenerateSection(
            u'table_header.txt', template_mappings, output_writer)

        for version, project_names in sorted(
            projects_per_version.items(), reverse=True):
          project_names = self._FormatProjectNames(project_names)

          template_mappings = {
              u'project_names': project_names,
              u'version': version,
          }
          self._GenerateSection(
              u'table_entry.txt', template_mappings, output_writer)
Generates a wiki page.
dataset/ETHPy150Open libyal/libyal/scripts/overview-generate.py/StatusWikiPageGenerator.Generate