Code feasibility question

Fragment of a discussion from User talk:Rua
Jump to navigation Jump to search

It's certainly possible, but not purely with anything the wiki software has. You'd need an external program written in a language such as Python (with the pywikibot module) that does the work for you.

CodeCat01:07, 4 October 2016

To be clear, you could either use one of the dump files ([1]- I'm not sure which one specifically has category membership information) or the API. There's not really any way to do it live- you would have to run a bot periodically.

DTLHS (talk)01:14, 4 October 2016
 

I see... If I understand correctly, the python bot would run from my machine.. I'm quite surprised to see that Lua or other module running server-side don't provide primitives for iterating through the content of a category or through the categories a page belongs to? Will look into that pywikibot, then. Thank you!

Julien Daux (talk)01:37, 4 October 2016

I think it may be because it adds the possibility of nondeterminism to modules. What if a module checks if the current page is in a category, and if it's not in the category, it adds the category, but if it's already in the category it doesn't add the category?

CodeCat12:49, 4 October 2016