diff --git a/src/main.cpp b/src/main.cpp index 8a70dc2..fdc0981 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,15 +3,27 @@ #include #include int main(int argc, char **argv) { + CLI::App app{"Spotify Downloader"}; - std::string url; + app.require_subcommand(1); - app.add_option("-u,--url", url, "Spotify item URL"); + auto *cmd_download = + app.add_subcommand("download", "Download tracks directly"); + auto *cmd_convert = + app.add_subcommand("convert", "Convert assets between platforms"); + + std::string url; + cmd_download->add_option("url", url, "Target URL for Playlist or Song") + ->required(); + + std::string output; + cmd_download->add_option("output", output, "Output filename or directory") + ->required(false); CLI11_PARSE(app, argc, argv); - if (!url.empty()) { + if (cmd_download->parsed()) { std::cout << "Target URL: " << url << "\n"; }