Forum:How to mass move subpages to their own page with a bot

Hiya :) At w:c:tardis, we created a structure in one part of our forums where we'd have a subject (say, continuity in Doctor Who television episodes), and then had subpages branching off it for each individual episode of the program.  That was appropriate when these discussions were housed in one forum that had other discussions.  It allowed us to keep the discussion discretely pegged to a few pages, rather than swamping a shared forum with hundreds of individual pages.

Now, though, the feature got more popular than we originally expected, so we've moved these discussions into a forum of their own. And it would be better to strip these discussions off their parents.. Question is, how can I do that quickly? I've got a bot. And I'm pretty familiar with regex. But I can't quite grasp how to use movepages.py — other than by making a massive list of pairs, which will take some time to construct, given the hundreds of pages that need moving. The other thing is, the subpages never got categorised. Is there some way, even if maybe by CSS, to make subpages inherit the category of the parent?

If anyone out there has ever dealt with regex expressions to work on subpages, I'd be interested in hearing your comments. CzechOut 14:11, May 22, 2011 (UTC)