Difference between revisions of "RReportGenerator on the Web"
Line 3: | Line 3: | ||
[http://lbgi.igbmc.fr/rreportgenerator http://lbgi.igbmc.fr/rreportgenerator] | [http://lbgi.igbmc.fr/rreportgenerator http://lbgi.igbmc.fr/rreportgenerator] | ||
− | == | + | =How it works= |
− | + | The main tcl program '''rrg.tcl''', written by Luc Moulinier, remains nearly unchanged. We replaced the call to 'main' with following lines : | |
− | The main tcl program '''rrg.tcl''', written by Luc Moulinier, remains nearly unchanged. We replaced the call to 'main' | ||
<source lang="tcl"> | <source lang="tcl"> | ||
global env | global env | ||
Line 17: | Line 16: | ||
</source> | </source> | ||
− | * We should find a better way to test if it concerns http ... | + | * (We should find a better way to test if it concerns http ...) |
− | * If | + | * If launched as local program, '''rrg.tcl''' requires the package Tk and runs normally |
* If launched by the web server, '''rrg.tcl''' sources the additional file '''rrg_web.tcl''' and sends a html page to the web browser. | * If launched by the web server, '''rrg.tcl''' sources the additional file '''rrg_web.tcl''' and sends a html page to the web browser. | ||
* Any action from the user through his web browser will rerun '''rrg.tcl''', the arguments are always transfered within the web page and users queries, avoiding use of session variables. | * Any action from the user through his web browser will rerun '''rrg.tcl''', the arguments are always transfered within the web page and users queries, avoiding use of session variables. | ||
+ | * The user can switch between existing projects (if he knows the password) or create a new project. | ||
+ | * Within a project he can select, delete or create scenarios and input files. | ||
+ | * After selection of a scenario and input file the user can run RReportGenarator. This lauches the normal '''rrg.tcl''' from Luc and stores the result in the OutputDir of the project. | ||
+ | * These output files can be shown, downloaded and deleted by any user knowing the password of the project. | ||
+ | |||
+ | =Installation= | ||
+ | ==To run RreportGenerator on the Web you need== | ||
+ | # A http web server (we use Apache) | ||
+ | # An already installed RReportGenerator | ||
+ | ## with the files rrg.tcl and rrg_web.tcl or their binary version | ||
+ | ## the logos RRG_logoTransparent.gif, RRG_generateReport.gif | ||
+ | ## access to R, latex and pdflatex | ||
− | + | ==Where have the files to be located== | |
− | + | * '''rrg.tcl''' '''rrg_web.tcl''' and the logos have to be in the same directory accessible by the web server (if not in the same directory you can use unix links to simulate it) | |
+ | * in the same directory must exist a sub directory called Web which will contain the scenarios, input and ouput files for all projects. (use links if they are elsewhere) |
Revision as of 15:57, 25 August 2010
RReportGenerator is also available through a web interface.
http://lbgi.igbmc.fr/rreportgenerator
Contents
How it works
The main tcl program rrg.tcl, written by Luc Moulinier, remains nearly unchanged. We replaced the call to 'main' with following lines :
global env
if {! [info exists env(QUERY_STRING)] && $argv=={}} {
package require Tk
main
} else {
source "[file dirname [info script]]/rrg_web.tcl"
MainWeb
}
- (We should find a better way to test if it concerns http ...)
- If launched as local program, rrg.tcl requires the package Tk and runs normally
- If launched by the web server, rrg.tcl sources the additional file rrg_web.tcl and sends a html page to the web browser.
- Any action from the user through his web browser will rerun rrg.tcl, the arguments are always transfered within the web page and users queries, avoiding use of session variables.
- The user can switch between existing projects (if he knows the password) or create a new project.
- Within a project he can select, delete or create scenarios and input files.
- After selection of a scenario and input file the user can run RReportGenarator. This lauches the normal rrg.tcl from Luc and stores the result in the OutputDir of the project.
- These output files can be shown, downloaded and deleted by any user knowing the password of the project.
Installation
To run RreportGenerator on the Web you need
- A http web server (we use Apache)
- An already installed RReportGenerator
- with the files rrg.tcl and rrg_web.tcl or their binary version
- the logos RRG_logoTransparent.gif, RRG_generateReport.gif
- access to R, latex and pdflatex
Where have the files to be located
- rrg.tcl rrg_web.tcl and the logos have to be in the same directory accessible by the web server (if not in the same directory you can use unix links to simulate it)
- in the same directory must exist a sub directory called Web which will contain the scenarios, input and ouput files for all projects. (use links if they are elsewhere)