mirror of
https://github.com/Rigellute/spotify-tui.git
synced 2026-04-26 08:05:57 +03:00
[PR #645] [MERGED] Cli interface #949
Labels
No labels
bug
enhancement
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-tui#949
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Rigellute/spotify-tui/pull/645
Author: @OrangeFran
Created: 11/1/2020
Status: ✅ Merged
Merged: 12/30/2020
Merged by: @Rigellute
Base:
master← Head:cli📝 Commits (10+)
2465263Start implementing a cli6723ea3Change all args to subcommands46dd07fAdd new cli interface + playing track, playlist and search30c4b1fFix .about of certain subcommandsd267e06Remove forgotten println statement used for debugging8f96571Add -f format specifier5c281b2Change default value of status format3612374Format code by 'cargo fmt'0f01561Add api error handling5e215e0Fix small bugs📊 Changes
9 files changed (+1484 additions, -33 deletions)
View changed files
📝
README.md(+6 -1)➕
src/cli/clap.rs(+364 -0)➕
src/cli/cli_app.rs(+581 -0)➕
src/cli/handle.rs(+148 -0)➕
src/cli/mod.rs(+8 -0)➕
src/cli/util.rs(+259 -0)📝
src/main.rs(+79 -28)📝
src/network.rs(+3 -3)📝
src/user_config.rs(+36 -1)📄 Description
Hi there.
First of all, I know this is a lot of code. So sorry. I tried write the code as clean and as easy to understand as possible. Let me know if I can do anything to make this whole process easier for you. I actually did not have to make any architectural changes to the code base. I just use
network.handle_network_event(...).awaitdirectly to query from the server.This would implement a basic command line interface to control spotify. #429
Most of these arguments are self-explanatory. I tried my best with clap Args and ArgGroups.
What I like the most is the
formatoption. It replaces format specifiers with their value or 'None'.Possible specifiers are currently:
What needs to be done?
--repeatbug (does not work with RepeatState::Track) (spotifyd bug)--offsetflag?)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.