PDA

View Full Version : hack request - a plugin to print the contents of a text file and output into postbit


Dominick
02-18-2003, 09:06 PM
reason?
xmms and winamp both have plugins to print the current song and artist to a file. If vB could read this file then it could print what the poster is currently listening to.

of course this would probably be a pain in the toosh but I suppose any hack this good (in mine eyes) is worth atleast requesting.

here is the plugin info for the xmms changer


#!/usr/bin/perl

open (TEMPFILE, "> /tmp/xmms.song")
or die "Couldn't open the local temporary file!!";

print TEMPFILE "Now Playing: ";
for (@ARGV) {
print TEMPFILE " $_ ";
}


and here is the file that it works with... (irc plugin of course)


#!/usr/bin/perl -w
$start = "true";
IRC::register("Now-Playing", "0.1", "", "");
IRC::add_command_handler( "np", "print_to_channel");

sub print_to_channel
{
open(INFO, "/tmp/xmms.song");
@lines = <INFO>;
IRC::command( $lines[0] );
close(INFO);

return 1;
}


here is linkage to the winamp app called nowplaying that does just about the same damn thing.

http://drpizza.arsware.org/nowplaying/

:banana:

so can we get a go at it?

-Dom

amykhar
02-18-2003, 09:12 PM
That hack is already made. Search for nowplaying :D

Dominick
02-18-2003, 09:18 PM
w00w000w000000!

thanks ya

Dominick
02-18-2003, 10:09 PM
just went through it. not what Im looking for. the hack I am refering to will automatically pull whatever is playing

amykhar
02-18-2003, 10:22 PM
there are two now playing hacks. One you have to type it in. The other uses the winamp plugin.

Amy

amykhar
02-18-2003, 10:23 PM
ps I know it exists cause I am using a modified version of it on my board for premium members.

Dominick
02-19-2003, 12:37 PM
http://tech-lounge.com/forum/showthread.php?s=&threadid=852
worked perfectly

thank you
:)

amykhar
02-19-2003, 12:53 PM
No prob. Happy to see you got it working.

Amy