<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Arthurthefourth.com &#187; adminStuff</title>
	<atom:link href="http://arthurthefourth.com/category/old-posts/adminstuff/feed/" rel="self" type="application/rss+xml" />
	<link>http://arthurthefourth.com</link>
	<description>selling my soul, but keeping a copy</description>
	<lastBuildDate>Tue, 30 Mar 2010 16:15:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MP3&#8217;s and the Modern Listener</title>
		<link>http://arthurthefourth.com/2003/07/mp3s-and-the-modern-listener/</link>
		<comments>http://arthurthefourth.com/2003/07/mp3s-and-the-modern-listener/#comments</comments>
		<pubDate>Sun, 20 Jul 2003 22:01:32 +0000</pubDate>
		<dc:creator>arthur</dc:creator>
				<category><![CDATA[adminStuff]]></category>

		<guid isPermaLink="false">http://arthurthefourth.com/?p=55</guid>
		<description><![CDATA[As I mentioned earlier, I&#8217;ve started using Kung-Tunes to list what I&#8217;m listening to.  It has a handy feature that lets you put together a list of recent tracks.  However, like Metallica and others, I believe strongly in the power of the album as a complete work of art, and that&#8217;s how I [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned <a href="http://www.queixa.com/blog/archives/adminStuff/kung_tunes.php">earlier</a>, I&#8217;ve started using Kung-Tunes to list what I&#8217;m listening to.  It has a handy feature that lets you put together a list of <a href="http://www.queixa.com/blog/itunes.php">recent tracks</a>.  However, like <a href="http://news.designtechnica.com/article766.html">Metallica</a> and others, I believe strongly in the power of the album as a complete work of art, and that&#8217;s how I do most of my listening &#8211; one album at a time.  Neither Itunes nor Kung-Tunes, nor for that matter any other MP3 software I&#8217;ve ever seen, really supports this method of listening.  If I just listened to three entire albums straight through, that&#8217;s not 60 lines worth of data.  It&#8217;s really only 3.</p>
<p>Enter PHP.</p>
<p><span id="more-55"></span><br />
I jimmied together a little PHP script to parse data from Kung-Tunes and group consecutive songs from the same album together.  The first step is to create a new Kung-Tunes track listing template which uploads to &#8220;tracklist.txt&#8221;.  Mine looks like this: </p>
<p><code>^t@ #p^p#p @ #a^a#a @ #y^y#y @</code><br />
<br />
The @&#8217;s are separator tokens for the script. You can make them whatever you want, as long as you&#8217;re sure it&#8217;s something you wouldn&#8217;t find in any of your songs.<br />
<br />
And here&#8217;s the PHP script: </p>
<p><code>&lt;&#63php <br/><br />
	$fp = fopen(&quot;PHP/tracklist.txt&quot;, &quot;r&quot;);<br />
	$text = fgets($fp, 10240);</p>
<p>	$all = explode(&quot;@&quot;, trim($text));</p>
<p>	// Remove extra blank element at end from Kung-Tunes parsing<br />
	array_splice($all, count($all)-1);<br />
	$i = 0;<br />
	while ($i &lt; count($all)) {<br />
		$title_save[$i/4] = trim($all[$i++]);<br />
		$artist_save[$i/4] = trim($all[$i++]);<br />
		$album_save[$i/4] = trim($all[$i++]);<br />
		$year_save[$i/4] = trim($all[$i++]);<br />
	}</p>
<p>	$title[0] = $title_save[0];<br />
	$artist[0] = $artist_save[0];<br />
	$album[0] = $album_save[0];<br />
	$year[0] = $year_save[0];<br />
	$j = 0;</p>
<p>	for ($i = 1; $i &lt; count($title_save); $i++) {</p>
<p>		// Different Album<br />
		if (($artist_save[$i] != $artist_save[$i - 1]) || ($album_save[$i] != $album_save[$i-1])) {<br />
			$j++;<br />
			$artist[$j] = $artist_save[$i];<br />
			$title[$j] = $title_save[$i];<br />
			$album[$j] = $album_save[$i];<br />
			$year[$j] = $year_save[$i];<br />
		}</p>
<p>		// Same Album<br />
		else {<br />
			$title[$j] = $title[$j] . &quot;, &quot; . $title_save[$i];<br />
		}<br />
	}</p>
<p>	for ($i = 0; $i &lt; count($title); $i++) {<br />
		echo &quot;&lt;tr&gt;&lt;td&gt;$artist[$i]&lt;/td&gt;&lt;td&gt;$title[$i]&lt;/td&gt;&lt;td&gt;$album[$i]&lt;/td&gt;&lt;td&gt;$year[$i]&lt;/td&gt;&lt;/tr&gt;&quot;;<br />
	}</p>
<p>?&gt;</p>
<p></code></p>
<p>Happy Kung-Tuning!</p>
]]></content:encoded>
			<wfw:commentRss>http://arthurthefourth.com/2003/07/mp3s-and-the-modern-listener/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Kung Tunes</title>
		<link>http://arthurthefourth.com/2003/07/kung-tunes/</link>
		<comments>http://arthurthefourth.com/2003/07/kung-tunes/#comments</comments>
		<pubDate>Fri, 11 Jul 2003 23:42:13 +0000</pubDate>
		<dc:creator>arthur</dc:creator>
				<category><![CDATA[adminStuff]]></category>

		<guid isPermaLink="false">http://arthurthefourth.com/?p=50</guid>
		<description><![CDATA[So it took some fighting with Kung-Tunes, but I&#8217;ve got my handy-dandy Itunes info over there on the right now.  And a beautiful table of recently played songs.  What a waste of time!!  But fun too.
I also noticed that some of you have been having trouble pronouncing &#8220;Queixa.&#8221;  Please click on [...]]]></description>
			<content:encoded><![CDATA[<p>So it took some fighting with <a HREF="http://www.kung-foo.tv/itti.php">Kung-Tunes</a>, but I&#8217;ve got my handy-dandy Itunes info over there on the right now.  And a beautiful table of recently played songs.  What a waste of time!!  But fun too.</p>
<p>I also noticed that <i>some of you</i> have been having trouble pronouncing &#8220;Queixa.&#8221;  Please click on the above phonograph image for proper pronunciation by yours truly.  Please forgive my lack of accent &#8211; it <i>has</i> been some time.</p>
]]></content:encoded>
			<wfw:commentRss>http://arthurthefourth.com/2003/07/kung-tunes/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
