WikiLink - The Mediawiki Interface: Difference between revisions

From Knot Atlas
Jump to navigationJump to search
No edit summary
Line 31: Line 31:


====Importing the package in Mathematica====
====Importing the package in Mathematica====
First, you'll need to set some paths, so WikiLink` can find the java files it needs.

<!--$$KnotAtlasPath = "c:\\scott\\math.berkeley.edu\\Work\\Mathematica\\KnotAtlas\\";$$-->
<!--$$AppendTo[$Path, KnotAtlasPath];$$-->
<!--$$SetDirectory[KnotAtlasPath];$$-->
<!--$$<< "WikiLink\\WikiLink.m"$$-->
<!--$$SetJarPath[KnotAtlasPath <> "WikiLink\\"];$$-->

We then try to connect to the wiki. Executing this line will prompt you for a username and password.
<!--$$CreateWikiConnection[
"http://katlas.math.toronto.edu/w/index.php",
wikiUserName=InputString["Enter Your Username:"],
InputString["Enter Your Password"]
]$$-->

The function <code>WikiUserName[]</code> checks that we're logged in
<!--$$?WikiUserName$$-->
<!--$$wikiUserName==WikiUserName[]$$-->


====Usage====
====Usage====

Revision as of 12:13, 31 August 2005


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, whie the java class, and its addition functionality, will be documented elsewhere.

License

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

Download

Download WikiLink.zip (file description). Unzip this, probably in the same place you've unzipped the KnotTheory` package. This will create a subdirectory called WikiLink, containing (at least) these files:

Filename Description
WikiLink.nb The Mathematica notebook containing wrapper function definitions.
WikiLink.m The Mathematica package automatically generated from WikiLink.nb.
wikilink.jar The WikiLink java class and source code (MediawikiConnection.java).

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

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

Importing the package in Mathematica

First, you'll need to set some paths, so WikiLink` can find the java files it needs.


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

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

Usage

Compatibility

WikiLink has been tested against mediawiki 1.4.5beta3 and 1.4.7