Wikimedia Commons has categories, for instance https://commons.wikimedia.org/wiki/Category:Dogs
This category has sub-categories, and sub-sub-categories, etc.
I want to get a list of all sub-categories.
Is there a tool to get this full list as text for the category of my choice?
Copying from the web interface is not realistic as there are too many arrows to click.
I am especially interested in Wikimedia Commons.
The API has a subcat
operation which gets sub-categories: https://commons.wikimedia.org/w/api.php?action=query&list=categorymembers&cmtype=subcat&cmtitle=Category:Dogs&format=json but I would prefer to use an existing tool rather than creating my own, especially given the probable edge cases such as infinite category loops.