pimp my mpd! reloaded

Wednesday, May 10. 2006

Lando hat mich heute im IRC auf das kleine Programm Curl hingewiesen. Curl macht das gleich wie Cat, kann aber eine Url als Datenquelle verwenden.
curl http://cms.streamfarm.net/cms/_v/radios/rebroadcast/crosschannel_dsl.pls|sed -e 's/^File[0-9]*=//'|mpc add|mpc play

Wer will kann sich ein Script draus basteln. Ich wollte einfach nur einen Wecker haben, der mich morgens per Cronjob mit crosschannel.de weckt und automatisch wieder ausgeht wenn ich zur Berufsschule muss.

Und hier meine Weckzeiten:
00 7 ** 1-5 /home/laemmy/script/radiowecker > /dev/null 2>&1
38 7 ** 1-5 /usr/bin/mpc stop > /dev/null 2>&1
30 8 ** 0 /home/laemmy/script/radiowecker > /dev/null 2>&1

Links:
[1] curl.haxx.se
[2] musicpd.org
[3] crosschannel.de

np: crosschannel.de


Trackbacks


Trackback specific URI for this entry
    No Trackbacks

Comments


    #1 Doomshammer on 05/11/06 at 07:17 AM [Reply]
    *Naja, dafuer brauchste nicht unbedingt cURL. cURL kann _viel_ mehr als nur eine Webseite "cat'en".

    Du haettest genauso gut auch lynx -source http://url | sed
    nehmen koennen
    #1.1 laemmy on 05/11/06 at 12:45 PM [Reply]
    *Ja. Unter Linux fuehren oft verschiedene Weg zum Ziel. Lynx haett ich sogar auf dem System gehabt. curl musst ich erst installieren.
    #2 Moritz on 09/19/06 at 04:49 PM [Reply]
    *Wenn wir schon bei Alternativen sind...
    wget -O - $URL
    geht auch...

    Moritz

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.
HTML-Tags will be converted to Entities.
Twitter/Gravatar/Favatar/MyBlogLog/Pavatar author images supported.