Page MenuHomePhabricator

Ability to archive a section based on a template status, additional to age
Open, HighPublic

Description

To extend the use of this script, it would be useful if archivebot.py was able to detect and act on the status of a template to determine whether a section can be archived.

For example for stewards, could get archiving based on certain parameters set in [[m:Template:Status]]; similarly [[m:Spam blacklist]] could archive posts based on the available resolution states used there. So I am thinking that there could be the ability to set an additional parameter that reads the template name, and have the states of the template that would allow archiving (either as part of the parameter or as an additional parameter), and still based on the age algorithm.

Thanks for your consideration of this suggestion.


Tentative specification:

The algo parameter currently accepts the syntax "algo = old(30d)" only. It could be enhanced to accept more complex arguments to support templates indicating the status of the thread.

One natural way to support it would be to accept the two kinds of conditions by introducing logical operators. For example, it could be something like "algo = old(30d) OR marked(done) OR marked(not done)" where "marked(done)" means that threads with a template called {{done}} should be archived even if it's not old enough.

Details

Reference
bz70249

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:41 AM
bzimport set Reference to bz70249.
bzimport added a subscriber: Unknown Object (????).
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 28 2015, 12:15 PM
Dalba added a subscriber: Dalba.Nov 28 2015, 12:15 PM
revi added a subscriber: revi.Mar 30 2016, 6:37 PM

I would also welcome such a change, along with T119791. I think archivebot.py should be working more like SpBot, which allows different leveling of archives and early archival of threads marked with certain template. Thanks.

whym added subscribers: Euku, whym.Sep 19 2016, 10:14 AM

I wonder if @Euku (developer of SpBot) can contribute to archivebot.py, or at least publish SpBot's source code so that we can reuse/learn from it.

binbot added a subscriber: binbot.Sep 19 2016, 10:26 AM

Hungarian Wikipedia uses this template to prevent the section being archived even if expired:
https://hu.wikipedia.org/wiki/Sablon:F%C3%BCgg%C5%91ben
It may have a parameter.
Currently we use an individual workaround for that, but we woluld like to do this with the framework.

The modified Hungarian script's code is available on Tool Labs: https://tools.wmflabs.org/ato/archivebot_hu.py.txt

Mpaa added a subscriber: Mpaa.Sep 29 2016, 8:57 PM

@Tacsipacsi, you can submit a patch.
Ideally, the template should be generic and configurable somehow.

This will be useful for noticeboards that records requests that ought not be archived until it have been actioned. That is, do not archive this section until {{done}} or {{not done}} is there. I wonder if we can raise the priority on this one or have another group of people (Community-Tech?) giving a hand here. Thanks.

Euku removed a subscriber: Euku.Sep 24 2017, 4:37 PM
MarcoAurelio added subscribers: Xqt, valhallasw.EditedNov 22 2017, 9:57 AM

@Xqt @valhallasw Is this task eligible for Google-Code-in-2017? If so, would you like to mentor it?

Ping also @jayvdb and @Legoktm as they're registered in the MediaWiki GCI page.

Being bold and proposing this for GCI.

[ removing Google-Code-in-2017 as this is not under good first bug either and as nobody volunteered for mentoring ]

whym updated the task description. (Show Details)Apr 8 2018, 1:42 AM

I added some details into the description which might help people implement this idea.

binbot added a comment.EditedApr 8 2018, 5:45 AM

Please consider that

  • {{done}} or any similar template may have parameters (at least |~~~~)
  • some delay may be neccessary and should be implemented (we don't want people to mark sections as done at 2:00 am and the bot to archive them at 3:00 am before anybody could have seen the changes). I think it So "algo = old(30d) OR marked(done|2d) would be better (where | is not neccessarily the best choice for separator character)
  • {{done}} or any similar template also may appear in an inactive position (HTML comment, nowiki, quoting template etc.).
whym added a comment.Apr 8 2018, 11:08 AM
  • some delay may be neccessary and should be implemented (we don't want people to mark sections as done at 2:00 am and the bot to archive them at 3:00 am before anybody could have seen the changes). I think it So "algo = old(30d) OR marked(done|2d) would be better (where | is not neccessarily the best choice for separator character)

One way to do that might be "algo = old(30d) OR (old(2d) AND (marked(done) OR marked(not done)))", if a parser is adequately implemented.

Allowing such a flexible syntax might be an overkill for the purpose of archivebot.py, though. It might be sufficient (and easier to implement) to support a more limited one.

The current huwiki system takes {{függőben}} into account on every talk page; I think this system should be kept (by storing a wiki default in the archivebot config).
@binbot The current code takes also “inactive” positions into account. (I don’t know whether it’s good or bad.)

whym added a comment.Apr 10 2018, 3:10 PM

@Tacsipacsi Do you think T191901 addresses that? Allowing to set a wiki-wide default setting sounds like a good idea, but a separate one.

If this task will mean that any local config replaces the defaults (which seems very likely for me), than not: most talk pages have the algo parameter set, which would override this setting. Maybe we shouldn’t store the config, but simply pass it using a command line argument, as the current method for getting the archive config page.

Hello. Was already a path for this task decided? Best regards.