Computers |
|
| | #1 (permalink) |
| Indeed. Join Date: Dec 2004
Posts: 1,457
| I'm trying to write a CGI script that will generate an HTML file showing what is playing in my media player, Amarok. The command that outputs the artist and title is: Code: echo `dcop amarok player nowPlaying` Code: #!/usr/bin/perl print "Content-type: text/html\n\n"; print "<html><head>\n"; print "<title>Test</title></head>\n"; print "<body>\n"; print "<b>"; print `date`; print "</b>\n"; print "</body></html>\n"; Oh, and when I just run the script from the command line it works fine as well. Here is what it gives me: Code: greg@Carl:~/apache/nowplaying$ perl playing.pl Content-type: text/html <html><head> <title>Test</title></head> <body> <b>The Flaming Lips - Superhumans </b> </body></html> greg@Carl:~/apache/nowplaying$ |
| | |
| | #2 (permalink) |
| Indeed. Join Date: Dec 2004
Posts: 1,457
| Nevermind. I just ended up writing an Amarok script. Here is the result: http://img243.imageshack.us/img243/8245/screeniean9.png Simple, but it does exactly what I want it to do. |
| | |