Help:The XSPF function
From Folktunes
The XSPF function is currently in development.
| Table of contents |
About
The XSPF function is called by putting a list of mp3s and metadata within <playlist></playlist> tags. Several things happen from this information:
- An m3u (http://hanna.pyxidis.org/tech/m3u.html) playlist is made, which most media players can use.
- An xspf (http://www.xspf.org/) playlist is made, which contians more metadata.
- A link to play.php, which uses the xspf playlist to play the playlist via the Flash MusicPlayer (http://musicplayer.sourceforge.net/), and also can contain links to other things that can use the playlist.
- An html playlist is written to the wiki page, styled by editing MediaWiki:Monobook.css.
The first line is the wiki page that will be the home page of the playlist. This will become the title, unless another playlist title is specified with | (a pipe). The second line is the playlist description. See below for more example usage input and output.
Example usage
Input
<playlist> Help:The XSPF function | Sample playlist Some vintage 78 recordings this week http://www.archive.org/download/Johndean/LostJohnDean.mp3 Lost John Dean - Bascom Lamar Lunsford http://www.archive.org/download/Deal/DontLetYourDealGoDown.mp3 Don't Let Your Deal Go Down Blues - Charlie Poole and The North Carolina Ramblers | Don't Let Your Deal Go Down Blues Charlie Poole and The North Carolina Ramblers http://www.archive.org/download/Reed/HowCanaPoorManStandSu.mp3 How Can A Poor Man Stand Such Times And Live - Blind Alfred Reed http://www.archive.org/download/Dyingsoldier/TheDyingSoldier.mp3 The Dying Soldier - Buell Kazee http://www.archive.org/download/Pigankle/PigAnkleStrut.mp3 Pig Ankle Strut - Cannon's Jug Stompers harmonica blues tune </playlist>
Output
|
Some vintage 78 recordings this week
|
|||
| 1. | Lost John Dean - Bascom Lamar Lunsford | stream | download |
| 2. | Don't Let Your Deal Go Down Blues | stream | download |
| Charlie Poole and The North Carolina Ramblers | |||
| 3. | How Can A Poor Man Stand Such Times And Live - Blind Alfred Reed | stream | download |
| 4. | The Dying Soldier - Buell Kazee | stream | download |
| 5. | Pig Ankle Strut - Cannon's Jug Stompers | stream | download |
| harmonica blues tune | |||
Tips
- If a playlist will be used on other pages, put it in a subpage. For example,
{{:Chinkapin Hunters - Chinkapin Hunters/playlist}}includes this playlist in both the info page and a weekly feature.
Todo
- minimal error handling
- allow ogg - can't be read by flash, quicktime, or most players, so forget about this for now. There will always be the ogg/flac/whatever download links on the archive.org pages. --Forrest O. 01:24, 25 May 2005 (EDT)
- catch multi-archive
-
save .m3u and .xspf files- yay! --Forrest O. 10:20, 20 May 2005 (EDT) -
html formatting- good for now --Forrest O. 04:25, 20 May 2005 (EDT) -
start using it!- ready or not --Forrest O. 01:24, 25 May 2005 (EDT) - cache html output once stable
- explain how this Wiki to M3U and XSPF extension can be installed and used by other Wiki
Download
If you want to see the current state of the code, see xspfExtension.phps (http://folktunes.org/music/extensions/xspfExtension.phps), play.phps (http://folktunes.org/music/extensions/play.phps), and stream.phps (http://folktunes.org/music/extensions/stream.phps), but be warned that it is still full of code specific to this wiki, and you'll have to change a bunch to use it yourself. Once I stop changing things I'll release a version that others can install and use. --Forrest O. 09:42, 22 May 2005 (EDT)

