[Mediawiki-l] Bot for rewriting external links as wiki links?

David J. Biesack David.Biesack at sas.com
Mon May 21 16:41:34 UTC 2012


Is there a bot which will repair external URL coded links to the same wikinand rewrite them as wiki links?

For example, if MediaWikis were installed in www.example.com/wiki and pages contains
links using external link notation

  blah http://www.example.com/wiki/Some_page blah
  blah [http://www.example.com/wiki/Some_page some text] blah
  blah [http://www.example.com/wiki/Some_page#some_section some text] blah

then the "What links here" feature would not work because such links are not recognized.

The bot would replace those with wiki links:

 blah [[Some page]] blah
 blah [[Some page | some text]] blah
 blah [[Some page#some_section | some text]] blah or  blah {{there|some section|Some page | some text}} blah

In addition, if the link is to a section of the current page, i.e. on [[Some page]],
the second link would be updated as

 {{here|some section|some text}}

There may need to be some way to disable this (i.e. in help or project pages
that discuss link notation).

Alternatively, could Special:WhatLinksHere be "taught" to recognize the
wiki's own URL and count those links?

I looked at http://en.wikipedia.org/wiki/Category:Wikipedia_bots_by_purpose
but none of those categories seemed to match what I'm looking for.

thanks,
djb

-- 
David J. Biesack | Principal API Architect | SAS
@davidbiesack | 919-531-7771 | www.sas.com




More information about the MediaWiki-l mailing list