r82593 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82592‎ | r82593 | r82594 >
Date:07:29, 22 February 2011
Author:jnatividad
Status:deferred
Tags:
Comment:
Updated to reflect that SCRIPT mode is no longer supported. SRF-Ploticus now only works in PREFAB mode.
Modified paths:
  • /trunk/extensions/SemanticResultFormats/Ploticus/README (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/Ploticus/README
@@ -1,6 +1,10 @@
22 == Overview ==
33 SRF-Ploticus is a query printer for Semantic MediaWiki that uses
44 Ploticus to create plots, charts and graphics out of query results.
 5+Ploticus visualizations are highly configurable and the user can even develop
 6+custom visualizations using the Ploticus scripts.
 7+Note however that SRF-Ploticus no longer allows Ploticus scripts to be embedded in ask queries for security reasons.
 8+If the user wants to develop custom visualizations, the custom scripts should be deployed in the Ploticus prefab directory.
59
610 == Installation ==
711 The following should be installed and running.
@@ -55,16 +59,10 @@
5660 == Configuration and Usage ==
5761
5862 The SRF-ploticus Result Format has the following parameters:
59 -
60 - * ploticusmode (enum/optional)
61 - - set to 'prefab' (default) or 'script'
6263
6364 * ploticusparams (string/required)
64 - - in prefab mode, this should be set to prefab cmdline parameters.
 65+ - this should be set to prefab cmdline parameters. See SPECIFYING PLOTICUSPARAMS below.
6566 Line endings can be used to split the prefab commandline for readability.
66 -
67 - In script mode, set to a ploticus script. Line endings to separate directives
68 - can and should be used in script mode. Otherwise, the ploticus script parser will fail.
6967
7068 * imageformat (enum/optional)
7169 - png (default), gif, jpeg, svg, svgz, swf, eps, ps, drawdump and drawdumpa (drawdump append).
@@ -90,7 +88,7 @@
9189 (http://ploticus.sourceforge.net/doc/prefab_stdparms.html#legend)
9290
9391 * debug (bool/optional)
94 - - 0 (default). When 1, displays ploticus prefab cmdline or script used to generate plot.
 92+ - 0 (default). When 1, displays ploticus prefab cmdline used to generate plot.
9593 It also invokes ploticus itself in debug mode and creates a link to the debug file.
9694 Also turns showcsv on and bypasses the ploticus "cache".
9795
@@ -135,12 +133,11 @@
136134
137135 * drawdumpoutput (string/optional)
138136 - this parameter is only processed in prefab mode when imageformat is set to drawdump or drawdumpa.
139 - (In script mode, use the %WORKINGDIR% keyword in your script when producing drawdumps)
140137 Specifies the filename to which the drawdump output will be stored in the ploticus cache directory.
141138
142 -PREFAB MODE
143 -===========
144 -In prefab mode, ploticusparams expects commandline parameters that one would normally use when
 139+SPECIFYING PLOTICUSPARAMS
 140+=========================
 141+ploticusparams expects commandline parameters that one would normally use when
145142 invoking stand-alone ploticus in prefab mode.
146143
147144 However, the following Ploticus commandline prefab parameters should NOT be specified:
@@ -148,23 +145,8 @@
149146 * output - automatically generated by the extension
150147 * format (e.g. -png, -gif, etc.) - use the SRF-ploticus imageformat parameter.
151148 * debug - use the SRF-Ploticus debug parameter instead
152 -
153 -SCRIPT MODE
154 -===========
155 -In script mode, ploticusparams should be set to a ploticus script.
156149
157 -Two special keywords can be used in the script body (case-sensitive):
158 - * %DATAFILE.CSV% - replaced with fully qualified path to result CSV file generated by the inline query
159 - * %WORKINGDIR% - replaced with SRF-ploticus cache directory. This is useful when creating drawdump/drawdumpa
160 - files in script mode.
161150
162 -For security reasons, the passed script is also "sanitized" and the following ploticus directives are disabled:
163 - * #include
164 - * #shell
165 - * #sql
166 - * #write
167 - * #cat
168 -
169151 ======= USAGE NOTES =========
170152
171153 Overlaying and combining plots from multiple queries
@@ -211,6 +193,10 @@
212194 Typically, imagemaps "links/labels" should be set to resolve to "Article URL/Article Name".
213195 Note that imagemaps are only valid for PNG, GIF, JPEG and SVG.
214196
 197+HISTORY:
 198+=======
 199+2011-02-22 Removed script mode and added escapeshellcmd to ploticus cmdline call to close security vulnerability. If user needs flexibility of script mode, the script will have to be developed and deployed into the prefabs script as a custom prefab.
 200+
215201 CREDITS:
216202 =======
217203 SRF-Ploticus is only possible because of all the great work done

Status & tagging log