You are not logged in.

#1 2010-01-20 05:03:01

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

pimpd - Perl Interface for the Music Player Daemon

URL: http://github.com/trapd00r/pimpd
AUR:http://aur.archlinux.org/packages.php?ID=39028&detail=1
Clone: git://github.com/trapd00r/pimpd.git
Manpage: http://github.com/trapd00r/pimpd/blob/master/README.md

pimpd is an MPD client written in Perl that implements regular expression
based database/playlist queries, randomizing of playlists, queue
functionality, interactive shell, monitoring (to STDOUT and daemonized),
ability to copy the currently playing song to your portable player, favorizing
of specific tracks, loads of information spamming, support for colorschemes
and 256 colors, and quite a bit more. See OPTIONS for a full specification.

All of this works on local MPD servers as well as remote ones.

screenshot.png

Last edited by dmz (2010-09-21 11:59:33)

Offline

#2 2010-01-20 12:55:28

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: pimpd - Perl Interface for the Music Player Daemon

Thanks!

Offline

#3 2010-01-20 19:48:42

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: pimpd - Perl Interface for the Music Player Daemon

Nifty. Check out my script for other silly hacks: http://github.com/Daenyth/dotfiles/blob … /bin/mdctl

Last edited by Daenyth (2010-01-20 19:49:52)

Offline

#4 2010-01-21 18:22:13

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: pimpd - Perl Interface for the Music Player Daemon

Nice Daenyth.

I've been hacking on some lyric fetching feature, but turned out it sucked. big_smile
Though maybe I should implent something to actually load the playlists, not only append to them...

Offline

#5 2010-01-21 19:14:17

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: pimpd - Perl Interface for the Music Player Daemon

I like the similar artists feature. Perhaps something to add to my own growing collection of MPD utilities tongue

Last edited by Barrucadu (2010-01-21 19:16:41)

Offline

#6 2010-01-30 16:01:52

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: pimpd - Perl Interface for the Music Player Daemon

Update. Major rewrite and cleanup of the code.

#   0.5 => 0.6
#   · switched from Getopt::Std to Getopt::Long, got rid of them nasty elsifs
#     when parsing options
#   · removed unneccesary 'features'; list playlists and list similar artists,
#     if no argument is given to those flags, we'll just list what the user can
#     choose then
#   · major code cleanup
#   0.4 => 0.5
#   · check if cp2portable() actually returns true
#   · now we can actually load and view the playlists, not only add files to them

http://trapd00r.se/hacks/perl/ppc/ppc-0.6.png
http://trapd00r.se/hacks/perl/ppc/ppc-0.6.pl

Offline

#7 2010-02-23 10:49:51

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: pimpd - Perl Interface for the Music Player Daemon

Update to 0.8.
Name change to pimpd, hosting moved to code.google.com
http://code.google.com/p/pimpd/downloads/list

Offline

#8 2010-03-01 07:54:04

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: pimpd - Perl Interface for the Music Player Daemon

0.8.5
Now we can list the current playlist and easily play the track that's corresponding to the number that's given as argument.
http://pimpd.googlecode.com/files/pimpd-0.8.5.pl

Feature suggests? Bugs? Bad coding style? Whole project sucks?

Last edited by dmz (2010-03-01 07:56:17)

Offline

#9 2010-03-03 07:13:42

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

Re: pimpd - Perl Interface for the Music Player Daemon

hi, i really like pimpd (cool name btw!)

however, what I don't really like is the huge number of dependencies needed to install from aur in order to get pimpd run. is there a way to "optimize" this?

Offline

#10 2010-03-03 08:04:52

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: pimpd - Perl Interface for the Music Player Daemon

Thank you!

Well, the only module required (except perl and mpd ofc) is Audio::MPD - which for some reason got quite a few dependencies, yes. That's nothing I can do about that though, as you might understand.
I haven't tried installing Audio::MPD from the repos, I just use the CPAN shell and type 'install Audio::MPD' and the dependencies are resolved automagically.
The only available option besided using Audio::MPD for 'talking' to MPD would be to use system commands - and that's no solution.

Offline

#11 2010-03-03 08:50:53

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

Re: pimpd - Perl Interface for the Music Player Daemon

hi dmz, thx for your reply, no problem at all but thanks for the cpan tip, that makes things quite a bit easier! smile

apart from that, i keep on using pimpd. thx for this nice app!

Offline

#12 2010-03-06 07:43:11

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: pimpd - Perl Interface for the Music Player Daemon

Finally I've integrated lyrics support.  The method is shamelessy stolen from ncmpcpp's source. Doing some more testing to make sure it works as expected.
Looks like this for now:

lyrics.png


Still requesting feature requests...

Offline

