Page MenuHomePhabricator

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


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

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.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Aug 8 2022, 10:19 AM

A vote for the second option. AFAIK json pages are protected by default, so vandalism is not a real threat.

I think the script should be changes to derive from a ConfigParserbot first. It is much more easy to read settings from a file or a wikipage then.