file.txt to file.xspf (Ideas?)

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

file.txt to file.xspf (Ideas?)

Postby Pirate Elf » Thu Mar 02, 2006 4:48 am

I have recently come across a beautiful flash player that plays mp3's it uses a custom version of xml called xspf. What I am looking to do with the help of a multipart and a few other addons is make a profile that will allow my users to upload music then post it and then use the xspf file to play it.

Here is an example of xspf:


Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="0" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<location>http://www.url.net/file.mp3</location>
<annotation>Artist  - File Name</annotation>
</track>
</trackList>
</playlist>


Anyone have any good ideas how I could incorporate a profile's .txt into the xspf file? Any help is always appreciated.
Nichts ist für dich
Nichts war für dich
Nichts bleibt für dich
Für immer
Pirate Elf
 
Posts: 732
Joined: Wed Jan 31, 2007 9:45 pm

Postby Dale Ray » Thu Mar 02, 2006 6:14 am

Check out this topic, you should be able to apply the same techniques to your needs. And if you need to rename a file after building news try the Post Build File Renamer addon.
Dale Ray
User avatar
Dale Ray
 
Posts: 1004
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Re: file.txt to file.xspf (Ideas?)

Postby SrNupsen » Thu Mar 02, 2006 10:01 am

Pirate Elf wrote:I have recently come across a beautiful flash player that plays mp3's it uses a custom version of xml called xspf. What I am looking to do with the help of a multipart and a few other addons is make a profile that will allow my users to upload music then post it and then use the xspf file to play it.

Here is an example of xspf:


Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="0" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<location>http://www.url.net/file.mp3</location>
<annotation>Artist  - File Name</annotation>
</track>
</trackList>
</playlist>


Anyone have any good ideas how I could incorporate a profile's .txt into the xspf file? Any help is always appreciated.


Anything wrong about putting everything before the first <track> and the last </track> inside a template like this:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="0" xmlns="http://xspf.org/ns/0/">
<trackList>
<Field: Content>
</trackList>
</playlist>


and then use a style to process each track? You can set the profile output file extension to xspf if you want to.

I use this technique to build the menu "Vagbladet (10 siste saker" at one of my sites (http://www.dusj.no)

SrNupsen
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Re: file.txt to file.xspf (Ideas?)

Postby Pirate Elf » Fri Mar 03, 2006 1:39 am

SrNupsen wrote:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="0" xmlns="http://xspf.org/ns/0/">
<trackList>
<Field: Content>
</trackList>
</playlist>


and then use a style to process each track? You can set the profile output file extension to xspf if you want to.

I use this technique to build the menu "Vagbladet (10 siste saker" at one of my sites (http://www.dusj.no)

SrNupsen


I attempted this but my coranto only allows one profile output which is currently set to .shtml... I am going to try Dale Rey's idea and since I have never heard of the profile renamer addon I am going to kick myself over the many complicated ways I have circumvented this up until now. :-/
Nichts ist für dich
Nichts war für dich
Nichts bleibt für dich
Für immer
Pirate Elf
 
Posts: 732
Joined: Wed Jan 31, 2007 9:45 pm

Re: file.txt to file.xspf (Ideas?)

Postby Dale Ray » Fri Mar 03, 2006 1:53 am

Pirate Elf wrote: I am going to try Dale Rey's idea and since I have never heard of the profile renamer addon I am going to kick myself over the many complicated ways I have circumvented this up until now. :-/


The Post Build File Renamer addon is pretty new and came from the discussion of creating RSS feeds.

Basically the method SrNupsen describes and that is discussed in the RSS feed topics are the same. The RSS discussion deals with getting compliant dates and formatting so that the file created is valid.
Dale Ray
User avatar
Dale Ray
 
Posts: 1004
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Pirate Elf » Fri Mar 03, 2006 2:54 am

Works beautifully! Thanks!
Nichts ist für dich
Nichts war für dich
Nichts bleibt für dich
Für immer
Pirate Elf
 
Posts: 732
Joined: Wed Jan 31, 2007 9:45 pm


Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest

cron