Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse commandline args as separate songs for playlist #22

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

davehouse
Copy link

@davehouse davehouse commented Oct 31, 2016

This changes the argument handling to allow for 1+ grouped search terms and handling stdin (pipes not tty) the same as arguments to allow piping in a "playlist" set of search terms and/or song urls.

  cloudruby [--config-args] [(search terms|track urls)]

  # Examples

  cloudruby          # query the latest 100 tracks from soundcloud
  cloudruby $search  # query the latest 100 tracks that match the $search keywords

  ## play a soundcloud url directly
  cloudruby http://soundcloud.com/crassmix/feint-clockwork-hearts-crass

  ## create a playlist from arguments (urls and/or grouped search keywords)
  cloudruby --no-shuffle=true https://soundcloud.com/adapt77/auto-ok-ecophal manicanparty heart "sellorekt thunderbolt" https://soundcloud.com/wearesoundspace/premiere-malbetrieb-ghetto "elektroschneider lenny"
  > search terms are grouped when quoted or adjacent to urls or quoted strings

  ## create a playlist from a pipe
  > stdin is also parsed as arguments if piped into the process
  cloudruby --no-shuffle=true < local-playlist-filename
  printf "sellorekt iris\nmanicanparty eyes" | cloudruby

@davehouse
Copy link
Author

The curses ui is not displayed until the searches are complete and the playlist is generated. So, it appears to stall until the searches are compelte. It may be nice to print out the search terms while they are being processed/searched. Or we could change the ui to list a curses window or something showing the status/progress of searches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant