Several hours ago, I wrote, in part:
> the following user-fixes.py :I've taken the advice I've gotten on-list, but the script still
>
> def homophix(match):
> return re.sub(r'(\{\{homophones\|)([^}=]*\}\})',
> r'\1lang={{subst:langrev|'+re.escape(match.group(1))+r'}}|\2',
> match.group(0)
> )
>
> fixes['homophones'] = {
> 'regex': True,
> 'msg': {'_default':u'add lang to homophones'},
> 'replacements': [
> (ur'^==([a-zA-Z ]+)==\n+(?:(?:===|[^=]).*\n+)*', homophix)
> ]
> }
>
> ...which I then tried to call using
> python replace.py -fix:homophones -page:accapare
>
> (Note that [[wikt:en:accapare]] has {{homophones|...}} without = .)
>
> Python told me:
> No changes were necessary in [[accapare]]
> 0 pages were changed.
>
> So I guess it's either not matching or not replacing.
>
> What am I doing wrong?
>
> And what can I do instead?
doesn't work. I'd appreciate any further ideas.
Thanks,
Michael Hamm
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l