Page MenuHomePhabricator

Implement a way to show those pagegenerators options which are enabled
Open, MediumPublic

Description

Introduction

pagegenerators.GeneratorFactory has two new options enabled_options and disabled_options to enable a subset of all predefinded pgegenerators options within a script. Find a way to show only those options with -help which are activated, probably by parsing parameterHelp and giving up docuReplacements and pass "-help" to GeneratorFactory.handle_arg() method.

Implementation Idea

  • create parser for pagegenerators.doc to split options and descriptions into parts. each option should be a key in a dict and the description as ist value.
  • find a solution for this parser if multiple key point to the same description
  • find a method to combine the wanted options when bot.show_help tries to show the help string. Maybe https://gerrit.wikimedia.org/r/c/pywikibot/core/+/166965 can give some ideas

Event Timeline

Xqt triaged this task as Medium priority.Feb 3 2021, 10:27 AM

I'd like to submit a patch for this task. May I please work on it, @Xqt?

You may but is not easy to solve. Do you have an idea?