Board Thread:Support Requests - Getting Technical/@comment-188432-20130624203859/@comment-188432-20130626142722

Hairr wrote: Oh! I was assuming you were using pywikipedia within a personal script (using it as a client) and not one of the default scripts. Knowing this, I'm unaware of anyway using just regex on the command line. We're talking at cross purposes. The solution I'm looking for is not a simple command line switcheroo. That obviously doesn't offer the complexity necessary for the job. I'm using fixes stored in user-fixes.py and called by replace.py. But what you've given doesn't at all look like anything I've ever seen in a user-fix. Normally, the format of user-fixes is just:
 * r'whatever needs to be changed', r'whatever you're changing it into'

An example of typical code format is:

fixes['spelling'] = { 'regex': True, 'recursive': True, 'msg': { 'en':u'Enforcing T:SPELL' },   'replacements': [ #AAAA# (r'([Aa])ccessoriz(.?)', r'\1ccessoris\2'), (r'([Aa])cclimitiz(.?)',r'\1cclimatis\2'), (r'([Aa])ccouterments',r'\1ccoutrements'), (r'( +)eon( +)',r'\1aeon\2'), (r'( +)eons( +)',r'\1aeons\2'), (r'([Aa])erogram( +)',r'\1erogramme\2'), (r'([Aa])erograms',r'\1erogrammes'), (r'( +)esthete(.?)( +)',r'\1aesthete\2\3'), (r'( +)esthetic(.?)( +)',r'\1aesthetic\2\3'), (u'( +)etiology',u'\1aetiology'), (r'( +)aging',r'\1ageing'), (r'([Dd])e(.?)aging',r'\1e\2ageing'), (r'([Aa])ggrandizement',r'\1ggrandisement'),

…etc…

That doesn't mean that your code couldn't somehow be made to work in this fix format. I'm just saying it looks more like the format that replace.py itself is in, and not one of these user-created fixes that's called by replace.py.