Files
djdeck/src/main.rs

37 lines
846 B
Rust

mod app;
mod audio;
mod cache;
mod deck;
mod effect_chain;
mod file_selector;
mod osc;
mod tui;
use anyhow::Result;
use std::path::PathBuf;
#[tokio::main]
async fn main() -> Result<()> {
// Log to file so we don't pollute the TUI
let log_file = std::fs::File::create("/tmp/djdeck.log")?;
tracing_subscriber::fmt()
.with_env_filter(
tracing_subscriber::EnvFilter::from_default_env()
.add_directive(tracing::Level::INFO.into()),
)
.with_writer(log_file)
.init();
tracing::info!("djdeck starting");
// Parse command line argument for audio directory
let audio_dir = if std::env::args().len() > 1 {
Some(PathBuf::from(std::env::args().nth(1).unwrap()))
} else {
None
};
let mut app = app::App::new(audio_dir)?;
app.run().await
}