You are not logged in.
Hello forum, I'm looking for a program/script, or whatever you want to call it, for soundcloud. For example you run it and it plays a random song from soundcloud, or you search for songs and play them if they exist. I have tried searching around the net and I found some apps (http://soundcloud.com/apps/category/discover-listen) from the soundcloud website, but I'm looking for something lightweight, like a mocp integration. I would love some input.
Cheers ![]()
Offline
Offline
Sure it will, but I don't have any programming knowledge. ![]()
Offline
Bump.
Offline
Hello guys,
take a look here:
https://github.com/kulpae/cloudruby
I wrote it in ruby. It uses ncurses to show an user interface in a terminal emulator and plays it with mpg123.
Install all the requirements:
sudo pacman -S ruby mpg123 ncurses
sudo gem install rbcurse --pre
sudo gem install ncurses if the last step fails, do this:
wget http://github.com/downloads/rkumar/rbcurse/ncurses-1.2.4.gem
sudo gem install --local ncurses-1.2.4.gemThen open it with
cloudrubyor
cloudruby "my favorite artist or genre" Please report any bugs, so I can fix them.
cheers, kulpae
Offline
Why soundcloud, if you want to just listen to music? Why not the dozens of free actual internet radio services? Grooveshark, Pandora and Last.FM have client available for Linux, and all these sites do is play the music you want to hear.
Offline
@kulpae Thanks a lot, will try it out!
@ANOKNUSA Well, i quite like the music uploaded to soundcloud and last.fm gives me a trial when i register, like 24 hours of playing or so. Haven't looked into the other you've mentioned, but i will check them.
Offline
Great stuff! I'll create a PKGBUILD and put it in the AUR if you don't mind. I've been looking for a software like that, because there's a lot on soundcloud I'd like to listen to, but it doesn't really work well here in the browser.
Offline
yeah of course ![]()
I'm planing to improve it, so that it'll show the playlist. Maybe it'll also shuffle the playlist and play it continuously, so that it's possible to go to the previously played track...
Offline
Ok, I'll have to ask here first, because I've never created a PKGBUILD for a ruby package, especially this gem stuff is something I don't know much about.
Here's my prototype
PKGBUILD
# Maintainer: Army <uli armbruster who uses the google mail service>
pkgname=cloudruby-git
pkgver=20110807
pkgrel=1
pkgdesc=""
arch=('i686' 'x86_64')
url="https://github.com/kulpae/cloudruby"
license=(custom)
depends=('ruby')
makedepends=('git')
provides=('cloudruby')
conflicts=('cloudruby')
source=(https://github.com/downloads/rkumar/rbcurse/ncurses-1.2.4.gem sh)
_gitroot="https://github.com/kulpae/cloudruby.git"
_gitname="cloudruby"
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [ -d ${_gitname} ] ; then
cd ${_gitname} && git pull origin
msg "The local files are updated."
else
git clone ${_gitroot} ${_gitname}
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf "${srcdir}/${_gitname}-build"
cp -a "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
ln -s "${srcdir}/ncurses-1.2.4.gem" "${srcdir}/${_gitname}-build/ncurses-1.2.4.gem"
}
package() {
cd "${srcdir}/${_gitname}-build"
local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
gem install -i "$pkgdir$_gemdir" rbcurse --pre
gem install -i "$pkgdir$_gemdir" ncurses
install -Dm755 "${srcdir}/sh" "${pkgdir}/usr/bin/${_gitname}"
install -Dm755 "${_gitname}" "${pkgdir}/opt/${_gitname}/${_gitname}"
install -Dm644 "mpg123player.rb" "${pkgdir}/opt/${_gitname}/mpg123player.rb"
install -Dm644 "ncurses_ui.rb" "${pkgdir}/opt/${_gitname}/ncurses_ui.rb"
install -Dm644 "soundcloud.rb" "${pkgdir}/opt/${_gitname}/soundcloud.rb"
# license
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
}
md5sums=('2a64363e453731a268d98440e3e03177'
'3503e26a3c31b7521ffec60485c03df9')sh
#!/bin/sh
cd /opt/cloudruby
./cloudrubyI guess this PKGBUILD is crap, because instead of building that ncurses stuff I'd better use them as dependencies. There is a package ruby-ncurses in the AUR, but it doesn't work with that one.
kulpae, I have a first feature request:
cloudruby http://soundcloud.com/iambulb/jetpacks-was-yes-slowIt would be awesome if it was possible, that cloudruby then plays that file. Would be perfect for scripting.
Offline
right... ncurses is pretty buggy with ruby 1.9 now, so only this locally installed gem works on my system (x86_64)...
and it's better to install with "gem install -i" I suppose, because it also supports RVM.
As far as I know ruby-ncurses installs to system lib folder, so RVM won't find it, as RVM saves the gems in ~/.rvm/gems/${ruby-version}@${gemset}/gems/...
this stuff with RVM makes it much more complicated... maybe we should start it with the system's ruby, then ruby-ncurses will suffice, if it'll compile ![]()
regarding the feature request,
I'll first allow this:
cloudruby iambulb/jetpacks-was-yes-slow
then I'll parse the url to this notation. Yepp, doable ![]()
edit: this now works: (thanks to /resolve api)
cloudruby http://soundcloud.com/iambulb/jetpacks-was-yes-slowLast edited by kulpae (2011-08-07 14:07:54)
Offline
ruby-ncurses is stil lbugy and throws this error:
undefined symbol: STR2CSTRmaybe we can help them fixing it...
I found a fix for it (here)
and tried it and it works!
All I'm doing is the same ruby-ncurses from AUR is doing, except I apply some changes before `make`.
I already wrote a comment on ruby-ncurses AUR site, so hopefully the maintainer will adapt it. If he will, then we can use ruby-ncurses as a dependency.
cheers, kulpae
Last edited by kulpae (2011-08-07 16:13:28)
Offline
Ok, will it then be enough to install the files into /opt ?
By the way, I tried cloudruby http://soundcloud.com/iambulb/jetpacks-was-yes-slow but other tracks are being played.
Offline
Ok, will it then be enough to install the files into /opt ?
rbcurse is still required... but I'll try to get rid of this dependancy and do all the ncurses stuff by myself...
By the way, I tried cloudruby http://soundcloud.com/iambulb/jetpacks-was-yes-slow but other tracks are being played.
forgot `git pull origin master`?
if not, then it's weird ![]()
if I try the same command as you, it plays the correct track...
Last edited by kulpae (2011-08-07 16:51:25)
Offline
Yes I'm on the most up to date snapshot. But cloudruby behaves as if there was no argument at all.
Could you try it with my PKGBUILD? It's in the AUR
Offline
easy to fix:
in the file `sh`
#!/bin/sh
cd /opt/cloudruby
./cloudruby $*and if we want to make it unaffected by RVM, this version is better:
#!/bin/sh
cd /opt/cloudruby
/usr/bin/ruby cloudruby $*Offline
oh, I think $* is not correct, though it works mostly... better to replace it with $@
Offline
Damn, I'm so stupid!!!!! Thanks!
Offline
new update!
new feature: with the key `p` you can go to previously played track!
also got rid of the rbcurse gem, the ui changed the look a little in the process...
another nice side effect: the cpu load dropped significantly.
cheers, kulpae
Last edited by kulpae (2011-08-07 22:57:37)
Offline
Great! I'll update my PKGBUILD.
Offline
new update!
Added a playlist widget.
Fixed resize bug.
Screenshot:
Last edited by kulpae (2011-08-13 19:26:39)
Offline
Very nice Alter! But seems like cloudruby doesn't play the most recent files anymore if it gets no argument. Is this intended?
Offline
it does!
Before playing the tracks, cloudruby shuffles the playlist...
I'll implement a `--no-shuffle` argument later, so we have an option to avoid it.
cheers, Paul
Offline
Ok, I guess this was caused by the bad internet connectivity I had for a few moments yesterday. Now it works again. Sorry for the false alarm ![]()
Offline
What about the ability to download the files?
Offline