1.3 GF Shell Service

olga.caprotti

Multilingual Online Translation

Additional cloud service

/new
This generates a new working directory on the server, e.g. /tmp/gfse.123456. Most of the cloud service commands require that a working directory is specified in the dir parameter. The working directory is persistent, so clients are expected to remember and reuse it. Access to previously uploaded files requires that the same working directory is used.
/parse?path=source
This command can be used to check GF source code for syntax errors. It also converts GF source code to the JSON representation used in GFSE (the cloud-based GF grammar editor).
/cloud?dir=...&command=upload&path1=source1&path2=source2&...
Upload files to be stored in the cloud. The response code is 204 if the upload was successful.
/cloud?dir=...&command=make&path1=source1&path2=source2&...
Upload grammar files and compile them into a PGF file. Example response: { "errorcode":"OK", // "OK" or "Error"
  "command":"gf -s -make FoodsEng.gf FoodsSwe.gf FoodsChi.gf",
  "output":"\n\n" // Warnings and errors from GF
}
/cloud?dir=...&command=remake&path1=source1&path2=source2&...
Like command=make, except you can leave the sourcei parts empty to reuse previously uploaded files.
/cloud?dir=...&command=download&file=path
Download the specified file.
/cloud?dir=...&command=ls&ext=.pgf
List files with the specified extension, e.g. ["Foods.pgf","Letter.pgf"].
/cloud?dir=...&command=rm&file=path
Remove the specified file.
/cloud?dir=...&command=link_directories&newdir=...
Combine server directores. This is used by GFSE to share grammars between multiple devices.