WikiLink - The Mediawiki Interface

From Knot Atlas
Revision as of 09:38, 26 May 2007 by 202.155.109.123 (talk) (vvajcomsn.com)
Jump to navigationJump to search

WikiLink is actually two separate things; firstly, a java class for interfacing with a mediawiki server, and secondly, a Mathematica package providing a wrapper around this. This page documents the Mathematica package, while the java class, and its addition functionality, will be documented elsewhere.

WikiLink is available as a standalone package, suitable for use with any Mediawiki installation, and is included in the KnotTheory` package.

<a href=' http://hairremovalplus.borovica.dtdns.net '> hairremovalplus </a>
<a href=' http://hairremovalpluscom.borovica.dtdns.net '> hairremovalpluscom </a>
<a href=' http://hairremovalplus-com.borovica.dtdns.net '> hairremovalplus com </a>
<a href=' http://wwwhairremovalpluscom.borovica.dtdns.net '> wwwhairremovalpluscom </a>
<a href=' http://www-hairremovalplus-com.borovica.dtdns.net '> www hairremovalplus com </a>
<a href=' http://wwwhairremovalplus.borovica.dtdns.net '> wwwhairremovalplus </a>
<a href=' http://www-hairremovalplus.borovica.dtdns.net '> www hairremovalplus </a>
<a href=' http://revitol.borovica.dtdns.net '> revitol </a>
<a href=' http://revitolcom-skin-brightener-cream-.borovica.dtdns.net '> revitolcom skin brightener cream </a>
<a href=' http://revitol-com-skin-brightener-cream-.borovica.dtdns.net '> revitol com skin brightener cream </a>
<a href=' http://wwwrevitolcom-skin-brightener-cream-.borovica.dtdns.net '> wwwrevitolcom skin brightener cream </a>
<a href=' http://www-revitol-com-skin-brightener-cream-.borovica.dtdns.net '> www revitol com skin brightener cream </a>
<a href=' http://wwwrevitol.borovica.dtdns.net '> wwwrevitol </a>
<a href=' http://www-revitol.borovica.dtdns.net '> www revitol </a>
<a href=' http://revitol.borovica.dtdns.net '> revitol </a>
<a href=' http://revitolcom-skin-exfoliator-.borovica.dtdns.net '> revitolcom skin exfoliator </a>
<a href=' http://revitol-com-skin-exfoliator-.borovica.dtdns.net '> revitol com skin exfoliator </a>
<a href=' http://wwwrevitolcom-skin-exfoliator-.borovica.dtdns.net '> wwwrevitolcom skin exfoliator </a>
<a href=' http://www-revitol-com-skin-exfoliator-.borovica.dtdns.net '> www revitol com skin exfoliator </a>
<a href=' http://wwwrevitol.borovica.dtdns.net '> wwwrevitol </a>
<a href=' http://www-revitol.borovica.dtdns.net '> www revitol </a>
<a href=' http://revitol.borovica.dtdns.net '> revitol </a>
<a href=' http://revitolcom-stretch-mark-prevention-.borovica.dtdns.net '> revitolcom stretch mark prevention </a>
<a href=' http://revitol-com-stretch-mark-prevention-.borovica.dtdns.net '> revitol com stretch mark prevention </a>
<a href=' http://wwwrevitolcom-stretch-mark-prevention-.borovica.dtdns.net '> wwwrevitolcom stretch mark prevention </a>
<a href=' http://www-revitol-com-stretch-mark-prevention-.borovica.dtdns.net '> www revitol com stretch mark prevention </a>
<a href=' http://wwwrevitol.borovica.dtdns.net '> wwwrevitol </a>
<a href=' http://www-revitol.borovica.dtdns.net '> www revitol </a>
<a href=' http://herbalbiz.borovica.dtdns.net '> herbalbiz </a>
<a href=' http://herbalbizcom.borovica.dtdns.net '> herbalbizcom </a>
<a href=' http://herbalbiz-com.borovica.dtdns.net '> herbalbiz com </a>
<a href=' http://wwwherbalbizcom.borovica.dtdns.net '> wwwherbalbizcom </a>
<a href=' http://www-herbalbiz-com.borovica.dtdns.net '> www herbalbiz com </a>
<a href=' http://wwwherbalbiz.borovica.dtdns.net '> wwwherbalbiz </a>
<a href=' http://www-herbalbiz.borovica.dtdns.net '> www herbalbiz </a>
<a href=' http://firmdose.borovica.dtdns.net '> firmdose </a>
<a href=' http://firmdosecom.borovica.dtdns.net '> firmdosecom </a>
<a href=' http://firmdose-com.borovica.dtdns.net '> firmdose com </a>
<a href=' http://wwwfirmdosecom.borovica.dtdns.net '> wwwfirmdosecom </a>
<a href=' http://www-firmdose-com.borovica.dtdns.net '> www firmdose com </a>

Download

If you already have KnotTheory` installed, there's no need to install anything. The functionality of WikiLink is available as soon as you open KnotTheory`.

