Roy Smith <r...@panix.com> ezt írta (időpont: 2023. jan. 14., Szo, 19:15):
> Is there a way to recurse through a category, but excluding specific > sub-cats? For example, I want to find all the templates in > [[Category:People and person infobox templates]], except that I don't want > to recurse into [[Category:Styles infobox templates]]. > Idea 1: Create the list from the desired cat, then during iteration explicitly discard those having the string " Category:Styles infobox template" (not too elegant, and may be errors, e.g. when there is a space after :) Idea 2: Create sets of both category, then suntract: https://www.geeksforgeeks.org/python-set-difference/
_______________________________________________ pywikibot mailing list -- pywikibot@lists.wikimedia.org Public archives at https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/message/TQJNRTX75KD77H4N64JDFEA5MYIUUDN2/ To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org