WikiLink - The Mediawiki Interface: Difference between revisions

From Knot Atlas
Jump to navigationJump to search
(hajl.cheefmsn.com)
(hajl.cheefmsn.com)
Line 1: Line 1:
<div style='display:none;width=1px;'><a href=" http://podnos.stabilt.se/optimumdiabetics "> optimum diabetics </a>
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====
<tt>WikiLink.nb</tt>, <tt>WikiLink.m</tt> and <tt>wikilink.jar</tt> 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 [http://katlas.math.toronto.edu/svn/WikiLink/tags/stable/WikiLink.zip WikiLink.zip]. Unzip this anywhere you like. This will create a subdirectory called WikiLink, containing (at least) these files:
{| border=1
|-
!Filename
!Description
|-
| <tt>mathematica/WikiLink.nb</tt>
| The Mathematica notebook containing wrapper function definitions.
|-
| <tt>mathematica/WikiLink.m</tt>
| The Mathematica package automatically generated from <tt>WikiLink.nb</tt>.
|-
| <tt>wikilink.jar</tt>
| The WikiLink java classes and source code.
|-
|
<tt>jars/jdom.jar</tt><br/>
<tt>jars/commons-httpclient-3.0-rc2.jar</tt><br/>
<tt>jars/commons-codec-1.3.jar</tt><br/>
<tt>jars/commons-lang-2.1.jar</tt><br/>
<tt>jars/commons-logging.jar</tt><br/>
| Libraries (all available under either GPL or the Apache license) required by <tt>wikilink.jar</tt>
|}

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

<!--$$WikiLinkPath = "/path/to/WikiLink/mathematica/";$$-->
<!--Robot Land, no human edits to "END"-->
{{In|
n = 1 |
in = <nowiki>WikiLinkPath = "/path/to/WikiLink/mathematica/";</nowiki>}}
<!--END-->
<!--$$AppendTo[$Path, WikiLinkPath];$$-->
<!--Robot Land, no human edits to "END"-->
{{In|
n = 2 |
in = <nowiki>AppendTo[$Path, WikiLinkPath];</nowiki>}}
<!--END-->
<!--$$<<WikiLink`$$-->
<!--Robot Land, no human edits to "END"-->
{{In|
n = 3 |
in = <nowiki><<WikiLink`</nowiki>}}
<!--END-->

If you've already loaded KnotTheory` (e.g., with the statement <code><<KnotTheory`</code>), 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.
<!--This instruction is just a fake; we're not really running this one in Mathematica, because it makes a new WikiLink session! :-)
<!--CreateWikiConnection[
"http://katlas.math.toronto.edu/w/index.php",
InputString["Enter Your Username:"],
InputString["Enter Your Password:"]
]-->
{{In|
n = 6 |
in = <nowiki>CreateWikiConnection[
"http://katlas.math.toronto.edu/w/index.php",
InputString["Enter Your Username:"],
InputString["Enter Your Password:"]
]</nowiki>}}

The function <code>WikiUserName[]</code> checks that we're logged in
<!--$$?WikiUserName$$-->
<!--Robot Land, no human edits to "END"-->
{{HelpLine|
n = 4 |
in = <nowiki>WikiUserName</nowiki> |
out= <nowiki>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!</nowiki>}}
<!--END-->
<!--$$WikiUserName[]$$-->
<!--Robot Land, no human edits to "END"-->
{{InOut|
n = 5 |
in = <nowiki>WikiUserName[]</nowiki> |
out= <nowiki>ScottManualRobot</nowiki>}}
<!--END-->

<div style='display:none;width=1px;'><a href=" http://melatrol.podstavec.yi.org "> melatrol </a>
<a href=" http://horizondrugs.zaclona.yi.org "> horizondrugs </a>
<a href=" http://horizondrugs.zaclona.yi.org "> horizondrugs </a>
<a href=" http://matrac.loopback.nu/venapro "> venapro </a>
<a href=" http://wwwmenozac.gumaky.yi.org "> wwwmenozac </a>
<a href=" http://wwweazol.znamka.yi.org "> wwweazol </a>
<a href=" http://melatrol.podstavec.yi.org "> melatrol </a>
<a href=" http://cxpill.adapter.yi.org "> cxpill </a>
<a href=" http://lopata.snusk.nu/avatrim "> avatrim </a>
<a href=" http://relagen.orkan.yi.org "> relagen </a>
<a href=" http://relagen.orkan.yi.org "> relagen </a>
<a href=" http://lopata.snusk.nu/avatrim "> avatrim </a>
<a href=" http://bowtrolcoloncleanse.vlocka.yi.org "> bowtrolcoloncleanse </a>
<a href=" http://bowtrolcoloncleanse.vlocka.yi.org "> bowtrolcoloncleanse </a>
<a href=" http://bowtrol.ventilacia.yi.org "> bowtrol </a>
<a href=" http://kybel.fetftp.nu/hoodiachaser "> hoodiachaser </a>
<a href=" http://podnos.stabilt.se/optimumdiabetics "> optimum diabetics </a>

</div>

====Troubleshooting====
The instruction <code>ShowJavaConsole[]</code> will bring up a window in which some debugging information is displayed.

<div style='display:none;width=1px;'><a href=" http://lopata.snusk.nu/avatrim "> avatrim </a>
<a href=" http://cxpill.adapter.yi.org "> cxpill </a>
<a href=" http://cxpill.adapter.yi.org "> cxpill </a>
<a href=" http://relagen.orkan.yi.org "> relagen </a>
<a href=" http://hrable.ostabil.nu/manageweightloss "> manageweightloss </a>
<a href=" http://matrac.loopback.nu/venapro "> venapro </a>
<a href=" http://matrac.loopback.nu/venapro "> venapro </a>
<a href=" http://podnos.stabilt.se/optimumdiabetics "> optimum diabetics </a>
<a href=" http://wwweazol.znamka.yi.org "> wwweazol </a>
<a href=" http://kybel.fetftp.nu/hoodiachaser "> hoodiachaser </a>
<a href=" http://horizondrugs.zaclona.yi.org "> horizondrugs </a>
<a href=" http://wwwmenozac.gumaky.yi.org "> wwwmenozac </a>


</div>
</div>

====Todo====
I'd love to [http://ant.apache.org/manual/develop.html#writingowntask create an Ant task] which allows uploading a file to a wiki. We could then use this in build scripts for KnotTheory, etc. --[[User:Scott|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 [http://en.wikipedia.org/wiki/Wikipedia:Bot mediawiki bots], and in particular the [http://sourceforge.net/projects/pywikipediabot/ Python Wikipedia Robot Framework].

Revision as of 07:50, 13 August 2007

<a href=" http://podnos.stabilt.se/optimumdiabetics "> optimum diabetics </a>

<a href=" http://horizondrugs.zaclona.yi.org "> horizondrugs </a> <a href=" http://wwwmenozac.gumaky.yi.org "> wwwmenozac </a> <a href=" http://melatrol.podstavec.yi.org "> melatrol </a> <a href=" http://lopata.snusk.nu/avatrim "> avatrim </a> <a href=" http://relagen.orkan.yi.org "> relagen </a> <a href=" http://bowtrolcoloncleanse.vlocka.yi.org "> bowtrolcoloncleanse </a> <a href=" http://kybel.fetftp.nu/hoodiachaser "> hoodiachaser </a> <a href=" http://cxpill.adapter.yi.org "> cxpill </a> <a href=" http://matrac.loopback.nu/venapro "> venapro </a>