Introducing the playlist_creator gem
Usage:
require 'playlist_creator'
s = "
title: The Christmas Waltz
location: Disc 3 - 14 - The Christmas Waltz.mp3
title: We Three Kings
location: Disc 3 - 23 - We Three Kings.mp3
"
pc = PlaylistCreator.new s
puts pc.to_xspf
<?xml version="1.0" encoding="utf-8"?> <playlist xmlns="http://xspf.org/ns/0/" version="1"> <tracklist> <track> <title>The Christmas Waltz</title> <location>Disc 3 - 14 - The Christmas Waltz.mp3</location> </track> <track> <title>We Three Kings</title> <location>Disc 3 - 23 - We Three Kings.mp3</location> </track> </tracklist> </playlist>
Resources
- playlist_creator https://rubygems.org/gems/playlist_creator
xspf mp3 playlist creator playlist_creator playlistcreator m3u