From c5e62765b63eb09d0b4e15a6b6e84aca6a77b223 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Fri, 29 Sep 2023 10:50:51 +0300 Subject: [PATCH] update inner code blocks --- developers/ocean-cli/consuming-an-asset.md | 6 +++++- .../ocean-cli/downloading-compute-results.md | 14 ++++++++++++-- developers/ocean-cli/getting-asset-ddo.md | 6 +++++- developers/ocean-cli/starting-a-compute-job.md | 6 +++++- developers/ocean-cli/usage.md | 2 +- 5 files changed, 28 insertions(+), 6 deletions(-) diff --git a/developers/ocean-cli/consuming-an-asset.md b/developers/ocean-cli/consuming-an-asset.md index 22b004e3..363fd72f 100644 --- a/developers/ocean-cli/consuming-an-asset.md +++ b/developers/ocean-cli/consuming-an-asset.md @@ -1,6 +1,10 @@ # Consuming an asset -The process of consuming an asset is remarkably straightforward. To achieve this, you only need to execute a single command: npm run cli download 'assetDID' 'download-location-path' +The process of consuming an asset is remarkably straightforward. To achieve this, you only need to execute a single command: + +```bash +npm run cli download 'assetDID' 'download-location-path' +``` In this command, replace 'assetDID' with the specific DID of the asset you want to consume, and 'download-location-path' with the desired path where you wish to store the downloaded asset content diff --git a/developers/ocean-cli/downloading-compute-results.md b/developers/ocean-cli/downloading-compute-results.md index 37f1f37c..1ca96748 100644 --- a/developers/ocean-cli/downloading-compute-results.md +++ b/developers/ocean-cli/downloading-compute-results.md @@ -2,10 +2,20 @@ To retrieve the compute results, we'll employ two distinct methods. Initially, we'll use the getJobStatus method, where we'll wait for or periodically check the status until it indicates that the job is finished. Subsequently, we'll utilize the method to obtain the actual results. -For the first method, you'll need both the dataset DID and the compute job DID. You can execute the following command: npm run cli getJobStatus 'DATASET_DID' 'JOB_ID'. This command will enable you to monitor the status of the job and ensure it has completed successfully. +For the first method, you'll need both the dataset DID and the compute job DID. You can execute the following command: + +```bash +npm run cli getJobStatus 'DATASET_DID' 'JOB_ID' +``` + +This command will enable you to monitor the status of the job and ensure it has completed successfully.
getJobStatus
-For the second method, the dataset DID is no longer required. Instead, you'll need to specify the job ID, the index of the result you wish to download from the available results for that job, and the destination folder where you want to save the downloaded content. The corresponding command is as follows: npm run cli downloadJobResults 'JOB_ID' 'RESULT_INDEX' 'DESTINATION_FOLDER' +For the second method, the dataset DID is no longer required. Instead, you'll need to specify the job ID, the index of the result you wish to download from the available results for that job, and the destination folder where you want to save the downloaded content. The corresponding command is as follows: + +```bash + npm run cli downloadJobResults 'JOB_ID' 'RESULT_INDEX' 'DESTINATION_FOLDER' +```
downloadJobResults
diff --git a/developers/ocean-cli/getting-asset-ddo.md b/developers/ocean-cli/getting-asset-ddo.md index d854f493..891083de 100644 --- a/developers/ocean-cli/getting-asset-ddo.md +++ b/developers/ocean-cli/getting-asset-ddo.md @@ -1,5 +1,9 @@ # Getting asset DDO -Obtaining the DDO of an asset is a straightforward process. You can accomplish this task by executing the following command: npm run cli getDDO 'assetDID' +Obtaining the DDO of an asset is a straightforward process. You can accomplish this task by executing the following command: + +```bash +npm run cli getDDO 'assetDID' +```
getDDO method example
diff --git a/developers/ocean-cli/starting-a-compute-job.md b/developers/ocean-cli/starting-a-compute-job.md index fe220908..9224a643 100644 --- a/developers/ocean-cli/starting-a-compute-job.md +++ b/developers/ocean-cli/starting-a-compute-job.md @@ -2,7 +2,11 @@ To initiate a compute job, there are two main approaches you can take. The first method involves publishing both the dataset and algorithm, as detailed in the previous section Publish a dataset, and then proceeding to start the compute job. Alternatively, you can opt to explore available datasets and algorithms and initiate a compute-to-data job using a combination of your choice. -To demonstrate the latter option, you can utilize the following command: npm run cli startCompute 'DATASET_DID' 'ALGO_DID'. +To demonstrate the latter option, you can utilize the following command: + +```bash +npm run cli startCompute 'DATASET_DID' 'ALGO_DID' +``` In this command, 'DATASET_DID' should be replaced with the specific DID of the dataset you wish to employ, and 'ALGO_DID' with the DID of the algorithm you want to apply. By executing this command, you will trigger the initiation of a compute-to-data job that leverages the selected dataset and algorithm for processing. diff --git a/developers/ocean-cli/usage.md b/developers/ocean-cli/usage.md index 19c74dd3..62c4edcb 100644 --- a/developers/ocean-cli/usage.md +++ b/developers/ocean-cli/usage.md @@ -1,6 +1,6 @@ # Usage -The command npm run cli h returns a list of all commands and option flags. +The command below returns a list of all commands and option flags. ```bash npm run cli h