WikiLink - The Mediawiki Interface

From Knot Atlas
Revision as of 07:49, 22 December 2006 by 81.177.14.26 (talk) (→‎License)
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.

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.



teen sex video free homemade sex video nude teen sex xxx oral sex xxx lesbian sex free hardcore sex movie teen couple sex free adult sex lesbian sex picture free porn game free porn film rough anal sex milf anal sex naked teen sex free bbw porn free black porn movie free porn gallery free black porn video anal sex video clip sexy lesbian sex oral sex site free porn for woman teen sex comedy how to give oral sex free sex show free hardcore porn video hard lesbian sex japan teen sex busty teen sex free porn star gallery amateur anal sex lesbian sex game oral sex position black lesbian having sex free asian sex free sex clip gay oral sex female oral sex download free sex video drunk teen sex free hentai porn ebony anal sex hot lesbian sex video free live sex cam teen sex fuck free teen sex download free porn movie cartoon anal sex brazilian anal sex free latina porn japanese oral sex lesbian group sex nude lesbian sex mature oral sex free oral sex movie indian teen sex free blonde porn lesbian sex site oral sex for woman how to perform oral sex on a man lesbian sex clip teen lesbian sex video free ebony porn free porn star oral sex disease teen oral sex lesbian sex comic free oral sex video ultimate guide to anal sex for man free gay porn video free porn video sample free sex tape free black porn real teen sex young teen sex video latina oral sex free asian porn free download sex movie free porn thumb free sex comic free xxx porn free porn video clip sex teen pic free lesbian sex movie free sex movie clip gallires litlle photo sex teen thumnail lesbian sex story anal sex guide free porn movie trailer teen first sex free gay sex video free oral sex story teen sex video clip amateur oral sex free asian porn video free oral sex free lesbian sex photo free game irtual sex hardcore teen sex anal sex com free amateur sex fat anal sex extreme anal sex free hot sex oral sex video clip anal sex clip free teen sex pic free black sex oral sex cum free teen porn video free teen sex video free oral sex clip free porn video download free live sex chat free porn thumbnail free oral sex picture free oral sex pic ultimate guide to anal sex for woman first time lesbian sex hard anal sex oral sex porn hardcore lesbian sex free teen sex vids lesbian sex guide hot oral sex free lesbian porn free amateur porn video mature lesbian sex free pic porn free shemale porn oral sex image japan anal sex free porn links free sex tv free porn movie gallery filipina teen sex lesbian sex trailer free hardcore sex free anal sex clip deep oral sex free gay sex movie free indian sex story black lesbian sex video hot lesbian sex free hardcore teen sex oral sex and pregnancy tiny teen sex teen anal sex lesbian sex video clip teen sex thumb free asian sex video free sex film teen lesbian have sex extreme oral sex older woman and oral sex free paris hilton sex tape oral sex risk lesbian sex gallery free homemade porn movie free celebrity sex tape free gay porn hair oral pubic removal sex vagina teen lesbian have sex free celeb porn lesbian sex position free sex web cam free porn photo thai teen sex free lesbian sex video download free sex video clip free gay anal sex teen sex forum free sex downloads interracial anal sex anal sex xxx free anal sex movie blonde oral sex dirty anal sex teen sex party teen group sex teen sex com good oral sex free anal sex movie teen sex xxx hard core anal sex free anal sex video clip free lesbian porn movie lesbian teacher sex free black sex video oral sex free black anal sex oral sex toy anal sex for man free anal sex site lesbian shower sex teen sex site deep anal sex teen sex clip is oral sex sex teen hard sex anal oral sex free indian sex black teen sex free porn downloads anal sex movie teen sex mpeg free anal sex gallery oral sex picture free fat porn free lesbian sex vidios wild teen sex oral sex photo naked lesbian sex free anal sex pic anal sex with my wife sex education for teen free lesbian sex pic double anal sex lesbian oral sex anal free sex video.mnoga.com free full length porn free teen sex pic fat teen sex oral sex thanksgiving lesbian foot sex how to give oral sex to a woman young anal sex free gay oral sex first time oral sex free sex story free sex photo free arab sex lesbian have sex lesbian anal sex free lesbian sex story sweet teen sex safe oral sex free live porn latina lesbian sex free amateur porn hot teen sex anal sex tip picture of lesbian having sex lesbian sex secret for man fat lesbian sex ebony teen sex public lesbian sex free anime porn free porn password oral sex clip naked naked porn sex sex teen teenss years free sex site blonde teen sex free gay porn movie free porn vids anal sex gallery free anal sex video hot anal sex free teen sex story free mature porn anal oral sex lesbian strap on sex art of oral sex free lesbian sex video clip free porn star video free sex mpeg anal sex free trailer anal sex technique oral sex trailer woman anal sex world sex free picture rough oral sex virgin anal sex teen sex model anal sex position free full length porn video lesbian sex mature anal sex free lesbian sex video free anal sex story amateur teen sex free or adult or sex or story free sex game old sex teen free adult sex game lesbian sex scene lesbian sex slave anime lesbian sex japanese teen sex mix sex teen free sex porn free teen sex movie asian teen sex teen sex story free anal sex pic oral sex party free hardcore sex video sex oral gratis hardcore oral sex free porn clip free lesbian sex story hiv oral sex oral sex gallery teen sex toy her first lesbian sex com teen sex tgp anal sex machine lesbian sex photo brutal anal sex oral sex blow job free porn comic lesbian sex technique lesbian sex video free celebrity sex video free lesbian sex gallery old young lesbian sex first anal sex man oral sex anal sex trailer model oral porn sex generation lesbian sensibility sex story free sex thumbnail free home sex video black anal sex pre teen sex free porn trailer little porn sex small teen year young young young web cam teen sex japanese anal sex rough teen sex free online porn video oral sex technique free porn no credit card free hardcore porn teen having sex hpv oral sex teen titans sex male anal sex free erotic sex story first time anal sex tranny anal sex oral sex is best best anal sex history of oral sex lesbian having sex video free lesbian sex video oral sex instructions interracial lesbian sex lesbian having sex teen sex pic anal sex xxl new teen sex young teen sex free live sex show female anal sex free indian sex movie amateur lesbian sex free porn pic free teen sex clip anal blog.myspace.com sex site school teen sex free trial porn public oral sex free gay sex pic free lesbian sex site lesbian sex com hardcore anal sex bbw anal sex free lesbian sex trailer teen lesbian sex shemale anal sex free daily porn lesbian oral sex download instructional oral sex video teen sex photo adult anal sex latin anal sex free teen sex gallery lesbian sex orgy oral sex movie free hot porn lesbian dildo sex teen sex movie free porn story free cartoon porn free gay sex story free black porn clip gay teen sex teen sex gallery teen sex .com free asian porn movie free asian sex movie free porn sample teen lesbian sex anal sex toy first oral sex lesbian sex cartoon oral sex tip for man free japanese porn free porn free porn star movie free net sex game free teen sex anal sex free pic better oral sex big cock anal sex oral sex tip free homemade sex movie blonde anal sex mature teen sex oral sex wife free anal porn anal sex picture free sex move lesbian sex vids pregnant anal sex free sex vids anal sex photo free porn movie online virgin teen sex teen sex for cash anal free sex video.mnoga.com free sex ultra vixen free hardcore sex picture naked lesbian having sex free amateur sex video teen sex pussy lesbian hentai sex oral sex and stds teen oral sex free porn video free full porn movie lesbian sex porn free teen sex video free lesbian sex vidios free online porn game free sex pic sexy teen sex cartoon free lesbian movie sex snatch stuff teenager xxx lesbian sex movie free amateur sex movie free sex video safe anal sex free sex trailer free gay black porn anal sex story free black sex movie woman giving oral sex latina teen sex free anal sex porn free lesbian sex oral sex survey anal sex watch free porn teen lesbian sex video free homemade porn anal sex vids free lesbian sex clip free video of lesbian having sex free group sex free porn movie free online porn free black lesbian sex oral sex condom anal sex advice free porn star pic teen sex cam great oral sex teen sex strap on anal sex oral sex video free porn web site anal sex education how to perform oral sex on a woman teen sex porn the bible on oral sex self oral sex latina anal sex free paris hilton sex video how to give good oral sex free sex cam free teen porn pic teen lesbian having sex oral sex com asian oral sex free anal sex video free sex movie free gay sex lesbian sex tip blonde lesbian sex free lesbian sex how to perform oral sex free anime sex lesbian sex toy free teen porn movie free disney porn free mature sex teen sex trailer free milf porn rough lesbian sex oral sex std russian teen sex free cartoon sex oral sex guide free anal sex photo free xxx sex free live sex web cam painful anal sex lesbian anal sex free porn movie sample free lesbian sex picture free teen lesbian sex lesbian sex party mature lesbian sex video anal sex mpeg free sex porn free lesbian sex movie black oral sex black lesbian sex free sex chat rooms oral sex story her first anal sex free sex contact free sex chat free oral sex video teacher anal sex free porn psp her first lesbian sex anal sex porn group anal sex how to give oral sex to a man free porn movie clip interracial teen sex anal sex pic free indian porn gay micheal sex teen petite teen sex free sex gallery action anal hot sex lesbian sex book giving oral sex gay anal sex group oral sex anal sex site free sex thumb indian anal sex real lesbian sex free web cam porn free porn site college lesbian sex free anal sex free online sex game asian lesbian sex cA?ble cA?ble de de detherfast free sex free young porn cute teen sex young lesbian sex college teen sex free porn preview male oral sex oral sex and aids guide guide idiot idiot oral pocket pocket sex asian anal sex teen anal sex free lesbian porn video anal sex video interracial oral sex free sex video sample teen sex vids christian oral sex free celebrity porn danger of anal sex the whole lesbian sex book a passionate guide for all of us hot lesbian having sex live teen sex free online sex video little teen sex free teen porn free sex teen sex chat free porn mpeg lesbian woman sex free full length porn movie latin teen sex first time lesbian sex story free virtual sex free teen sex movie free live sex deep throat oral sex ebony lesbian sex oral sex education first lesbian sex oral sex advice free adult porn herpes and oral sex teen first time sex hotbods.com free porn anal sex hemorrhoids free anal sex sex teen free pic

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.