From file to script.sahi Category-Name:
This 'script' converter will convert a resource of category file to a resource of category script.sahi. Two cases:
In the case of a standalone script (The script doesn't depend on other files, e.g. script includes or files to be uploaded) then you could use the syntax below. The initial resource references the sahi script.
- scriptToConvert<Res:file>: The name of the resource to convert (Resource of category file). This ressource references a sahi script (e.g. by using a LOAD instruction on the sahi scipt path).
- converted<Res:scipt.sahi>: The name of the converted resource. (Resource of category script.sahi)
Sahi script with dependencies
In the case of a script which depends on other file, you have to use the syntax below. The initial resource references a directory. This directory should contains in its tree the whole resources needed by the main sahi script. You also have to define where is the main sahi script to execute (mainScriptPath of the USING clause). This path should be RELATIVE to the directory referenced by the initial resource.
- rootDirectory<Res:file>: Name of the resource which references the root directory. This root directory should contain the whole files needed to execute the sahi script.
- mainScriptPath<Res:file>: Name of the configuration resource. The content of the file should be: 'mainpath:relativePathToMainSahiScript' (Note: you could use an inline definition). This path to main sahi script should be relative to the directory given as rootDirectory.
- converted<Res:scipt.sahi>: The name of the converted resource (Resource of category script.sahi)