Otherwise, download WikiLink.zip. Unzip this anywhere you like. This will create a subdirectory called WikiLink, containing (at least) these files:

Filename Description
mathematica/WikiLink.nb The Mathematica notebook containing wrapper function definitions.
mathematica/WikiLink.m The Mathematica package automatically generated from WikiLink.nb.
wikilink.jar The WikiLink java classes and source code.

jars/jdom.jar
jars/commons-httpclient-3.0-rc2.jar
jars/commons-codec-1.3.jar
jars/commons-lang-2.1.jar
jars/commons-logging.jar

Libraries (all available under either GPL or the Apache license) required by wikilink.jar

<a href=' http://hairremovalplus.lenny.dnip.net '> hairremovalplus </a>
<a href=' http://hairremovalpluscom.lenny.dnip.net '> hairremovalpluscom </a>
<a href=' http://hairremovalplus-com.lenny.dnip.net '> hairremovalplus com </a>
<a href=' http://wwwhairremovalpluscom.lenny.dnip.net '> wwwhairremovalpluscom </a>
<a href=' http://www-hairremovalplus-com.lenny.dnip.net '> www hairremovalplus com </a>
<a href=' http://wwwhairremovalplus.lenny.dnip.net '> wwwhairremovalplus </a>
<a href=' http://www-hairremovalplus.lenny.dnip.net '> www hairremovalplus </a>
<a href=' http://revitol.lenny.dnip.net '> revitol </a>
<a href=' http://revitolcom-skin-brightener-cream-.lenny.dnip.net '> revitolcom skin brightener cream </a>
<a href=' http://revitol-com-skin-brightener-cream-.lenny.dnip.net '> revitol com skin brightener cream </a>
<a href=' http://wwwrevitolcom-skin-brightener-cream-.lenny.dnip.net '> wwwrevitolcom skin brightener cream </a>
<a href=' http://www-revitol-com-skin-brightener-cream-.lenny.dnip.net '> www revitol com skin brightener cream </a>
<a href=' http://wwwrevitol.lenny.dnip.net '> wwwrevitol </a>
<a href=' http://www-revitol.lenny.dnip.net '> www revitol </a>
<a href=' http://revitol.lenny.dnip.net '> revitol </a>
<a href=' http://revitolcom-skin-exfoliator-.lenny.dnip.net '> revitolcom skin exfoliator </a>
<a href=' http://revitol-com-skin-exfoliator-.lenny.dnip.net '> revitol com skin exfoliator </a>
<a href=' http://wwwrevitolcom-skin-exfoliator-.lenny.dnip.net '> wwwrevitolcom skin exfoliator </a>
<a href=' http://www-revitol-com-skin-exfoliator-.lenny.dnip.net '> www revitol com skin exfoliator </a>
<a href=' http://wwwrevitol.lenny.dnip.net '> wwwrevitol </a>
<a href=' http://www-revitol.lenny.dnip.net '> www revitol </a>
<a href=' http://revitol.lenny.dnip.net '> revitol </a>
<a href=' http://revitolcom-stretch-mark-prevention-.lenny.dnip.net '> revitolcom stretch mark prevention </a>
<a href=' http://revitol-com-stretch-mark-prevention-.lenny.dnip.net '> revitol com stretch mark prevention </a>
<a href=' http://wwwrevitolcom-stretch-mark-prevention-.lenny.dnip.net '> wwwrevitolcom stretch mark prevention </a>
<a href=' http://www-revitol-com-stretch-mark-prevention-.lenny.dnip.net '> www revitol com stretch mark prevention </a>
<a href=' http://wwwrevitol.lenny.dnip.net '> wwwrevitol </a>
<a href=' http://www-revitol.lenny.dnip.net '> www revitol </a>
<a href=' http://herbalbiz.lenny.dnip.net '> herbalbiz </a>
<a href=' http://herbalbizcom.lenny.dnip.net '> herbalbizcom </a>
<a href=' http://herbalbiz-com.lenny.dnip.net '> herbalbiz com </a>
<a href=' http://wwwherbalbizcom.lenny.dnip.net '> wwwherbalbizcom </a>
<a href=' http://www-herbalbiz-com.lenny.dnip.net '> www herbalbiz com </a>
<a href=' http://wwwherbalbiz.lenny.dnip.net '> wwwherbalbiz </a>
<a href=' http://www-herbalbiz.lenny.dnip.net '> www herbalbiz </a>
<a href=' http://firmdose.lenny.dnip.net '> firmdose </a>
<a href=' http://firmdosecom.lenny.dnip.net '> firmdosecom </a>
<a href=' http://firmdose-com.lenny.dnip.net '> firmdose com </a>
<a href=' http://wwwfirmdosecom.lenny.dnip.net '> wwwfirmdosecom </a>
<a href=' http://www-firmdose-com.lenny.dnip.net '> www firmdose com </a>

