ShellFm

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

ShellFm

#1 Post by aragon »

Home: http://nex.scrapping.cc/shell-fm/
Version: 0.7
shell-fm is a lightweight, console-based player for Last.FM radio streams. It's pretty small (the binary is currently a little smaller than 60K, or 50K when stripped) and it has most features the "official" player has, if not even a few more.
Compiled an tested in 4.31.

After installation you will first have to setup your shell-fm.rc at /root/.shell-fm/shell-fm.rc . There is a template File at the folder to not mess up an eventualy allready existing rc-File. The options are self-explanatory.

Usage is simple.
- There's a starter at Multimedia => ShellFM
- If you did not setup your shell-fm.rc you will be asked for your login-details. If you have setup it will automatically login.
- if you're using a proxy, you will definitely have to setup the rc-file.
- If you have defined a default-radio in the rc-file just start shell-fm and the default will autoplay.
- If you don't have, start shell-fm with 'shell-fm lastfm://your-link-to-a-stream' in a shell. e.g 'shell-fm lastfm://artist/Bugge%2520Wesseltoft/similarartists'

A little help is 'shell-fm -h'.
While running shell-fm, you will find all options by pressing '?'.

Have fun
aragon
Attachments
shell-fm-0.7.pet
(37.9 KiB) Downloaded 962 times
Last edited by aragon on Fri 13 Nov 2009, 20:15, edited 6 times in total.

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#2 Post by HairyWill »

Thanks for posting this I did toy for a while with packaging it up with instructions and a graphical launcher but then moved on to something else. What I really wanted to do was to launch the player and then build a gtkdialog app to control it via the socket interface, but I don't think I ever managed to work out how to control it like this.

It is so much lighter than the bloated qt based LastFmPlayer which I think is kicking round the forum somewhere. To be honest recently I have just been using the lash based player on the website but again that is a horrendous resource waste and the website is so loaded with AJAX that browsing it is starting to get quite painful.

The icon in the pet is at /usr/share/mini-icons in my pup muppy008 this is actually a symlink to /usr/local/lib/X11/mini-icons this means that the icon doesn't get installed. I suspect that the installer doesn't cope with symlinked dirs but am surprised I wasn't aware of it before now.

By default clicking on the menu entry gets an rxvt window that closes very quickly. You might consider repackaging with the default username and password lines commented out in the rc file, this way it will ask you for login credentials. As you stated taking the effort to edit the rc file with your credentials avoids having to enter the login details at all.

For anyone interested you can signup for a free LastFM account here
https://www.last.fm/join/
There is a rather small puppylinux group, 3 more members and we will start generating a group chart. I imagine that will be rather ecclectic.
http://www.last.fm/group/Puppy+Linux
There is also a shell-fm user group
http://www.last.fm/group/shell-fm

When it is running you can select a stream by hitting r and then entering a radio url such as
globaltags/goa
artist/The Eagles/similarartists
artist/Kings of Leon/fans

happy scrobbling
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#3 Post by aragon »

Hi Will,

thanks for your hints. I've repackaged it, and now everything should be fixed. Updated first post.

Cheers
aragon

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#4 Post by aragon »

Updated to 0.5. See main post.

cheers
aragon

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#5 Post by aragon »

Updated to 0.6. See main post.

cheers
aragon

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#6 Post by HairyWill »

I've been playing around with this recently.
shell-fm can now be controlled over a network interface using netcat ie

Code: Select all

# echo "info" | nc localhost 54311
np: Ultravox - Vienna
COMMANDS
This section describes the commands shell-fm's network interface knows. To use the interface, you must provide a valid value to the bind option in your configuration or use the -i option on the command line. Then you can connect the specified port (54311 by default) and send one command at a time. You also have to hurry, since there is a very short timeout. Best thing would be if you used a script for accessing this interface. (See shell-fm-*/scripts/ for examples) This is a list of the known commands.

play lastfm://...
Play the given stream.
love
Love the currently played track.
ban
Ban the currently played track.
skip
Skip the currently played track.
quit
Quit.
info some-format-string
Evaluate the given format string (check the FORMAT FLAGS section) and return the formatted information.
pause
Pause.
discovery
Toggle discovery mode on/off.
tag-artist some-comma-separated-tags
Tag the artist of the currently played track.
tag-album some-comma-separated-tags
Tag the album of the currently played track.
tag-track some-comma-separated-tags
Tag the currently played track.
artist-tags
Returns the tags of the currently played tracks artist.
album-tags
Returns the tags of the currently played tracks album.
track-tags
Returns the tags of the currently played track.
stop
Stop stream.

I have also installed the lyrics fetcher from here:
moc-lyrics
The following command in my shell-fm.rc can be used to popup the lyrics of the current track in a separate window when I hit the o key. Should be a single line

Code: Select all

key0x6F = echo "Searching for lyrics" ; /root/.moc/moc-lyrics.pl --artist "%a" --title "%t" 2> /dev/null > /tmp/lyrics.txt && gxmessage -file /tmp/lyrics.txt || echo "No lyrics found"
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#7 Post by aragon »

hi will,

i didn't understand half of what you're writing. but isn't thit the base for that:
...What I really wanted to do was to launch the player and then build a gtkdialog app to control it via the socket interface...
if yes, please...

aragon

mulrah
Posts: 27
Joined: Thu 19 Mar 2009, 06:56

Thank You!

#8 Post by mulrah »

Thank you for this! I was so sick of Pandora hogging my resources. This is smooth and a perfect fit for the whole Puppy experience. Nice work.

kuapao
Posts: 94
Joined: Tue 01 Jul 2008, 05:30

thank you for shell-fm

#9 Post by kuapao »

This is very useful. Thank you for sharing it! It has helped me to reuse an antiquated laptop as a last.fm music player.

I wonder what RTP is?

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#10 Post by aragon »

kuapao: sorry, i don't understand your question

aragon

kuapao
Posts: 94
Joined: Tue 01 Jul 2008, 05:30

RTP

#11 Post by kuapao »

aragon wrote:kuapao: sorry, i don't understand your question

aragon
It's okay, I found it. I was asking about this setting in shell-fm: "P = enable/disable RTP". RTP stands for "record tracks to profile".

kuapao
Posts: 94
Joined: Tue 01 Jul 2008, 05:30

default music player in Puppy 4.2.0?

#12 Post by kuapao »

When I use shell-fm, it is able to play the track just fine (but doesn't bring up a player GUI, which is fine). I am curious, how is it playing back the track? I am looking in the process list and do not find any process that gives me a clue which application is playing back the song. Is it going directly to the sound driver?

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#13 Post by aragon »

hi kuapao,

should be libmad. but you could specify an external app in the config-file.

info: there is a version 0.7 available, that i will compile today or tomorrow.

aragon

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#14 Post by aragon »

Updated to 0.7. See main post.

cheers
aragon

kuapao
Posts: 94
Joined: Tue 01 Jul 2008, 05:30

thanks!

#15 Post by kuapao »

Thanks!

User avatar
Dannello
Posts: 9
Joined: Wed 16 Sep 2009, 14:16
Location: St. Cloud, MN (USA)

thanks!

#16 Post by Dannello »

Thank you so much for wrapping this into a pet, the flash player was beginning to stress my system, but the console player works beautifully, and I always love it when someone takes the time to make a .pet!

Post Reply