Motivation
The FileImporter is reusing the config files of the CommonsHelper2. In order to disallow file moves with unsuitable licences, we need to parse the bad template and bad category sections.
Acceptance Criteria
- Given the correct config file for a file move candidate, parse out the names of templates and categories that should forbid the file move
- If the configfile does not contain the section (such as category or template) or the subsection bad, return an error message: The configuration file for your wiki (linking to the config file) does not contain enough info about <problem e.g. Category or Category/bad> to know if this file can be put on Commons.
Notes
- The names can be found in Categories/Bad and Templates/Bad in the config file
- Investigation with proof of concept was done in T193620. This should be done using the raw wikitext, an d parsing it with regex
- Needs trimming
- The end result is an array with a list of all the names