#13 2010-03-09 07:30:18

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: pimpd - Perl Interface for the Music Player Daemon

0.9.6 released.
Download:  http://pimpd.googlecode.com/files/pimpd-0.9.6.tar.gz
URL: http://code.google.com/p/pimpd/
pimpd-0.9.6.png

== Changelog 0.9.6 ==

=== bug fixes ===
*   pimpd -play 5 didn't return the fifth track to STDOUT, but the track that
... was playing just before that.

== Changelog 0.9.5 ==

==== new features ====
*   When some output spans over 80 columns, we'll truncate it from now on.
... There is a reason why !badware do it like this.
*   Implemented lyrics support. The idea and how to do it is shamelessy stolen
... from ncmpcpp's source.
*   &information() - Mark if the bitrate is low.

==== bug fixes ====
*   &show_playlist() -  When calling subroutines directly from GetOptions,
... GetOptions will pass the (stringified) name of the function to the
... function itself. Because of this, we'll get something like 'show_playlist'
... when we shift of values from @_. Naturally, this is not what we want.
... Therefore, I've implemented some basic sanity checks.
*   While rewriting, I noticed that some variables could possibly return undef
... if the tags are missing - fixed.

==== other  ====
*   Completely rewritten. Got rid of some ugly pieces of code.
*   &show_playlist() - reworked the output to follow standard rules of maximum
... 80 columns. I removed the album from the output since having all three
... fields sharing 80 columns would make it almost unreadable.
*   Changelog no longer maintained in the code, as you can see. smile
*   A lot of cleanup is done regarding variables. Why declare variables holding
... the same value in almost every function... stupidity.
*   &polling is now named &monitor for consistency.
*   $APPLICATION_NAME, $APPLICATION_VERSION introduced, mainly so that I can
... see what version I'm actually working on at the moment... smile

Offline

#14 2010-03-10 06:25:46

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: pimpd - Perl Interface for the Music Player Daemon

If anybody downloaded yesterdays release I suggest upgrading, since --fav would return playlists in form of '/mnt/Music_1/Playlistsrock.m3u'. What a mess one missing char could create! smile

I've understood that most people just want to download and run, and therefore I've created two basic installation scripts that'll handle both installation of modules and installation of pimpd itself to users homedir. So for installation, just;

 # ./INSTALL_MODULES
 $ ./INSTALL

After that, you'll want to edit the configuration file (yes, that one is also introduced), located in $XDG_CONFIG_HOME/pimpd (/home/user/.config/pimpd/). Then, you're all set.

== Changelog 0.9.7 ==

=== new features ===
*   We're now using a separate configuration file.
*   Basic installation script added.
*   Basic installation script for the modules is also added.

=== bug fixes ===
*   One nasty bug in &favlist - $playlistdir.$playlist instead of
... "$playlistdir/$playlist".
*   Spelling failure in the help text.

Download: http://pimpd.googlecode.com/files/pimpd-0.9.7.tar.gz
URL: http://code.google.com/p/pimpd/

Offline

#15 2010-03-11 11:29:15

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: pimpd - Perl Interface for the Music Player Daemon

Ok, 1.0 released.  Queue functionality, more information, couple improvements.
I got tired of google code and have now moved to github... no more manual uploading, jeez.

http://github.com/trapd00r/pimpd

Offline

#16 2010-07-01 16:58:21

watsonalgas
Member
Registered: 2007-01-15
Posts: 92

Re: pimpd - Perl Interface for the Music Player Daemon

How bout a PKGBUILD?

Also, how could I do it to name every playlist I create with pimpd -f as fav-$genre for example, without having to type it in each time?

Last edited by watsonalgas (2010-07-01 16:58:48)

Offline

#17 2010-07-01 17:05:20

Falstaff
Member
Registered: 2008-11-03
Posts: 81

Re: pimpd - Perl Interface for the Music Player Daemon

Yeah, a AUR release would be great.

Offline

#18 2010-07-14 08:59:08

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: pimpd - Perl Interface for the Music Player Daemon

I've just tried out pimpd for the very first time, good work! Since I also like my apps managed by pacman I might create a PKGBUILD for pimpd, but don't expect one in the next two weeks or so :-)

Could you please include perl-text-autoformat in the packages necessary to run pimpd in the github info, dmz? Confused me quite a bit :-) Thanks!

Can't comment to pimpd atm, this is what I get:

$ pimpd -i
syntax error at /etc/pimpd.conf line 23, near "our "
Compilation failed in require at /usr/bin/pimpd line 41.

edit: I tried to run it with a /etc/pimpd.conf, seems to fail to see that somehow. I'm running pimpd in the commit version 2f8422d8784ac18cee63.

