comparison Sphinx/source/users/lua.rst @ 357:6b432ce3a56e

typo
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 30 Mar 2020 07:59:50 +0200
parents e4e9cca89c64
children 011b01ccf52d
comparison
equal deleted inserted replaced
356:12ecdb63a8cb 357:6b432ce3a56e
25 file <configuration>`, or by uploading it 25 file <configuration>`, or by uploading it
26 through the :ref:`REST API <rest-samples>`. 26 through the :ref:`REST API <rest-samples>`.
27 27
28 To install it by the **configuration file** method, you just have to 28 To install it by the **configuration file** method, you just have to
29 specify the path to the file containing the Lua script in the 29 specify the path to the file containing the Lua script in the
30 ``LuaScripts`` variable. A comma seprated list of paths can be specified 30 ``LuaScripts`` variable. A comma-separated list of paths can be
31 to install multiple scripts. 31 specified to install multiple scripts.
32 32
33 To upload a script stored in the file "``script.lua``" through the 33 To upload a script stored in the file "``script.lua``" through the
34 **REST API**, use the following command:: 34 **REST API**, use the following command::
35 35
36 $ curl -X POST http://localhost:8042/tools/execute-script --data-binary @script.lua 36 $ curl -X POST http://localhost:8042/tools/execute-script --data-binary @script.lua
139 callbacks are listed in `this sample script 139 callbacks are listed in `this sample script
140 <https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/Lua/TransferSyntaxEnable.lua>`__. 140 <https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/Lua/TransferSyntaxEnable.lua>`__.
141 141
142 *Note:* All of these callbacks are guaranteed to be **invoked in 142 *Note:* All of these callbacks are guaranteed to be **invoked in
143 mutual exclusion**. This implies that Lua scripting in Orthanc does 143 mutual exclusion**. This implies that Lua scripting in Orthanc does
144 not support any kind of concurrency. If a callback is specified 144 not support any kind of concurrency.
145 multiple times in separate scripts, the event handler of the latest 145
146 loaded script is used. 146 If a callback is specified multiple times in separate scripts, the
147 event handler of the latest loaded script is used.
147 148
148 149
149 .. _lua-rest: 150 .. _lua-rest:
150 151
151 Calling the REST API of Orthanc 152 Calling the REST API of Orthanc