-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds original audio download feature
We can download recordings from the A2O or from Ecosounds. Closes #525
- Loading branch information
Showing
67 changed files
with
2,142 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: Download | ||
uid: command-download | ||
--- | ||
|
||
# Download | ||
|
||
- **Command**: `download` | ||
- **Config file**: none (no config file required) | ||
|
||
This command shows what sub-commands are available for the `download` command. | ||
|
||
## Usage | ||
|
||
```shell | ||
$ AnalysisPrograms.exe download | ||
``` | ||
|
||
 | ||
|
||
## Options | ||
|
||
```shell | ||
Downloads audio from a repository | ||
|
||
|
||
Commands: | ||
batch Download a multiple files from a remote repository | ||
file Download a single file from a remote repository | ||
repositories Lists available repositories which we can download from | ||
search Preview which files would be downloaded by the batch command | ||
``` | ||
|
||
This command has no options. See the sub-commands for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
title: Download Batch | ||
uid: command-download-batch | ||
--- | ||
|
||
# Download File | ||
|
||
- **Command**: `download file` | ||
- **Config file**: none (no config file required) | ||
|
||
This command downloads one or more files from a remote Acoustic Workbench server. | ||
You can use the <xref:command-download-search> command to preview which files would be downloaded by the batch command. | ||
|
||
|
||
## Usage | ||
|
||
```shell | ||
$ AnalysisPrograms.exe download batch [options] | ||
``` | ||
|
||
Here is an example of a command line with abbreviated path names: | ||
|
||
```shell | ||
$ AnalysisPrograms.exe download batch -s 1 -s 2 --start '2021-01-24' --end '2021-12-25' --repository="A2O" --auth-token "REDACTED" --output "D:\Temp\downloads" | ||
``` | ||
|
||
 | ||
|
||
This command downloads all the recordings from sites `1` and `2` which were recorded between `2021-01-24` and `2021-12-25`. | ||
|
||
You'll need to log in using an authentication token. You can get one by logging in to the website and clicking on the "My Account" link. | ||
|
||
## Options | ||
|
||
```shell | ||
Download a single file from a remote repository | ||
|
||
Usage: AnalysisPrograms.exe download batch [options] <Ids> | ||
|
||
Arguments: | ||
Ids One or more audio files to download | ||
|
||
Options: | ||
-p|--project-ids <PROJECT_IDS> Project IDs to filter recordings by | ||
-r|--region-ids <REGION_IDS> Region IDs to filter recordings by | ||
-s|--site-ids <SITE_IDS> Site IDs to filter recordings by | ||
--start <START> A date (inclusive) to filter out recordings. Can parse an ISO8601 date. | ||
--end <END> A date (exclusive) to filter out recordings. Can parse an ISO8601 date. | ||
-f|--flat If used will not place downloaded files into sub-folders | ||
-o|--output <OUTPUT> A directory to write output to | ||
-repo|--repository <REPOSITORY> Which repository to use to download audio from | ||
-a|--auth-token <AUTH_TOKEN> Your personal access token for the repository | ||
...<global options omitted>... | ||
``` | ||
|
||
- `-p|--project-ids <PROJECT_IDS>`: Project IDs to filter recordings by. | ||
- `-r|--region-ids <REGION_IDS>`: Region IDs to filter recordings by. | ||
- `-s|--site-ids <SITE_IDS>`: Site IDs to filter recordings by. | ||
- `--start <START>`: A date (inclusive) to filter out recordings. Can parse an ISO8601 date. | ||
- `--end <END>`: A date (exclusive) to filter out recordings. Can parse an ISO8601 date. | ||
- `-f|--flat`: If used will not place downloaded files into sub-folders. Normally recordings are split into sub-folders by their site name. | ||
- `-o|--output <OUTPUT>`: A directory to put the downloaded audio recordings into. | ||
- `-repo|--repository <REPOSITORY>`: Which repository to use to download audio from. Either `A2O` or `Ecosounds` | ||
- `-a|--auth-token <AUTH_TOKEN>`: Your personal access token for the repository. | ||
|
||
The options `--repo` and `--auth-token` are required. | ||
|
||
You can only choose one of `--project-ids`, `--region-ids`, or `--site-ids` per command. | ||
But for each you specify the option multiple times. For example, to search multiple sites, you can do this: | ||
|
||
``` | ||
... -p 123 -p 456 -p 789 ... | ||
``` | ||
|
||
If you specify a start date (`--start`) then you must also include an end date. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: Download File | ||
uid: command-download-file | ||
--- | ||
|
||
# Download File | ||
|
||
- **Command**: `download file` | ||
- **Config file**: none (no config file required) | ||
|
||
This command downloads one or more files from a remote Acoustic Workbench server. | ||
|
||
The files to download are identified by their unique identifiers. | ||
You can find the ID for any recording by looking at the URL of the recording, | ||
or by looking on the details page of a recording. | ||
|
||
## Usage | ||
|
||
```shell | ||
$ AnalysisPrograms.exe download [file_ids...] [options] | ||
``` | ||
|
||
Here is an example of a command line: | ||
|
||
```shell | ||
$ AnalysisPrograms.exe download file 1 2 3 4 5 7 --repository="A2O" --auth-token "REDACTED" --output "D:\Temp\download" | ||
``` | ||
|
||
 | ||
