Page MenuHomePhabricator

Implement support of Extension:UrlShortener in PWB
Closed, ResolvedPublicFeature

Description

https://www.mediawiki.org/wiki/Extension:UrlShortener is not deployed on prod wikis, and usable on metawiki.

Event Timeline

@Framawiki: any idea what to do in this matter. I've no glue what supporting url shortener could mean for pwb.

@Framawiki: any idea what to do in this matter. I've no glue what supporting url shortener could mean for pwb.

Me neither. Should we implement just an API call, or add a function to textlib, or even produce some sort of script to shorten urls? What kind of job should Pywikibot do with urls?

I see at least adding a function in BasePage to produce a short url to that page. Maybe we can add something in textlib but I don't see what it is right now.

Change 505409 had a related patch set uploaded (by Framawiki; owner: Framawiki):
[pywikibot/core@master] Implement create_short_link function to use Extension:UrlShortener

https://gerrit.wikimedia.org/r/505409

To me shortening url to the page does not make much sense as it is quite short already. Currently it is used mainly for search results or Wikidata query results (which is an anoyingly long url usually)

Xqt triaged this task as Low priority.Apr 20 2019, 8:42 PM

To me shortening url to the page does not make much sense as it is quite short already.

Probably it could be useful for permanent links even though I don't see any application for yet. But anyway it is a library part and could be used by developers for their own script.

Xqt changed the subtype of this task from "Task" to "Feature Request".Apr 21 2019, 2:00 AM

Change 505409 merged by jenkins-bot:
[pywikibot/core@master] Implement create_short_link function to use Extension:UrlShortener

https://gerrit.wikimedia.org/r/505409

Change 505461 had a related patch set uploaded (by Framawiki; owner: Framawiki):
[pywikibot/core@master] [TEST] add tests for new create_short_link()

https://gerrit.wikimedia.org/r/505461

Change 505461 merged by jenkins-bot:
[pywikibot/core@master] [TEST] add tests for new create_short_link()

https://gerrit.wikimedia.org/r/505461