Page MenuHomePhabricator

regexp functionality for -hint option
Closed, DeclinedPublic

Description

Originally from: http://sourceforge.net/p/pywikipediabot/feature-requests/187/
Reported by: Anonymous user
Created on: 2009-03-25 22:01:02
Subject: regexp functionality for -hint option
Original description:
it would be great if -hint option in interwiki.py bot could accept regular expressions. this can be helpful, e.g. if in one wiki the article is entitled "XXX, YYY" and the corresponding article in another wiki is "XXX \(YYY\)", or if titles differ in some letters and these differences are regular between languages.


Version: unspecified
Severity: enhancement
See Also:
https://sourceforge.net/p/pywikipediabot/feature-requests/187

Details

Reference
bz55089

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:19 AM
bzimport set Reference to bz55089.
bzimport added a subscriber: Unknown Object (????).

Interesting suggestion \(but I haven't looked at how to implement this -- yet\)

Do you have any actual application for this? Any such regular patterns between two different wikis that you already know?
That would be quite useful to provide some concrete examples here, to help potential devs =\)

The syntax might be similar to that used in replace.py. For example, to use English hint \(Abbeville, Alabama\) for the French article "Abbeville \(Alabama\)", the command might look something like: python interwiki.py -lang:fr -hint:en -regex ".+ \\\(.+\\\)" "\1, \2"

Xqt subscribed.

interwiki.py is used very rare yet. Feel free to reopen if you need it implemented.