Wiki source code of gemma-client

Version 3.1 by Martin SZOTKOWSKI on 2023/06/13 12:59

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