From 0327b53fad9ad4e596b5b53b29395d2a7458ac71 Mon Sep 17 00:00:00 2001 From: Milen Kouylekov Date: Mon, 28 Oct 2024 10:51:17 +0100 Subject: [PATCH] Updated Guide with remote path and more instance description --- tsdapiclient/guide.py | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/tsdapiclient/guide.py b/tsdapiclient/guide.py index 2a3e8db..5947d2a 100644 --- a/tsdapiclient/guide.py +++ b/tsdapiclient/guide.py @@ -68,6 +68,12 @@ tacl p11 --upload myfile.txt --encrypt tacl p11 --upload mydirectory --encrypt +When uploading you can specify a remote path to upload to: + + tacl p11 --upload myfile.txt --remote-path /path/to/remote + +This will create a directory structure in the remote path if it does not exist. + """ downloads = """ @@ -101,6 +107,14 @@ tacl p11 --download data.txt --encrypt +When downloading you can specify a remote path to download from: + + tacl p11 --download data.txt --remote-path /path/to/remote + +This will download the file from the remote path if it exists as well as list remote directories. + + tacl p11 --download-list /path/to/remote + """ automation = f""" @@ -146,7 +160,7 @@ The instances are currently only used for uploading data. To upload data to with an instance, you can use the following command: - tacl p11 --api-key --link-id (--secret-challenge )? --upload myfile + tacl p11 --api-key --link-id (--secret-challenge )? --upload myfile where is the link id provided to you by the project owner, and is the secret challenge provided to you by the @@ -154,16 +168,25 @@ is the correct one. The link id is used to identify the instance it can be provided as UUID or a https link. Example of an https link is: - tacl p11 --api-key --link-id https://data.tsd.usit.no/i/d3bd40e1-0a15-4575-9745-830ec52a4b3f --upload myfile - tacl p11 --api-key --link-id https://data.tsd.usit.no/c/1154a666-4ae3-49e5-b1dd-cf1ea2cc86f9 --secret-challenge --upload myfile + tacl p11 --api-key --link-id https://data.tsd.usit.no/i/ --upload myfile + tacl p11 --api-key --link-id https://data.tsd.usit.no/c/ --secret-challenge @path-to-secret-file --upload myfile where the 'c' and 'i' are the type of the link. The 'c' for instance that requires a secret challenge and the 'i' for instance that does not require a secret challenge. The UUID variant is the same as the https link but without the https and the domain. - tacl p11 --api-key --link-id d3bd40e1-0a15-4575-9745-830ec52a4b3f --upload myfile - tacl p11 --api-key --link-id 1154a666-4ae3-49e5-b1dd-cf1ea2cc86f9 --secret-challenge secret --upload myfile + tacl p11 --api-key --link-id --upload myfile + tacl p11 --api-key --link-id --secret-challenge @path-to-secret-file --upload myfile + +You can also store the instance in a file (only the instance or url no newlines), +and invoke tacl as such: + + tacl p11 --link-id @path-to-instance-file --secret @path-to-secret-file --upload myfile + +While the secret challenge is optional, it has to provided always as a file to avoid leaking secrets in the shared +machines process. If not provided the secret challenge will be asked for in the terminal. + """ debugging = f""" If you are having trouble while running a command, check the version,