PDA

View Full Version : Bit more fun from me


Dudeking
04-12-2007, 11:13 AM
Well I'm bored so I'm doing some more random code as yoo do lol

I have a text file like this
1176390236,36 Crazyfists – Destroy the Map
1176389776,Fightstar – Amethyst
1176389540,Story of the Year – Until the Day I Die
1176389373,New Found Glory – Your Biggest Mistake
1176389112,Thursday – The Dotted Line
1176388944,30 Seconds to Mars – Battle of One
1176388691,Taking Back Sunday – This Photograph Is Proof (I Know You Know)
1176388451,Paramore – My Heart
1176388257,Kennedy Soundtrack – Wrong Day [Album Version]
1176388048,36 Crazyfists – Between The Anchor And The Air

I need to remove the number and comma from the start and just include the band and track name on the page.

Dudeking
04-12-2007, 02:11 PM
Dosnt matter, I'm using XML for it now :) Soo much easier

Dudeking
04-12-2007, 03:31 PM
http://beta.dudeking.co.uk/

Well I bored now so I give up

Tortanick
04-26-2007, 11:55 AM
Unix shell scripting

cat filename | sed s/^.*,// | tee > newfilename

I think that will do it. filename is you're text file, newfilename is the output file

Dudeking
04-26-2007, 12:00 PM
Thanks mate :)
I'll give it a go when i get some free time next.

I'm using this now anyway http://ws.audioscrobbler.com/1.0/user/Dudeking/recenttracks.xml

They do an XML version of the same data :)