Extension:Script

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Script

Release status:Extension status stable

Scriptextension.png
ImplementationTemplate:Extension#type Tag, Special page
DescriptionTemplate:Extension#description extension R with ScriptTest
Author(s)Template:Extension#username XiangRu Ma (P.swikitalk)
Latest versionTemplate:Extension#version 0.2 (2013-05-16)
MediaWikiTemplate:Extension#mediawiki 1.19.X, 1.20.X
PHPTemplate:Extension#php 5.3+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GPLv2
Download Script
ParametersTemplate:Extension#parameters
  • $wgRroot
  • $wgRScriptPath
  • $wgRDataPath
TagsTemplate:Extension#tags
  • <R>
  • <Rform>
Added rightsTemplate:Extension#rights
  • useR
  • useShell
Hooks usedTemplate:Extension#hook
ParserFirstCallInitManual:Hooks/ParserFirstCallInit

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

Feature overview[edit]

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

Requirement[edit]

Download[edit]

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

Installation[edit]

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 parameters[edit]

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

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

User rights[edit]

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

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

Usage[edit]

<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 languages[edit]

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 also[edit]

Language:Project:Language policy English  • 日本語