2nd edit: Ha, ok, I found it. Had the default conf option which pointed to mpd running on a remote host. I'll keep on playing with pimpd later, I'm just happy that it finally runs for the moment ;-)

Last edited by Sigi (2010-07-14 09:10:08)


Haven't been here in a while. Still rocking Arch. smile

Offline

#19 2010-07-14 11:05:02

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: pimpd - Perl Interface for the Music Player Daemon

Thank you Sigi.

The perl-text-autoformat module is mentioned in the readme, as well as specified in the install script.

I changed the default conf to use localhost, and there was a missing semicolon as well - thanks.

Offline

#20 2010-07-14 13:30:13

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: pimpd - Perl Interface for the Music Player Daemon

dmz: no problem, thank you for the nice app.
I had some more fun playing with pimpd and I've encountered another problem. I'm not entirely sure whats wrong but here's my problem:

$ cat /usr/bin/pimpdfav.sh 
#!/bin/sh
text=`pimpd -f -no`
#echo -n $text
test=`echo -n $text | sed 's#>>#to#'`
#echo -n $test
notify-send "New Favorite?" "Saved $test" -t 3000

I'm trying to send the output of "pimpd -f -no" to notify-send but some kind of color code is sent with it. Do you know how I could get rid of it?

Best regards, Chris


Haven't been here in a while. Still rocking Arch. smile

Offline

#21 2010-07-14 14:59:44

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: pimpd - Perl Interface for the Music Player Daemon

Try with the latest config ( http://github.com/trapd00r/pimpd/raw/master/pimpd.conf ).

Now that I see people are starting to actually use this, it might give me motivation to completely rewrite it (again... I started, and lost all the work due to harddrive failure). smile

Offline

#22 2010-07-14 23:12:04

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: pimpd - Perl Interface for the Music Player Daemon

Tried with the latest conf, although I didn't see much changed except for the remote host stuff.
What I mean is this:
vNHhtZA

edit: It kind of looks like color 9 is selected although colors are supposed to be turned of by the -no option. I'll check if I can get rid of it with sed...

edit 2: google helped:

$ cat /usr/bin/pimpdfav.sh 
#!/bin/sh
text=`pimpd -f -no`
test=`echo -n $text | sed 's#>>#to#' | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"`
notify-send "New Favorite?" "Saved $test" -t 3000

edit 3: pimpd seems to count in strange ways big_smile:

$ pimpd -set aral
Finger Eleven/Paralyzer.mp3
Rock Kills Kid/Fearless Records Summer Sample/Paralyzed.mp3
The Used/Lies For The Liars/06 - Paralyzed.mp3
>> 2 titles found matching aral

(Line 645 in pimpd)

edit 4 (the last for today):
I changed some lines in sub favlist:

  my $artist = $mpd->current->artist;
  my $title = $mpd->current->title;
 ...
  print $playlist.':  '.$artist.' - '.$title, "\n";

to get a nice output for notify-send:
2010-07-15-031500_400x44_scrot.png

The notify-send script:

$ cat /usr/bin/pimpdfav.sh
#!/bin/sh
text=`pimpd -f -no`
test=`echo -n $text | sed 's#>>#to#' | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"`
notify-send "$test" -t 3000

Last edited by Sigi (2010-07-15 01:22:27)


Haven't been here in a while. Still rocking Arch. smile

Offline

#23 2010-07-15 04:25:00

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: pimpd - Perl Interface for the Music Player Daemon

Sigi wrote:

What I mean is this:
http://omploader.org/vNHhtZA

Fixed. If --no-color, I simply replaced the color list with \033[0m (default
color), which is to no real use, and looks ugly when the output is used in !shell
applications.

Sigi wrote:

edit 3: pimpd seems to count in strange ways big_smile:

Fixed.

Sigi wrote:

edit 4 (the last for today):
I changed some lines in sub favlist:

The output should be user configurable...

Thanks for all testing and rapporting. smile

Offline

#24 2010-07-15 04:36:46

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: pimpd - Perl Interface for the Music Player Daemon

You have been gifted with magical perl skills tongue

This will most likely replace ncmpcpp as my music player. And by the way, I saw you like Eminem...+10 respect points from me smile

Offline

#25 2010-07-15 08:43:42

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: pimpd - Perl Interface for the Music Player Daemon

dmz wrote:

Fixed. ...
Fixed.

Thank you! Will test asap (will not be before next Sunday)

dmz wrote:

The output should be user configurable...

Good idea!

dmz wrote:

Thanks for all testing and rapporting. smile

You're welcome, it's fun to play with pimpd, thanks a lot for your good work!


Haven't been here in a while. Still rocking Arch. smile

Offline

Board footer

Powered by FluxBB