Skip to content

Commit

Permalink
Docs - Documentação para o CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-russo committed Sep 26, 2023
1 parent 9fa97ff commit 0dcdd85
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ intuitiva realizar diversas ações, como:

Veja todos os [exemplos de uso](https://cbers4asat.readthedocs.io/pt_BR/latest/examples/) na documentação.

Também disponível uma [Interface de Linha de Comando](https://www.hostinger.com.br/tutoriais/o-que-e-cli) (CLI) do `cbers4asat` para Windows e Linux. [Clique aqui e saiba mais](https://cbers4asat.readthedocs.io/pt_BR/latest/cli/).

---
[![Latest Version](https://img.shields.io/pypi/v/cbers4asat?style=plastic)](https://pypi.python.org/pypi/cbers4asat/)
[![Latest Version](https://img.shields.io/pypi/l/cbers4asat?style=plastic)](https://github.com/gabriel-russo/cbers4asat/blob/master/LICENSE)
Expand All @@ -23,6 +25,7 @@ Veja todos os [exemplos de uso](https://cbers4asat.readthedocs.io/pt_BR/latest/e
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
![GitHub Workflow Status](https://github.com/gabriel-russo/cbers4asat/actions/workflows/build-cbers4asat.yml/badge.svg)
![GitHub Workflow Status](https://github.com/gabriel-russo/cbers4asat/actions/workflows/build-cbers4asat-cli.yml/badge.svg)
![GitHub Workflow Status](https://github.com/gabriel-russo/cbers4asat/actions/workflows/test-cbers4asat.yml/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/cbers4asat/badge/?version=latest)](https://cbers4asat.readthedocs.io/pt_BR/latest/?badge=latest)
> [Read this README in english (old version of docs)](https://github.com/gabriel-russo/cbers4asat/blob/master/en-US_README.md)
Expand Down
69 changes: 69 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# CLI

## Download

Vá até as releases e procure pelo versão mais recente de `cbers4asat-cli` e baixe o executável que mais se adeque ao seu sistema operacional.

https://github.com/gabriel-russo/cbers4asat/releases

## Opções

| Arg. Curto | Arg. Longo | Tipo | Obrigatório | Descrição |
|------------|--------------|---------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| -u | --user | TEXTO | Sim | E-mail cadastrado no site do [dgi inpe explore](http://www.dgi.inpe.br/catalogo/explore) |
| -g | --geometry | ARQUIVO | Sim | Caminho até o arquivo GeoJSON com polígonos que serão utilizados como parâmetros de busca |
| | --collection | LISTA | Sim | [Nome das coleções](https://cbers4asat.readthedocs.io/pt_BR/latest/quickstart/#colecoes-de-imagens) que irão ser utilizadas como fonte dos dados |
| -s | --start | TEXTO | Não | Data de início utilizando o formato YYYY-MM-DD (Padrão: HOJE - 1 SEMANA) |
| -e | --end | TEXTO | Não | Data final utilizando o formato YYYY-MM-DD (Padrão: HOJE) |
| -c | --cloud | INTEIRO | Não | Quantidade de cobertura de núvens máximo na imagem (Padrão: 100) |
| -l | --limit | INTEIRO | Não | Quantidade de cenas limite retornadas por busca (Padrão: 25) |
| -i | --id | TEXTO | | **NÃO DISPONÍVEL** |
| -h | --help | | | Mostra texto de ajuda para utilização |
| -v | --version | | | Mostra o número da versão |


## Exemplos

### Linux

Exemplo 1: Buscando imagens das coleções `CBERS4A_WPM_L4_DN` e `AMAZONIA_WFI_L2_DN`
```commandline
cbers4asat --geometry area.geojson --user [email protected] --collection CBERS4A_WPM_L4_DN AMAZONIA_WFI_L2_DN
```

Exemplo 2: Buscando imagens das coleções `CBERS4A_WPM_L4_DN` e `AMAZONIA_WFI_L2_DN` que estão intersectando
fazenda.geojson entre as datas de 25/07/2023 e 25/08/2023, limitando 25 cenas no output.
```commandline
cbers4asat --geometry fazenda.geojson --user [email protected] --collection CBERS4A_WPM_L4_DN AMAZONIA_WFI_L2_DN --start 2023-07-25 --end 2023-08-25 --limit 25
```

Exemplo 3: O mesmo do exemplo 2, porém as cenas devem possui menos de 25% de cobertura de nuvem
```commandline
cbers4asat --geometry fazenda.geojson --user [email protected] --collection CBERS4A_WPM_L4_DN AMAZONIA_WFI_L2_DN --start 2023-06-25 --end 2023-08-25 --limit 25 --cloud 25
```

Output do exemplo 3:
```
2 scenes found
---
Product CBERS4A_WPM22812420230718 - Date: "2023-07-18T14:53:57", Sensor: "WPM", Satellite: "CBERS4A"
Product CBERS4A_WPM22812520230718 - Date: "2023-07-18T14:54:10", Sensor: "WPM", Satellite: "CBERS4A"
```

### Windows

Todos os comandos do exemplo de linux irão funcionar no windows, basta adicionar o sufixo ".exe" do executável.

```commandline
cbers4asat.exe --geometry area.geojson --user [email protected] --collection AMAZONIA1_WFI_L4_DN AMAZONIA1_WFI_L2_DN --start 2023-07-25
```

Output:
```
4 scenes found
---
Product AMAZONIA1_WFI03901620230728CB10 - Date: "2023-07-28T15:01:40", Sensor: "WFI", Satellite: "AMAZONIA1"
Product AMAZONIA1_WFI03901720230728CB10 - Date: "2023-07-28T15:03:20", Sensor: "WFI", Satellite: "AMAZONIA1"
Product AMAZONIA1_WFI03801620230726CB10 - Date: "2023-07-26T14:41:40", Sensor: "WFI", Satellite: "AMAZONIA1"
Product AMAZONIA1_WFI03801720230726CB10 - Date: "2023-07-26T14:43:20", Sensor: "WFI", Satellite: "AMAZONIA1"
```

0 comments on commit 0dcdd85

Please sign in to comment.