Open main menu

Extension:Script

MediaWiki extensions manual
OOjs UI icon advanced.svg
Script
Release status: unmaintained
Scriptextension.png
Implementation Tag , Special page
Description extension R with ScriptTest
Author(s) XiangRu Ma (P.swikitalk)
Latest version 0.2 (2013-05-16)
MediaWiki 1.19+
PHP 5.3+
Database changes No
License GNU General Public License 2.0 or later
Download Script
  • $wgRroot
  • $wgRScriptPath
  • $wgRDataPath

  • <R>
  • <Rform>

  • useR
  • useShell
Translate the Script extension if it is available at translatewiki.net
Check usage and version matrix.

The Script extension does compute with R, and test script of R, Perl, PHP and etc..

Contents

Feature overviewEdit

  • Script provide tags (r and rform) to compute with R.
  • The script of Programming languages or linux shell can be tested via a Special:Specialpages--- Special:ScriptTest.
  • User rights of implement this extension can be changed.

RequirementEdit

DownloadEdit

This extension can be obtained offsite from here (click starts the download).

InstallationEdit

Once you have downloaded the code, place the Survey directory within your MediaWiki 'extensions' directory. Then add the following code to your LocalSettings.php file:

#Script
require_once "$IP/extensions/Script/Script.php";
$wgRroot = "/var/www/html/wiki";
$wgRScriptPath = "/images";
$wgRDataPath = "/images";

Configuration parametersEdit

$wgRroot = "/var/www/html/wiki";
$wgRScriptPath = "/images";
$wgRDataPath = "/images";

R configure file: /extensions/Script/rwiki.r

User rightsEdit

User rights of implement this extension can be changed for security.

default configure of user right
$wgGroupPermissions['sysop']['useR']   = true;
$wgGroupPermissions['sysop']['useShell']   = true;

UsageEdit

<Rform name="binom">
x:<input type="text" name="x" size="50" value="c(10,20)"><br />
p:<input type="text" name="p" size="5" maxlength="5" value="0.4">
</Rform>
<R name="binom">
if (exists("x")) x<-ctext(x) else x<-c(10,20);
if (exists("p")) p<-ctext(p) else p<-0.4;
x#input;
p;
binom.test(x,p=p);
</R>

Supported languagesEdit

These are the Programming languages known by Script that can be used in ScriptTest.

  • R script
  • perl script
  • php script
  • python script
  • matlab script
  • lua script
  • ruby script
  • bash shell

See alsoEdit