Music Player Daemon Community Wiki


525pages on
this wiki
Add New Page
Talk0 Share

mpdpl2html is a very simple shell script which creates a HTML file of your current playlist.

Feel free to improve it.

Source codeEdit

 # mpdpl2html - MPD playlist to HTML
 # by pfish - 2010
 # Version 0.1
 # License: GPL 2
 # Requirements:
 #       mpd
 #       mpc
 #       sed
 STATS=`mpc stats | sed 's/$/\<br \/\>/'`
 PLAYLIST=`mpc playlist | sed 's/$/\<br \/\>/'`
 VERSION=`mpc version`
 DATE=`date -R`
 echo "<!-- Generated with mpdpl2html by pfish - $DATE -->
 <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> 
 <title>MPD playlist of $USER</title>
 <style type=\"text/css\">
 body {color: #ffffff; background-color: #001A57; font-size: 12px;}
 h1 {color: #f28500; margin: 0; padding: 0;}
 h2 {color: #f28500; margin: 0; padding: 0;}
 hr {color: #f28500; border: 1;}
 <h1>MPD playlist of $USER</h1>
 <hr />
 <br /><br />
 <br />
 <hr />
 <small>Generated with mpdpl2html by pfish - $DATE</small>
 </html>" > $FILE

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.