Looks like you're working within the existing regular expression and string methods. My citations bot has somewhat complex needs, so I've been looking at some powerful approaches to parsing. At the moment I think mxTextTools looks useful, with parsing.py being less applicable. However, as in my case it will be useful to parse much of WikiSyntax...has someone already looked at whether MediaWiki's parser can be accessed by pywikipedia tools?
Jason Y. Lee wrote:
I've been wondering about some kind of parser to add to the python wikipedia project such that it knows how to handle transwiki links as well as trans-interwiki links.