|
||
This command will download the files with the IDs `1`, `2`, `3`, `4`, `5`, and `7`. | ||
|
||
You'll need to log in using an authentication token. You can get one by logging in to the website and clicking on the "My Account" link. | ||
|
||
## Options | ||
|
||
```shell | ||
Download a single file from a remote repository | ||
|
||
Usage: AnalysisPrograms.exe download file [options] <Ids> | ||
|
||
Arguments: | ||
Ids One or more audio files to download | ||
|
||
Options: | ||
-f|--flat If used will not place downloaded files into sub-folders | ||
-o|--output <OUTPUT> A directory to write output to | ||
-repo|--repository <REPOSITORY> Which repository to use to download audio from | ||
-a|--auth-token <AUTH_TOKEN> Your personal access token for the repository | ||
...<global options omitted>... | ||
``` | ||
|
||
- `-f|--flat`: If used will not place downloaded files into sub-folders. Normally recordings are split into sub-folders by their site name. | ||
- `-o|--output <OUTPUT>`: A directory to put the downloaded audio recordings into. | ||
- `-repo|--repository <REPOSITORY>`: Which repository to use to download audio from. Either `A2O` or `Ecosounds` | ||
- `-a|--auth-token <AUTH_TOKEN>`: Your personal access token for the repository. | ||
|
||
All options except for `--flat` are required. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: Download Repositories | ||
uid: command-download-repositories | ||
--- | ||
|
||
# Download Repositories | ||
|
||
- **Command**: `download repositories` | ||
- **Config file**: none (no config file required) | ||
|
||
This list the available repositories which we can download from. | ||
|
||
## Usage | ||
|
||
```shell | ||
$ AnalysisPrograms.exe download repositories | ||
``` | ||
|
||
 | ||
|
||
## Options | ||
|
||
This command has not options. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
title: Download Search | ||
uid: command-download-search | ||
--- | ||
|
||
# Download File | ||
|
||
- **Command**: `download search` | ||
- **Config file**: none (no config file required) | ||
|
||
This command searches a repository for recordings. | ||
|
||
You can use this command to see which recordings would be downloaded by the <xref:command-download-batch> command. | ||
|
||
## Usage | ||
|
||
```shell | ||
$ AnalysisPrograms.exe download search [options] | ||
``` | ||
|
||
Here is an example of a command line: | ||
|
||
```shell | ||
$ AnalysisPrograms.exe download search -s 1 -s 2 --start '2021-01-24' --end '2021-12-25' --repository="A2O" --auth-token "REDACTED" | ||
``` | ||
|
||
 | ||
|
||
This command shows all the recordings from sites `1` and `2` which were recorded between `2021-01-24` and `2021-12-25`. | ||
|
||
You'll need to log in using an authentication token. You can get one by logging in to the website and clicking on the "My Account" link. | ||
|
||
## Options | ||
|
||
```shell | ||
Preview which files would be downloaded by the batch command | ||
|
||
Usage: AnalysisPrograms.exe download search [options] | ||
|
||
Options: | ||
-p|--project-ids <PROJECT_IDS> Project IDs to filter recordings by | ||
-r|--region-ids <REGION_IDS> Region IDs to filter recordings by | ||
-s|--site-ids <SITE_IDS> Site IDs to filter recordings by | ||
--start <START> A date (inclusive) to filter out recordings. Can parse an ISO8601 date. | ||
--end <END> A date (exclusive) to filter out recordings. Can parse an ISO8601 date. | ||
-repo|--repository <REPOSITORY> Which repository to use to download audio from | ||
-a|--auth-token <AUTH_TOKEN> Your personal access token for the repository | ||
...<global options omitted>... | ||
``` | ||
|
||
- `-p|--project-ids <PROJECT_IDS>`: Project IDs to filter recordings by. | ||
- `-r|--region-ids <REGION_IDS>`: Region IDs to filter recordings by. | ||
- `-s|--site-ids <SITE_IDS>`: Site IDs to filter recordings by. | ||
- `--start <START>`: A date (inclusive) to filter out recordings. Can parse an ISO8601 date. | ||
- `--end <END>`: A date (exclusive) to filter out recordings. Can parse an ISO8601 date. | ||
- `-repo|--repository <REPOSITORY>`: Which repository to use to download audio from. Either `A2O` or `Ecosounds` | ||
- `-a|--auth-token <AUTH_TOKEN>`: Your personal access token for the repository. | ||
|
||
The options `--repo` and `--auth-token` are required. | ||
|
||
You can only choose one of `--project-ids`, `--region-ids`, or `--site-ids` per command. | ||
But for each you specify the option multiple times. For example, to search multiple sites, you can do this: | ||
|
||
``` | ||
... -p 123 -p 456 -p 789 ... | ||
``` | ||
|
||
If you specify a start date (`--start`) then you must also include an end date. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// <copyright file="AcousticWorkbenchListResponse.cs" company="QutEcoacoustics"> | ||
// All code in this file and all associated files are the copyright and property of the QUT Ecoacoustics Research Group (formerly MQUTeR, and formerly QUT Bioacoustics Research Group). | ||
// </copyright> | ||
|
||
namespace AcousticWorkbench | ||
{ | ||
public class AcousticWorkbenchListResponse<T> | ||
: AcousticWorkbenchResponse<T> | ||
{ | ||
public T[] Data { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.