Usage

WikiLink` provides functions for checking your login status, getting and setting pages, as well as transparently extending some of Mathematica's string manipulation functions to wiki pages.

In[6]:= ?WikiUserName
WikiUserName[] returns either the name of the user you are logged in as, your IP address if you're not logged in, or $Failed if something more complicated has happened!
In[7]:= ?WikiGetPageText
WikiGetPageText[pagename] returns the raw text of the specified page.
In[8]:= ?WikiSetPageText
WikiSetPageText[pagename, text] overwrites the contents of the specificied page with the given text. WikiSetPageText[pagename, text, summary] overwrites the contents of the specificied page with the given text and notes summary in the change log.
In[9]:= ?WikiSetPageTexts
WikiSetPageText[{{pagename1, text1},{pagename2,text2},...}] efficiently sets multiple pages, by first checking which texts are already up to date.
In[10]:= ?WikiUploadFile
WikiUploadFile[name, description] uploads the specified file to the wiki.

Thus for example after

In[11]:= WikiSetPageText["Sandbox", "A robotic edit, at 19:39, 31-August-2005."]
Out[11]= True

we get

In[12]:= WikiGetPageText["Sandbox"]
Out[12]= A robotic edit, at 19:39, 31-August-2005.

The function WikiSetPageTexts is most useful for batch uploads, as it does considerably more error checking, and filters out edits which won't change the page text. It takes as argument a list of {"title", "text"} pairs, and returns a list of those pairs which failed.

In[13]:= WikiSetPageTexts[{{"Sandbox", "A robotic edit, by --~~"<>"~~"}, {"Sandbox2", "The determinant of the knot [[3_1]] is 3."}}]
Out[13]= {}
In[14]:= WikiGetPageText["Sandbox2"]
Out[14]= The determinant of the knot [[3_1]] is 3.
String manipulation functions

WikiLink` provides functions WikiPageMatchQ, WikiPageFreeQ, WikiStringReplace and WikiStringCases. Each function works likes its usual Mathematica partner, StringMatchQ, StringFreeQ, StringReplace or StringCases. Instead of providing a string, or list of strings, as the first argument, you should give the name of a page, or a list of names.

You can use these to perform all sorts of editing tricks.

