Skip to content
This repository has been archived by the owner on Dec 18, 2020. It is now read-only.

Commit

Permalink
Fails. See clap-rs/clap#1965
Browse files Browse the repository at this point in the history
  • Loading branch information
kiobu committed Aug 30, 2020
1 parent 04778de commit 488e061
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# kaste
kiobu's awesome spotify terminal extension, name not withstanding

Kiobu's Awesome Spotify Terminal Extension, name not withstanding.

Mostly made for myself, but gives developers a way to pipe DBus queries for Spotify through their terminal.


17 changes: 16 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
use spotifyqdbus::*;
use clap::{Arg, App};
fn main() {

let matches = App::new("Example")
.author("kiobu")
.about("Mange your Spotify through the terminal.")
.arg(Arg::new("play")
.long("play")
.required(false))
.arg(Arg::new("pause")
.long("pause")
.required(false))
.get_matches();

if matches.is_present("play") {
spotify::exec("Play");
} else if matches.is_present("pause") {
spotify::exec("Pause");
}
}

0 comments on commit 488e061

Please sign in to comment.