-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds original audio download feature #526
Conversation
We can download recordings from the A2O or from Ecosounds. Closes #525
Downgrades on dotnet restore were causing failures in the build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this looks fine. The services seem to be fairly well written, and most of the code using it is fairly simple. Only concern I have is the download file
command which seems to have a confused use case. Giving it the ability to download multiple files using the file IDs blurs the line between it and the download batch
command. There doesn't seem to be a reason to separate their functionality. This confusion has lead to weird/conflicting documentation in the manual for download file
.
Usage: AnalysisPrograms.exe download batch [options] <Ids> | ||
|
||
Arguments: | ||
Ids One or more audio files to download |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Audio recording ids? How do users find this information?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point, however, the shell help (for which this is) must be fairly terse. I'll add a guide that describes how to get these Ds
-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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar issue, will need to tell users how to find this information
--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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to AnalysisPrograms.exe download repositories
?
{ | ||
if (this.Repository.IsNullOrEmpty()) | ||
{ | ||
throw new CommandLineArgumentException("The repository option must be specified"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not give the repositories hint here as well?
{ | ||
if (this.AuthToken.IsNullOrEmpty()) | ||
{ | ||
this.Console.InfoLine($"An authentication token is needed to connect to {this.Repository}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Authentication hint on where to find this?
} | ||
|
||
// https://raw.githubusercontent.com/spectreconsole/spectre.console/a690ce49556615fea49e61972646eb52a11bbdb5/src/Spectre.Console/Internal/FileSize.cs | ||
internal struct FileSize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming from JS, I'm surprised there is no library for this
// <copyright file="FileSize.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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this valid for this file?
{ | ||
console.WriteLine(message, Info); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static void HackerLine(this IAnsiConsole console, string message)
{
console.WriteLine("I'm in: " + message, new (foreground: Color.Green, background: Color.black));
}
Co-authored-by: Charles Alleman <[email protected]>
Co-authored-by: Charles Alleman <[email protected]>
Co-authored-by: Charles Alleman <[email protected]>
Co-authored-by: Charles Alleman <[email protected]>
Co-authored-by: Charles Alleman <[email protected]>
We can download recordings from the A2O or from Ecosounds.
Closes #525
Changes
Adds 5 new commands:
Issues
Still need to add unit tests.
Visual Changes
See images included in docs.
Final Checklist