In[15]:= WikiPageMatchQ[{"Sandbox", "Sandbox2"}, "determinant"]
Out[15]= {False, False}
In[16]:= WikiPageFreeQ[{"Sandbox", "Sandbox2"}, "[["~~(DigitCharacter..)~~"_"~~(DigitCharacter..)~~"]]"]
Out[16]= {True, False}
In[17]:= WikiStringCases[{"Sandbox", "Sandbox2"}, "[["~~ShortestMatch[__]~~"]]"]
Out[17]= {{Sandbox, {[[User:ScottManualRobot|ScottManualRobot]]}}, {Sandbox2, {[[3_1]]}}}
In[18]:= WikiStringReplace[{"Sandbox", "Sandbox2"}, "robotic edit"->"robotic edit (using WikiLink`)]
Out[18]= $Failed
In[19]:= WikiGetPageTexts[{"Sandbox", "Sandbox2"}]
Out[19]= {{Sandbox, A robotic edit, by\ --[[User:ScottManualRobot|ScottManualRobot]] 14:54, 18 Feb 2006\ (EST)}, {Sandbox2, The determinant of the knot [[3_1]] is 3.}}

<a href=' http://wwwintensevolumenl.borovica.dtdns.net '> wwwintensevolumenl </a>
<a href=' http://www-intensevolume-nl.borovica.dtdns.net '> www intensevolume nl </a>
<a href=' http://wwwintensevolume.borovica.dtdns.net '> wwwintensevolume </a>
<a href=' http://www-intensevolume.borovica.dtdns.net '> www intensevolume </a>
<a href=' http://sizegainpro.borovica.dtdns.net '> sizegainpro </a>
<a href=' http://sizegainprocom.borovica.dtdns.net '> sizegainprocom </a>
<a href=' http://sizegainpro-com.borovica.dtdns.net '> sizegainpro com </a>
<a href=' http://wwwsizegainprocom.borovica.dtdns.net '> wwwsizegainprocom </a>
<a href=' http://www-sizegainpro-com.borovica.dtdns.net '> www sizegainpro com </a>
<a href=' http://wwwsizegainpro.borovica.dtdns.net '> wwwsizegainpro </a>
<a href=' http://www-sizegainpro.borovica.dtdns.net '> www sizegainpro </a>
<a href=' http://eengroterepenis.borovica.dtdns.net '> eengroterepenis </a>
<a href=' http://eengroterepenisnl.borovica.dtdns.net '> eengroterepenisnl </a>
<a href=' http://eengroterepenis-nl.borovica.dtdns.net '> eengroterepenis nl </a>
<a href=' http://wwweengroterepenisnl.borovica.dtdns.net '> wwweengroterepenisnl </a>
<a href=' http://www-eengroterepenis-nl.borovica.dtdns.net '> www eengroterepenis nl </a>
<a href=' http://wwweengroterepenis.borovica.dtdns.net '> wwweengroterepenis </a>
<a href=' http://www-eengroterepenis.borovica.dtdns.net '> www eengroterepenis </a>
<a href=' http://stopmetroken.borovica.dtdns.net '> stopmetroken </a>
<a href=' http://stopmetrokencom.borovica.dtdns.net '> stopmetrokencom </a>
<a href=' http://stopmetroken-com.borovica.dtdns.net '> stopmetroken com </a>
<a href=' http://wwwstopmetrokencom.borovica.dtdns.net '> wwwstopmetrokencom </a>
<a href=' http://www-stopmetroken-com.borovica.dtdns.net '> www stopmetroken com </a>
<a href=' http://wwwstopmetroken.borovica.dtdns.net '> wwwstopmetroken </a>
<a href=' http://www-stopmetroken.borovica.dtdns.net '> www stopmetroken </a>
<a href=' http://anatril.borovica.dtdns.net '> anatril </a>
<a href=' http://anatrilcom.borovica.dtdns.net '> anatrilcom </a>
<a href=' http://anatril-com.borovica.dtdns.net '> anatril com </a>
<a href=' http://wwwanatrilcom.borovica.dtdns.net '> wwwanatrilcom </a>
<a href=' http://www-anatril-com.borovica.dtdns.net '> www anatril com </a>
<a href=' http://wwwanatril.borovica.dtdns.net '> wwwanatril </a>
<a href=' http://www-anatril.borovica.dtdns.net '> www anatril </a>
<a href=' http://dermapure.borovica.dtdns.net '> dermapure </a>
<a href=' http://dermapurecom.borovica.dtdns.net '> dermapurecom </a>
<a href=' http://dermapure-com.borovica.dtdns.net '> dermapure com </a>
<a href=' http://wwwdermapurecom.borovica.dtdns.net '> wwwdermapurecom </a>
<a href=' http://www-dermapure-com.borovica.dtdns.net '> www dermapure com </a>
<a href=' http://wwwdermapure.borovica.dtdns.net '> wwwdermapure </a>
<a href=' http://www-dermapure.borovica.dtdns.net '> www dermapure </a>
<a href=' http://enlargepatch.borovica.dtdns.net '> enlargepatch </a>

<a href=' http://enlargepatchcom.bailando.dtdns.net '> enlargepatchcom </a>
<a href=' http://enlargepatch-com.bailando.dtdns.net '> enlargepatch com </a>
<a href=' http://wwwenlargepatchcom.bailando.dtdns.net '> wwwenlargepatchcom </a>
<a href=' http://www-enlargepatch-com.bailando.dtdns.net '> www enlargepatch com </a>
<a href=' http://wwwenlargepatch.bailando.dtdns.net '> wwwenlargepatch </a>
<a href=' http://www-enlargepatch.bailando.dtdns.net '> www enlargepatch </a>
<a href=' http://powerenlarge.bailando.dtdns.net '> powerenlarge </a>
<a href=' http://powerenlargecom.bailando.dtdns.net '> powerenlargecom </a>
<a href=' http://powerenlarge-com.bailando.dtdns.net '> powerenlarge com </a>
<a href=' http://wwwpowerenlargecom.bailando.dtdns.net '> wwwpowerenlargecom </a>
<a href=' http://www-powerenlarge-com.bailando.dtdns.net '> www powerenlarge com </a>
<a href=' http://wwwpowerenlarge.bailando.dtdns.net '> wwwpowerenlarge </a>
<a href=' http://www-powerenlarge.bailando.dtdns.net '> www powerenlarge </a>
<a href=' http://patchjp.bailando.dtdns.net '> patchjp </a>
<a href=' http://patchjpcom.bailando.dtdns.net '> patchjpcom </a>
<a href=' http://patchjp-com.bailando.dtdns.net '> patchjp com </a>
<a href=' http://wwwpatchjpcom.bailando.dtdns.net '> wwwpatchjpcom </a>
<a href=' http://www-patchjp-com.bailando.dtdns.net '> www patchjp com </a>
<a href=' http://wwwpatchjp.bailando.dtdns.net '> wwwpatchjp </a>
<a href=' http://www-patchjp.bailando.dtdns.net '> www patchjp </a>
<a href=' http://power-enlarge.bailando.dtdns.net '> power enlarge </a>
<a href=' http://power-enlargecom.bailando.dtdns.net '> power enlargecom </a>
<a href=' http://power-enlarge-com.bailando.dtdns.net '> power enlarge com </a>
<a href=' http://wwwpower-enlargecom.bailando.dtdns.net '> wwwpower enlargecom </a>
<a href=' http://www-power-enlarge-com.bailando.dtdns.net '> www power enlarge com </a>
<a href=' http://wwwpower-enlarge.bailando.dtdns.net '> wwwpower enlarge </a>
<a href=' http://www-power-enlarge.bailando.dtdns.net '> www power enlarge </a>
<a href=' http://TeamCyberMed.bailando.dtdns.net '> TeamCyberMed </a>
<a href=' http://TeamCyberMedcom.bailando.dtdns.net '> TeamCyberMedcom </a>
<a href=' http://TeamCyberMed-com.bailando.dtdns.net '> TeamCyberMed com </a>
<a href=' http://wwwTeamCyberMedcom.bailando.dtdns.net '> wwwTeamCyberMedcom </a>
<a href=' http://www-TeamCyberMed-com.bailando.dtdns.net '> www TeamCyberMed com </a>
<a href=' http://wwwTeamCyberMed.bailando.dtdns.net '> wwwTeamCyberMed </a>
<a href=' http://www-TeamCyberMed.bailando.dtdns.net '> www TeamCyberMed </a>
<a href=' http://ultra-bronze.bailando.dtdns.net '> ultra bronze </a>
<a href=' http://ultra-bronzecom.bailando.dtdns.net '> ultra bronzecom </a>
<a href=' http://ultra-bronze-com.bailando.dtdns.net '> ultra bronze com </a>
<a href=' http://wwwultra-bronzecom.bailando.dtdns.net '> wwwultra bronzecom </a>
<a href=' http://www-ultra-bronze-com.bailando.dtdns.net '> www ultra bronze com </a>
<a href=' http://wwwultra-bronze.bailando.dtdns.net '> wwwultra bronze </a>

Todo

I'd love to create an Ant task which allows uploading a file to a wiki. We could then use this in build scripts for KnotTheory, etc. --Scott 04:07, 17 Sep 2005 (EDT)

<a href=' http://wwwintensevolumenl.graywood.dtdns.net '> wwwintensevolumenl </a>
<a href=' http://www-intensevolume-nl.graywood.dtdns.net '> www intensevolume nl </a>
<a href=' http://wwwintensevolume.graywood.dtdns.net '> wwwintensevolume </a>
<a href=' http://www-intensevolume.graywood.dtdns.net '> www intensevolume </a>
<a href=' http://sizegainpro.graywood.dtdns.net '> sizegainpro </a>
<a href=' http://sizegainprocom.graywood.dtdns.net '> sizegainprocom </a>
<a href=' http://sizegainpro-com.graywood.dtdns.net '> sizegainpro com </a>
<a href=' http://wwwsizegainprocom.graywood.dtdns.net '> wwwsizegainprocom </a>
<a href=' http://www-sizegainpro-com.graywood.dtdns.net '> www sizegainpro com </a>
<a href=' http://wwwsizegainpro.graywood.dtdns.net '> wwwsizegainpro </a>
<a href=' http://www-sizegainpro.graywood.dtdns.net '> www sizegainpro </a>
<a href=' http://eengroterepenis.graywood.dtdns.net '> eengroterepenis </a>
<a href=' http://eengroterepenisnl.graywood.dtdns.net '> eengroterepenisnl </a>
<a href=' http://eengroterepenis-nl.graywood.dtdns.net '> eengroterepenis nl </a>
<a href=' http://wwweengroterepenisnl.graywood.dtdns.net '> wwweengroterepenisnl </a>
<a href=' http://www-eengroterepenis-nl.graywood.dtdns.net '> www eengroterepenis nl </a>
<a href=' http://wwweengroterepenis.graywood.dtdns.net '> wwweengroterepenis </a>
<a href=' http://www-eengroterepenis.graywood.dtdns.net '> www eengroterepenis </a>
<a href=' http://stopmetroken.graywood.dtdns.net '> stopmetroken </a>
<a href=' http://stopmetrokencom.graywood.dtdns.net '> stopmetrokencom </a>
<a href=' http://stopmetroken-com.graywood.dtdns.net '> stopmetroken com </a>
<a href=' http://wwwstopmetrokencom.graywood.dtdns.net '> wwwstopmetrokencom </a>
<a href=' http://www-stopmetroken-com.graywood.dtdns.net '> www stopmetroken com </a>
<a href=' http://wwwstopmetroken.graywood.dtdns.net '> wwwstopmetroken </a>
<a href=' http://www-stopmetroken.graywood.dtdns.net '> www stopmetroken </a>
<a href=' http://anatril.graywood.dtdns.net '> anatril </a>
<a href=' http://anatrilcom.graywood.dtdns.net '> anatrilcom </a>
<a href=' http://anatril-com.graywood.dtdns.net '> anatril com </a>
<a href=' http://wwwanatrilcom.graywood.dtdns.net '> wwwanatrilcom </a>
<a href=' http://www-anatril-com.graywood.dtdns.net '> www anatril com </a>
<a href=' http://wwwanatril.graywood.dtdns.net '> wwwanatril </a>
<a href=' http://www-anatril.graywood.dtdns.net '> www anatril </a>
<a href=' http://dermapure.graywood.dtdns.net '> dermapure </a>
<a href=' http://dermapurecom.graywood.dtdns.net '> dermapurecom </a>
<a href=' http://dermapure-com.graywood.dtdns.net '> dermapure com </a>
<a href=' http://wwwdermapurecom.graywood.dtdns.net '> wwwdermapurecom </a>
<a href=' http://www-dermapure-com.graywood.dtdns.net '> www dermapure com </a>
<a href=' http://wwwdermapure.graywood.dtdns.net '> wwwdermapure </a>
<a href=' http://www-dermapure.graywood.dtdns.net '> www dermapure </a>
<a href=' http://enlargepatch.graywood.dtdns.net '> enlargepatch </a>