Wiki source code of gemma-client

Version 4.1 by Martin SZOTKOWSKI on 2023/06/13 13:06

Show last authors
1 [[example by Diego>>attach:gemma-client example.msg]]
2
3 * installation:
4 ** part of the installation sima package
5 ** sudo apt install python3-pip
6 sudo apt install python3-testresources
7 sudo apt install jq # parsing json
8 sudo pip install gemma-client-1.1.10.tar.gz
9 * usage:
10 ** gemma-client ~-~-help
11 ** gemma-client download ~-~-help
12 ** gemma-client upload ~-~-help
13 ** gemma-client download ~-~-no-verify ~-~-hostname sima.imtm.cz ~-~-username admin ~-~-password xxx  **6a3717de-fdfd-11ed-9978-02420a000126** .
14 *** DATASET_ID is the Measurement.DATASET_ID
15 *** [[image:attach:image-2023-6-13_14-50-15.png||height="250"]]
16 ** gemma-client **upload **~-~-no-verify ~-~-hostname 158.194.103.196 ~-~-username admin ~-~-password xxx **06f7bb18-09e9-11ee-b88a-02420a000426** "Harmony IDX/TIF" .
17 *** SCREEN_ID is the Screen.SCREEN_ID
18 *** [[image:attach:image-2023-6-13_14-53-36.png||height="250"]]
19 ** or you can upload to the new screen
20 ** gemma-client **upload **~-~-no-verify ~-~-hostname 158.194.103.196 ~-~-username admin ~-~-password xxx ~-~-screen-name '**new screen name**' $(**uuidgen**) "Harmony IDX/TIF" .
21 ** DATASET_TYPE can be found on the address:
22 *** [[https:~~/~~/sima.imtm.cz/datastore/datatypes>>url:https://sima.imtm.cz/datastore/datatypes||shape="rect"]]
23
24 \\
25
26 * authentication is not working ;-(
27 ** curl -s -H "Content-Type: application/json" -X POST ~-~-data '{"userName":"admin", "password":"xxx"}' [[http:~~/~~/158.194.103.196/api/1.0/authentication/token>>url:http://158.194.103.196/api/1.0/authentication/token||shape="rect"]] | jq -r ".token"
28 *** **1c48a378-935a-4345-b7cc-3ad9016ef143**
29 ** gemma-client upload ~-~-no-verify ~-~-hostname 158.194.103.196 **~-~-bearer 1c48a378-935a-4345-b7cc-3ad9016ef143** ~-~-screen-name hola4 $(uuidgen) "Harmony IDX/TIF" .
30
31 \\