Page MenuHomePhabricator

archivebot should allow to specify a wiki-wide set of default values for the marker template
Open, Needs TriagePublic

Description

It is common to use the same or similar set of values for the marker template of archivebot on a certain wiki. We could add an argument for the script to provide default values.

Option 1:

The new parameter (e.g. -defaults:filename.json) accepts a file path which points to a text file (maybe a JSON?) which gives pairs of parameter name and value like "minthreadsleft = 1". If a wiki community wants a new set of default values, they should ask the operator to update the file.

Option 2:

The new parameter (e.g. -defaults:MediaWiki:Archivebotconfig.json) accepts a wiki page title, not a local file on the server side. This is more flexible for the wiki community to update settings, and easier for the operator to live with. However, since there is a large potential for vandalism, we would want to put a restriction that only sysops can edit the page (e.g. limiting to the MediaWiki namespace). For further safety we might want to enforce hard upper/lower limits for certain values. (The same could be said to Option 1, but Option 2 seems to be more vulnerable.)

Perhaps we can implement both and let the operator and community choose.

Exactly what kind of structure and semantics the config file should have is open to discussion.

Event Timeline

whym created this task.Apr 10 2018, 3:09 PM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptApr 10 2018, 3:09 PM

I'd go with User:$botname/$configpage.json as I think it'd be easier for the bot operator to modify the archive settings, but I'm not opposed to a MediaWiki page either. Thanks.

whym updated the task description. (Show Details)May 1 2018, 12:57 AM