Code feasibility question
Hello, I have a code feasibility question. Let's say you have words (like those in the category "French verbs") each with a certain set of properties (in the form of categories, like 1st group, 2nd group, transitive, reflexive,...). Would there be an easy way to auto-generate a table of words×properties with a check when the combination is applicable?
Word | Property1 | Property2 | Property3 |
---|---|---|---|
word1 | x | x | |
word2 | x | ||
word3 | x | x |
This would basically require to iterate though the content of a category ("French verbs") and for each entry, iterate through the categories it belongs to ("1st group", "transitive"...). Thanks a lot for your help!
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.
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.
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!