mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
gf-cloud-api.html: document the new command=remake
Also improve the documentation of the responses to the upload and make commands.
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
dl.api>dt, .request { background-color: #cef; }
|
dl.api>dt, .request { background-color: #cef; }
|
||||||
.response { background-color: #ffc; }
|
.response { background-color: #ffc; }
|
||||||
dd { margin-top: 0.5ex; margin-bottom: 0.5ex; }
|
dd { margin-top: 0.5ex; margin-bottom: 0.5ex; }
|
||||||
|
em { color: #36f; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -107,22 +108,39 @@ For documentation of GF shell commands, see:
|
|||||||
The working directory is persistent, so clients are expected
|
The working directory is persistent, so clients are expected
|
||||||
to remember and reuse it. Access to previously
|
to remember and reuse it. Access to previously
|
||||||
uploaded files requires that the same working directory is used.
|
uploaded files requires that the same working directory is used.
|
||||||
|
|
||||||
<dt><code>/parse?</code><var>path</var><code>=</code><var>source</var>
|
<dt><code>/parse?</code><var>path</var><code>=</code><var>source</var>
|
||||||
<dd>This command can be used to check GF source code for syntax errors.
|
<dd>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
|
It also converts GF source code to the JSON representation used in
|
||||||
GFSE (the cloud-based GF grammar editor).
|
GFSE (the cloud-based GF grammar editor).
|
||||||
|
|
||||||
<dt><code>/cloud?dir=</code>...<code>&command=<strong>upload</strong>&</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&</code>...
|
<dt><code>/cloud?dir=</code>...<code>&command=<strong>upload</strong>&</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&</code>...
|
||||||
<dd>Upload files to be stored in the cloud.
|
<dd>Upload files to be stored in the cloud.
|
||||||
<dt><code>/cloud?dir=</code>...<code>&command=<strong>make</strong>&</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&</code>...
|
|
||||||
<dd>Upload grammar files and compile them into a PGF file.
|
|
||||||
The response code is 204 if the upload was successful.
|
The response code is 204 if the upload was successful.
|
||||||
|
|
||||||
|
<dt><code>/cloud?dir=</code>...<code>&command=<strong>make</strong>&</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&</code>...
|
||||||
|
<dd>Upload grammar files and compile them into a PGF file. Example response:
|
||||||
|
<blockquote class=response><code>
|
||||||
|
{ "errorcode":"OK", <em>// "OK" or "Error"</em>
|
||||||
|
<br> "command":"gf -s -make FoodsEng.gf FoodsSwe.gf FoodsChi.gf",
|
||||||
|
<br> "output":"\n\n" <em>// Warnings and errors from GF</em>
|
||||||
|
<br>}</code></blockquote>
|
||||||
|
|
||||||
|
<dt><code>/cloud?dir=</code>...<code>&command=<strong>remake</strong>&</code><var>path<sub>1</sub></var><code>=</code><var>source<sub>1</sub></var><code>&</code><var>path<sub>2</sub></var><code>=</code><var>source<sub>2</sub></var><code>&</code>...
|
||||||
|
<dd>Like <code>command=<strong>remake</strong></code>, except you can leave
|
||||||
|
the <var>source<sub>i</sub></var> parts empty to reuse previously uploaded
|
||||||
|
files.
|
||||||
|
|
||||||
<dt><code>/cloud?dir=</code>...<code>&command=<strong>download</strong>&file=</code><var>path</var>
|
<dt><code>/cloud?dir=</code>...<code>&command=<strong>download</strong>&file=</code><var>path</var>
|
||||||
<dd>Download the specified file.
|
<dd>Download the specified file.
|
||||||
|
|
||||||
<dt><code>/cloud?dir=</code>...<code>&command=<strong>ls</strong>&ext=.pgf</code>
|
<dt><code>/cloud?dir=</code>...<code>&command=<strong>ls</strong>&ext=.pgf</code>
|
||||||
<dd>List files with the specified extension, e.g.
|
<dd>List files with the specified extension, e.g.
|
||||||
<code class=response>["Foods.pgf","Letter.pgf"]</code>.
|
<code class=response>["Foods.pgf","Letter.pgf"]</code>.
|
||||||
|
|
||||||
<dt><code>/cloud?dir=</code>...<code>&command=<strong>rm</strong>&file=</code><var>path</var>
|
<dt><code>/cloud?dir=</code>...<code>&command=<strong>rm</strong>&file=</code><var>path</var>
|
||||||
<dd>Remove the specified file.
|
<dd>Remove the specified file.
|
||||||
|
|
||||||
<dt><code>/cloud?dir=</code>...<code>&command=<strong>link_directories</strong>&newdir=</code>...
|
<dt><code>/cloud?dir=</code>...<code>&command=<strong>link_directories</strong>&newdir=</code>...
|
||||||
<dd>Combine server directores. This is used by GFSE to share grammars
|
<dd>Combine server directores. This is used by GFSE to share grammars
|
||||||
between multiple devices.
|
between multiple devices.
|
||||||
@@ -131,7 +149,7 @@ For documentation of GF shell commands, see:
|
|||||||
<hr>
|
<hr>
|
||||||
<address></address>
|
<address></address>
|
||||||
<div class=modtime><small>
|
<div class=modtime><small>
|
||||||
<!-- hhmts start -->Last modified: Tue Oct 2 17:26:02 CEST 2012 <!-- hhmts end -->
|
<!-- hhmts start -->Last modified: Tue Oct 23 23:16:26 CEST 2012 <!-- hhmts end -->
|
||||||
</small></div>
|
</small></div>
|
||||||
<address>
|
<address>
|
||||||
<a href="http://www.cse.chalmers.se/~hallgren/">TH</a>
|
<a href="http://www.cse.chalmers.se/~hallgren/">TH</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user