new command: check (like cargo)
This commit is contained in:
parent
b03b0ef5ee
commit
f5448e0e78
2 changed files with 5 additions and 0 deletions
|
@ -37,6 +37,8 @@ const DEFAULT_LENGTH: &str = "2^(2-log(2, l))*(60/T)";
|
||||||
pub(super) enum Cli {
|
pub(super) enum Cli {
|
||||||
/// Play a song
|
/// Play a song
|
||||||
Play(PlayOpts),
|
Play(PlayOpts),
|
||||||
|
/// Check for typos
|
||||||
|
Check(PlayOpts),
|
||||||
/// Export a song to an audio file or stdout
|
/// Export a song to an audio file or stdout
|
||||||
Export(ExportOpts),
|
Export(ExportOpts),
|
||||||
/// Memo menu for examples and general help about syntax and supported audio formats
|
/// Memo menu for examples and general help about syntax and supported audio formats
|
||||||
|
|
|
@ -26,6 +26,9 @@ fn main() -> anyhow::Result<()> {
|
||||||
debug!("options: {cli:#?}");
|
debug!("options: {cli:#?}");
|
||||||
use Cli::*;
|
use Cli::*;
|
||||||
match cli {
|
match cli {
|
||||||
|
Check(opts) => {
|
||||||
|
parse_and_compile(&opts)?;
|
||||||
|
}
|
||||||
Play(opts) => {
|
Play(opts) => {
|
||||||
let (_stream, stream_handle) = OutputStream::try_default()
|
let (_stream, stream_handle) = OutputStream::try_default()
|
||||||
.context("Failed to find (or use) default audio device")?;
|
.context("Failed to find (or use) default audio device")?;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue