Skip to content

Commit 6a520aa

Browse files
Merge pull request #892 from planetlabs/fix-cli-examples-869
Fixed broken Data and Orders CLI examples
2 parents 8308fbd + b679d70 commit 6a520aa

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

docs/cli/cli-intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ represent GeoJSON features, the JSON blob is a GeoJSON FeatureCollection.
173173
Otherwise, the JSON blob is a list of the individual results.
174174

175175
```console
176-
$ planet data search PSScene | planet collect -
176+
planet data search PSScene | planet collect -
177177
```
178178

179179
This gives you a fully compliant GeoJSON FeatureCollection, which is

docs/cli/cli-orders.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You can also filter orders by their `state`, which can be useful to just see ord
3636
progress:
3737

3838
```console
39-
planet orders --state running
39+
planet orders list --state running
4040
```
4141

4242
The other options are queued, failed, success, partial and cancelled.
@@ -100,7 +100,7 @@ To create an order you need a name, a [bundle](https://developers.planet.com/api
100100
First lets get the ID of an item you have download access to, using the Data API:
101101

102102
```
103-
planet data filter | planet data search PSScene --limit 1 - | jq -r .id
103+
planet data filter | planet data search PSScene --limit 1 --filter - | jq -r .id
104104
```
105105

106106
If you don't have access to PlanetScope data then replace PSScene with SkySatCollect.
@@ -515,7 +515,7 @@ One cool little trick is that you can even stream in the JSON directly with `cur
515515

516516
```console
517517
curl -s https://raw.githubusercontent.com/planetlabs/planet-client-python/main/docs/cli/request-json/tools-clip-composite.json \
518-
| planet orders request --item-type PSScene --bundle analytic_sr_udm2 --name 'Streaming Clip & Composite' \
518+
| planet orders request --item-type PSScene --bundle analytic_sr_udm2 --name 'Streaming Clip & Composite' --no-stac \
519519
20220605_124027_64_242b,20220605_124025_34_242b --tools - | planet orders create -
520520
```
521521

@@ -550,7 +550,7 @@ STAC metadata by default, as the STAC files are small and often more useful than
550550
You can easily turn off STAC output request with the `--no-stac` command:
551551

552552
```
553-
planet orders request PSScene visual --name 'No STAC' --no-stac --id 20220605_124027_64_242b
553+
planet orders request --item-type PSScene --bundle visual --name 'No STAC' --no-stac 20220605_124027_64_242b
554554
```
555555

556556
Currently this needs to be done for any 'composite' operation, as STAC output from composites is not yet
@@ -672,7 +672,7 @@ image that was published:
672672

673673
```console
674674
planet orders request --item-type SkySatCollect --bundle analytic --name 'SkySat Latest' \
675-
`planet data filter | planet data search SkySatCollect --sort 'acquired desc' --limit 1 - | jq -r .id` \
675+
`planet data filter | planet data search SkySatCollect --sort 'acquired desc' --limit 1 --filter - | jq -r .id` \
676676
| planet orders create -
677677
```
678678

@@ -681,7 +681,7 @@ Or get the 5 latest cloud free images in an area and create an order that clips
681681

682682
```console
683683
ids=`planet data filter --geom geometry.geojson --range clear_percent gt 90 | planet data \
684-
search PSScene --limit 5 - | jq -r .id | tr '\n' , | sed 's/.$//'`
684+
search PSScene --limit 5 --filter - | jq -r .id | tr '\n' , | sed 's/.$//'`
685685
planet orders request --item-type PSScene --bundle analytic_sr_udm2 --name 'Clipped Scenes' \
686686
$ids --clip geometry.geojson | planet orders create -
687687
```

docs/cli/cli-tips-tricks.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,11 @@ planet orders list | jq -rs '.[3] | "\(.id) \(.created_on) \(.name) \(.state)"'
301301

302302
* Use jq to show just orders that have a given item type, like just skysat.
303303

304-
planet orders list | jq -rs '.[] | "\(.id) \(.created_on) \(.state) \(.products[0].item_type)"' will show the item type
304+
```console
305+
planet orders list | jq -rs '.[] | "\(.id) \(.created_on) \(.state) \(.products[0].item_type)"'
306+
```
305307

306-
https://gist.github.com/ipbastola/2c955d8bf2e96f9b1077b15f995bdae3 has ideas for contains, but haven't got it right yet
308+
will show the item type https://gist.github.com/ipbastola/2c955d8bf2e96f9b1077b15f995bdae3 has ideas for contains, but haven't got it right yet
307309

308310
* use jq to get the id of the an order by it's name
309311

0 commit comments

Comments
 (0)