Skip to content

Commit

Permalink
Implement structure for commands on CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
innng committed Mar 12, 2022
1 parent a4ba011 commit 1eda621
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 22 deletions.
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

# Spotty
# Crabby

A player for those who wants to listen to music on Spotify right from the terminal.

Expand All @@ -15,23 +14,27 @@ A player for those who wants to listen to music on Spotify right from the termin
## Usage/Examples

```bash
$ spotty connect
$ spotty playlists
$ spotty search
$ spotty toggle play-pause
$ spotty previous
$ spotty next
$ spotty mute
$ spotty list <Object_URI>
$ crabby connect
$ crabby disconnect
$ crabby get-playback
$ crabby list
$ crabby next
$ crabby pause
$ crabby play
$ crabby previous
$ crabby search
$ crabby status
$ crabby stop
$ crabby suffle
```


## Installation

Install spotty with cargo
Install crabby with cargo

```bash
cargo install spotty
cargo install crabby
```

## Documentation
Expand All @@ -43,7 +46,7 @@ Install spotty with cargo

- Implement CLI structure
- Implement Spotify connection with token refresh
- Integrate spotifyd daemon on spotty
- Integrate spotifyd daemon on crabby
- Implement basic playback control


Expand All @@ -58,9 +61,9 @@ Please adhere to this project's [WIP]`code of conduct`.

## FAQ

#### What makes spotty different from spotifyd?
#### What makes crabby different from spotifyd?

Spotifyd is a daemon which purpose is to be a device for streaming Spotify musics and podcasts, but it doesn't support playback control. Spotty is aimed to be both a Spotify daemon and a Spotify playback player.
Spotifyd is a daemon which purpose is to be a device for streaming Spotify musics and podcasts, but it doesn't support playback control. crabby is aimed to be both a Spotify daemon and a Spotify playback player.


## License
Expand Down
25 changes: 18 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
use clap::{Parser, Subcommand};

/// Hello, this is Crabby, your friend that plays Spotify music for you!
#[derive(Parser)]
#[derive(Debug, Parser)]
#[clap(author, version, about, long_about = None)]
struct Args {
#[clap(subcommand)]
command: Option<Commands>,
}

#[derive(Subcommand)]
#[derive(Debug, Subcommand)]
enum Commands {
Status,
Play,
Connect,
Disconnect,
GetPlayback,
List {
resource: String,
},
Next,
Pause,
Play {
uri: Option<String>,
},
Previous,
Search,
Status,
Stop,
Connect,
Suffle
Suffle,
}

fn main() {
let args = Args::parse();

println!("{:#?}", args);
}

0 comments on commit 1eda621

Please sign in to comment.