WikiLink - The Mediawiki Interface: Difference between revisions

From Knot Atlas
Jump to navigationJump to search
No edit summary
m (Reverted edit of 217.27.95.70, changed back to last version by Drorbn)
Line 1: Line 1:
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.
[http://www.hollins.edu/ubb/Forum32/HTML/000342.html tenuate online] [http://bugzilla.internet2.edu/attachment.cgi?id=750 free sonyericsson ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/PhillipRewers/licox.htm free motorola ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000319.html cyclobenzaprine online] [http://www.hollins.edu/ubb/Forum32/HTML/000295.html norco online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/JustinJonson/tokuny.htm cheap lortab] [http://www.hollins.edu/ubb/Forum32/HTML/000354.html cheap flexeril] [http://bugzilla.internet2.edu/attachment.cgi?id=752 tracfone ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000285.html cheap carisoprodol] [http://www.hollins.edu/ubb/Forum32/HTML/000299.html paxil] [http://dcc.syr.edu/dforum/message.asp?MessageID=49063 free qwest ringtones] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=249 tramadol online] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/sywexyc.htm levitra online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/RobertSmith/zexuc.htm didrex online] [http://www.hollins.edu/ubb/Forum32/HTML/000380.html punk ringtones] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/kite.htm online ultracet] [http://www.hollins.edu/ubb/Forum32/HTML/000311.html hydrocodone online] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=42 xenical online] [http://ist.greenville.edu/drupal/files/luho.html nokia ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SelmaJeremy/rufog.htm free sprint ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/JustinJonson/jujope.htm buy diethylpropion] [http://www.hollins.edu/ubb/Forum32/HTML/000294.html adipex online] [http://ccfl.unl.edu/twiki/pub/Main/PaulinePauline/roteryh.htm free polyphonic ringtones] [http://cyrusimap.web.cmu.edu/twiki/bin/view/Main/AndreaHolivel cialis online] [http://dcc.syr.edu/dforum/message.asp?MessageID=49016 ultram online] [http://www.hollins.edu/ubb/Forum32/HTML/000336.html clomid online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SelmaJeremy/hijosij.htm free sagem ringtones] [http://ist.greenville.edu/drupal/files/bigibe.html nextel ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=49027 alprazolam online] [http://www.hollins.edu/ubb/Forum32/HTML/000288.html cheap ultram] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/hicif.htm cheap alprazolam] [http://ccfl.unl.edu/twiki/pub/Main/PaulinePauline/sujy.htm free samsung ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=25 cheap viagra] [http://bugzilla.internet2.edu/attachment.cgi?id=735 motorola ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/AshleighRodriquez/jybuhi.htm viagra online] [http://dcc.syr.edu/dforum/message.asp?MessageID=48916 cheap phentermine] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=256 cheap ultram] [http://bugzilla.internet2.edu/attachment.cgi?id=760 diazepam online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/JustinJonson/xyhyj.htm rivotril online] [http://ccfl.unl.edu/twiki/pub/Main/SummersFrank/vuru.htm cheap ativan] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/hykidi.htm clonazepam online] [http://www.hollins.edu/ubb/Forum32/HTML/000281.html tramadol online] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=253 carisoprodol online] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=26 cheap meridia] [http://ist.greenville.edu/drupal/files/dydyse.html valium online] [http://ccfl.unl.edu/twiki/pub/Main/HermanHogg/rukexo.htm cheap zoloft] [http://ist.greenville.edu/drupal/files/kuxer.html cyclobenzaprine online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SelmaJeremy/cybo.htm free sonyericsson ringtones] [http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/nezyz.htm flexeril online] [http://ccfl.unl.edu/twiki/pub/Main/SummersFrank/lyfogo.htm xanax] [http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/wofo.htm free nokia ringtones] [http://grid.unimelb.edu.au/twiki/pub/Main/JamesMiller/sonuhop.htm valium online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/RobertSmith/pevesuz.htm wellbutrin online] [http://ccfl.unl.edu/twiki/pub/Main/HermanHogg/rypel.htm sildenafil online] [http://www.hollins.edu/ubb/Forum32/HTML/000339.html zoloft online] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=251 valium online] [http://www.hollins.edu/ubb/Forum32/HTML/000384.html midi ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000290.html cialis online] [http://bugzilla.internet2.edu/attachment.cgi?id=744 qwest ringtones] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=266 real ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/PhillipRewers/kino.htm free real ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SelmaJeremy/belizyl.htm polyphonic ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/PhillipRewers/dijuxoj.htm free tracfone ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000322.html ultracet online] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=28 cheap norco] [http://dcc.syr.edu/dforum/message.asp?MessageID=49072 polyphonic ringtones] [http://bugzilla.internet2.edu/attachment.cgi?id=732 buy levitra] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/woguked.htm ambien online] [http://www.hollins.edu/ubb/Forum32/HTML/000334.html cheap sildenafil] [http://www.hollins.edu/ubb/Forum32/HTML/000333.html prozac online] [http://ist.greenville.edu/drupal/files/rucod.html xanax online] [http://www.hollins.edu/ubb/Forum32/HTML/000343.html cheap ortho] [http://ist.greenville.edu/drupal/files/wypy.html free funny ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000296.html vicodin online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BilyKroft/koky.htm phentermine online] [http://bugzilla.internet2.edu/attachment.cgi?id=740 norco online] [http://ccfl.unl.edu/twiki/pub/Main/HermanHogg/figog.htm lortab online] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/kozu.htm cheap hydrocodone] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=24 cheap ativan] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/AshleighRodriquez/godufit.htm buy paxil] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SelmaJeremy/sevuv.htm free mono ringtones] [http://bugzilla.internet2.edu/attachment.cgi?id=755 valium] [http://grid.unimelb.edu.au/twiki/pub/Main/JamesMiller/sicofyr.htm tramadol online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BettySmith/kuvodoj.htm zoloft online] [http://dcc.syr.edu/dforum/message.asp?MessageID=49034 hydrocodone] [http://dcc.syr.edu/dforum/message.asp?MessageID=49022 cheap viagra] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BettySmith/niwupu.htm albuterol] [http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/gedenu.htm cheap rivotril] [http://ccfl.unl.edu/twiki/pub/Main/PaulinePauline/dyzoko.htm verizon ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000314.html lorazepam] [http://grid.unimelb.edu.au/twiki/pub/Main/JackLawson/rejyvob.htm viagra online] [http://www.hollins.edu/ubb/Forum32/HTML/000325.html didrex online] [http://ccfl.unl.edu/twiki/pub/Main/SummersFrank/kuzypuh.htm order phentermine] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SelmaJeremy/nofelyr.htm free cingular ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000389.html free ericsson ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=49077 free sony ericsson ringtones] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=267 motorola ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/JustinJonson/kuluc.htm buy zanaflex] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/JustinJonson/gekiw.htm cheap flexeril] [http://www.hollins.edu/ubb/Forum32/HTML/000369.html samsung ringtones] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=259 nokia ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=22 cheap diazepam] [http://www.hollins.edu/ubb/Forum32/HTML/000376.html free sonyericsson ringtones] [http://ist.greenville.edu/drupal/files/devowy.html lorazepam online] [http://ist.greenville.edu/drupal/files/role.html free real ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000351.html but rivotril] [http://www.hollins.edu/ubb/Forum32/HTML/000312.html buy ambien] [http://www.hollins.edu/ubb/Forum32/HTML/000337.html albuterol online] [http://dcc.syr.edu/dforum/message.asp?MessageID=49018 buy cialis] [http://dcc.syr.edu/dforum/message.asp?MessageID=49035 ambien online] [http://bugzilla.internet2.edu/attachment.cgi?id=746 sagem ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=49025 norco online] [http://ist.greenville.edu/drupal/files/puweso.html meridia online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/RobertSmith/cibedis.htm nexium online] [http://ccfl.unl.edu/twiki/pub/Main/PaulinePauline/zivy.htm free mono ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000352.html cheap hgh] [http://bugzilla.internet2.edu/attachment.cgi?id=754 cheap ultram] [http://ist.greenville.edu/drupal/files/ruwyze.html ativan online] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/linefej.htm wellbutrin online] [http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/rofev.htm free ringtones] [http://ist.greenville.edu/drupal/files/pobiwi.html diazepam online] [http://bugzilla.internet2.edu/attachment.cgi?id=751 sprint ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000345.html buy lortab] [http://grid.unimelb.edu.au/twiki/pub/Main/JamesMiller/bopogo.htm carisoprodol online] [http://dcc.syr.edu/dforum/message.asp?MessageID=49071 verizon ringtones] [http://ccfl.unl.edu/twiki/pub/Main/HermanHogg/relu.htm buy clomid] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/sifus.htm xenical online] [http://bugzilla.internet2.edu/attachment.cgi?id=759 order xanax] [http://www.hollins.edu/ubb/Forum32/HTML/000360.html free ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=43 wellbutrin online] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=15 carisoprodol online] [http://cyrusimap.web.cmu.edu/twiki/bin/view/Main/DikVolirev tracfone ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SherylDiu/popuxo.htm sharp ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000291.html ativan online] [http://ist.greenville.edu/drupal/files/covubi.html buy norco] [http://ccfl.unl.edu/twiki/pub/Main/PaulinePauline/wetule.htm free sony ericsson ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000362.html tracfone ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=49075 free sonyericsson ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=48901 cheap soma] [http://www.hollins.edu/ubb/Forum32/HTML/000293.html cheap meridia] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/JustinJonson/gelol.htm zyban online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/AshleighRodriquez/rigyse.htm clonazepam online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SelmaJeremy/kohe.htm music ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/RobertSmith/pybex.htm cheap cyclobenzaprine] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/AshleighRodriquez/pero.htm cheap ativan] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/huvixu.htm paxil online] [http://grid.unimelb.edu.au/twiki/pub/Main/JackLawson/nunuso.htm ativan online] [http://dcc.syr.edu/dforum/message.asp?MessageID=49046 cheap nexium] [http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/cohufyk.htm mp3 ringtones] [http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/vekorot.htm cheap hgh] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/RobertSmith/kuky.htm buy propecia] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=268 free samsung ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BettySmith/kyzefe.htm ortho] [http://ccfl.unl.edu/twiki/pub/Main/MarthaBell/wydyty.htm but zyban] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SherylDiu/gefu.htm free punk ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000340.html order lipitor] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SherylDiu/ruviti.htm free mtv ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000346.html vigrx online] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=41 lorazepam online] [http://cyrusimap.web.cmu.edu/twiki/bin/view/Main/RingoFloper buy fioricet] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/RobertSmith/tuju.htm lorazepam online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/SherylDiu/sypev.htm free cool ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=30 free qwest ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000289.html diazepam online] [http://ccfl.unl.edu/twiki/pub/Main/HermanHogg/kuhufid.htm tenuate online] [http://dcc.syr.edu/dforum/message.asp?MessageID=49028 cheap clonazepam] [http://dcc.syr.edu/dforum/message.asp?MessageID=49015 fioricet online] [http://bugzilla.internet2.edu/attachment.cgi?id=725 ativan online] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=36 clonazepam online] [http://ccfl.unl.edu/twiki/pub/Main/HermanHogg/zivesup.htm cheap propecia] [http://dcc.syr.edu/dforum/message.asp?MessageID=49061 free mp3 ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/RobertSmith/donyki.htm hydrocodone online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BilyKroft/hywi.htm carisoprodol online] [http://dcc.syr.edu/dforum/message.asp?MessageID=49051 didrex online] [http://www.hollins.edu/ubb/Forum32/HTML/000300.html levitra] [http://bugzilla.internet2.edu/attachment.cgi?id=738 free nextel ringtones] [http://www.hollins.edu/ubb/Forum32/HTML/000356.html zyban online] [http://bugzilla.internet2.edu/attachment.cgi?id=736 free mp3 ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=38 online levitra] [http://www.hollins.edu/ubb/Forum32/HTML/000341.html buy celexa] [http://grid.unimelb.edu.au/twiki/pub/Main/NoriJohn/rupo.htm tracfone ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=27 adipex online] [http://dcc.syr.edu/dforum/message.asp?MessageID=49056 free ringtones] [http://ccfl.unl.edu/twiki/pub/Main/PaulinePauline/wypo.htm music ringtones] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=29 free nextel ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=49054 nokia ringtones] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/AshleighRodriquez/putyh.htm cheap levitra] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/PhillipRewers/wozone.htm free ringtones] [http://dcc.syr.edu/dforum/message.asp?MessageID=49049 cheap propecia] [http://www.hollins.edu/ubb/Forum32/HTML/000320.html nexium online] [http://wwwx.cs.unc.edu/~kmp/twiki40/pub/Main/BilyKroft/piwyh.htm cialis] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=250 buy soma] [http://devel.linux.duke.edu/bugzilla/attachment.cgi?id=263 mp3 ringtones] [http://cyrusimap.web.cmu.edu/twiki/bin/view/Main/BillKukin tramadol online] [http://ist.greenville.edu/drupal/files/xuxuw.html phentermine online] [http://dcc.syr.edu/dforum/message.asp?MessageID=49059 funny ringtones] [http://ccfl.unl.edu/twiki/pub/Main/AlexCarneyham/zupu.htm nexium online] [http://www.hollins.edu/ubb/Forum32/HTML/000316.html wellbutrin online] [http://ccfl.unl.edu/twiki/pub/Main/SummersFrank/runuz.htm adipex online] [http://www.coe.unt.edu/chec/forum/forum_posts.asp?TID=23 cheap cialis] 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.
WikiLink is available as a standalone package, suitable for use with any Mediawiki installation, and is included in the [[KnotTheory`]] package.

Revision as of 20:23, 29 April 2007

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.

License

WikiLink.nb, WikiLink.m and wikilink.jar are copyright Scott Morrison, available under your choice of the MIT, Apache or GPL licenses. The other components are copyright by other parties, all available under the Apache license.

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

Importing the package in Mathematica

If you're not using KnotTheory`, first, you'll need to set some paths, so WikiLink` can find the java files it needs. You need to add the "mathematica/" subdirectory of the WikiLink distribution to the Mathematica $Path.

In[1]:= WikiLinkPath = "/path/to/WikiLink/mathematica/";
In[2]:= AppendTo[$Path, WikiLinkPath];
In[3]:= <<WikiLink`

If you've already loaded KnotTheory` (e.g., with the statement <<KnotTheory`), you can simply begin at this point.

We then try to connect to the wiki. Executing this line will prompt you for a username and password.

In[6]:= CreateWikiConnection[ "http://katlas.math.toronto.edu/w/index.php", InputString["Enter Your Username:"], InputString["Enter Your Password:"] ]

The function WikiUserName[] checks that we're logged in

In[4]:= ?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[5]:= WikiUserName[]
Out[5]= ScottManualRobot

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.}}

Troubleshooting

The instruction ShowJavaConsole[] will bring up a window in which some debugging information is displayed.

Compatibility

WikiLink has been tested against mediawiki 1.4.5beta3 and 1.4.7.

WikiLink has known issues on mediawiki 1.5.0. Retrieving multiple pages at once is broken. This appears to be a mediawiki bug, and will not be fixed. The same problem does not occur on mediawiki 1.5.8. --Scott 10:56, 27 Mar 2006 (EST)

I expect WikiGetPage text to continue working in mediawiki 1.5 and beyond, because it uses the stable interface Special:Export. Logging in and setting pages will quite likely break in the next version. If you've tried this, please let me know about your experiences. I'm hoping that soon (1.5?) Special:Import will become available, and I can switch to using this. --Scott 15:57, 31 Aug 2005 (EDT)

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)

See Also

All of the Mathematica notebooks in Category:Knot Atlas Maintenance Software rely on WikiLink, and so are good examples of how to use it.

You may also be interested in the Wikipedia page on mediawiki bots, and in particular the Python Wikipedia Robot Framework.