<?xml version="1.0" encoding="utf-8"?>
<!-- generator="wordpress/2.1.3" -->
<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/"
	>

<channel>
	<title>MindlessCode.net</title>
	<link>http://www.wildgardenseed.com/Taj/blog</link>
	<description>Life, The Universe, and Everything through an ADSL connection.</description>
	<pubDate>Mon, 24 Nov 2008 21:10:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.3</generator>
	<language>en</language>
			<item>
		<title>Fiddle Contests</title>
		<link>http://www.wildgardenseed.com/Taj/blog/2005/09/27/fiddle-contests/</link>
		<comments>http://www.wildgardenseed.com/Taj/blog/2005/09/27/fiddle-contests/#comments</comments>
		<pubDate>Tue, 27 Sep 2005 22:00:19 +0000</pubDate>
		<dc:creator>taj</dc:creator>
		
		<category><![CDATA[Fun]]></category>

		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.wildgardenseed.com/Taj/blog/2005/08/26/fiddle-contests/</guid>
		<description><![CDATA[[This post used to be about something else, I rewrote it because it had sat as a draft too long. :)]
I&#8217;ve been wanting to write something about these things for a while, but never really had the time. Now I&#8217;ve finished up my MIME type patch for Autopackage and am looking for another thing to [...]]]></description>
			<content:encoded><![CDATA[<p>[This post used to be about something else, I rewrote it because it had sat as a draft too long. :)]</p>
<p>I&#8217;ve been wanting to write something about these things for a while, but never really had the time. Now I&#8217;ve finished up my MIME type patch for Autopackage and am looking for another thing to start hacking on. In the mean time, I got board, and &#8220;my pet mice escaped, running over the keyboard, and typed this message&#8221;:</p>
<p>My first fiddle contest was in Gaston, OR (near Portland) in February 2004. I had been playing Texas Style Fiddle for about five months and had no clue what to expect. We arrived there are about 8AM and didn&#8217;t leave until 10:30PM. I had a good time&#8211;enough to want to go back, but nothing really &#8220;grabbed&#8221; me about the contest. I just remember that I enjoyed it, I was deaf for a few days from sitting under the speaker (bad idea!), and slept really late the next morning.</p>
<p>The next contest I went to was the State contest in May. By the time this contest came around, I knew what to expect. By the time the contest was over, I had met a few people, and went home. That contest left me with a whole new understanding of these contests. Not only do you go there to play music, but to meet people who love music just as much as you do. I couldn&#8217;t wait for the next contest to come around.</p>
<p>Despite the name, Fiddle &#8220;Contests&#8221; really are about as far from a &#8220;contest to see who&#8217;s the best&#8221; as you can get. In the end, everyone there is just there to have fun and play music together. Everyone is incredibly encouraging and supportive of each other. Example: At a contest this August, just before I went on stage to play, I hear someone behind me shout &#8220;Go, Taj!!&#8221; (well, not shout&#8211;let&#8217;s just say &#8220;speak enthusiasticly in a somewhat loud voice :)&#8221;). I turn around, and it&#8217;s someone I see two times a year (max). They have a big smile on their face and are giving me two thumbs up. Remember, this is someone I am competeing against. That&#8217;s the kind of encouragement you live on when it&#8217;s 9:30PM, you&#8217;ve been up since 5 AM, it&#8217;s after dinner and you need to get up there and play another round. Yeah, I screwed up big time anyway and placed 4th out of 4th, but I didn&#8217;t care&#8230;</p>
<p>That&#8217;s just one example of why I love fiddle contests&#8230;I could go on and on.</p>
<p>Not only do I go to contests to hang out with friends, but it&#8217;s a great motivator to practice. Yeah, I know, I already said I don&#8217;t care who I beat&#8211;but I am motivated to do my best, and usually end up practicing and perfecting my songs a lot more than I would normally.</p>
<p>Wow, this post is really random, I had better stop here.</p>
<p>Something I just learned today:</p>
<blockquote><p>
The Dutch government is developing an electronic tax application form. It&#8217;s for windows, macOS and Linux. The Linux-version is going to use autopackage for increased cross-distro-ness
</p></blockquote>
<p><cite><a href="http://autopackage.org/forums/viewtopic.php?p=718#718">User on the Autopackage Forum</a></cite></p>
<p>Cool!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wildgardenseed.com/Taj/blog/2005/09/27/fiddle-contests/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Congress</title>
		<link>http://www.wildgardenseed.com/Taj/blog/2005/09/26/congress/</link>
		<comments>http://www.wildgardenseed.com/Taj/blog/2005/09/26/congress/#comments</comments>
		<pubDate>Tue, 27 Sep 2005 03:04:22 +0000</pubDate>
		<dc:creator>taj</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.wildgardenseed.com/Taj/blog/2005/09/26/congress/</guid>
		<description><![CDATA[A research professor (Renee),
Cloned people from ape DNA.
The project went well,
Anyone can tell,
&#8216;Cause they&#8217;re members of congress today.
     &#8211;Frank Weisel     Montgomery County Public Schools
                        [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>A research professor (Renee),<br />
Cloned people from ape DNA.<br />
The project went well,<br />
Anyone can tell,<br />
&#8216;Cause they&#8217;re members of congress today.</p>
<p>     &#8211;Frank Weisel     Montgomery County Public Schools<br />
                        Rockville, MD
</p></blockquote>
<p>Sorry, couldn&#8217;t resist. Thanks /usr/games/fortune.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wildgardenseed.com/Taj/blog/2005/09/26/congress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Converting non-techies to Jabber?</title>
		<link>http://www.wildgardenseed.com/Taj/blog/2005/09/25/converting-non-techies-to-jabber/</link>
		<comments>http://www.wildgardenseed.com/Taj/blog/2005/09/25/converting-non-techies-to-jabber/#comments</comments>
		<pubDate>Sun, 25 Sep 2005 17:52:28 +0000</pubDate>
		<dc:creator>taj</dc:creator>
		
		<category><![CDATA[The Web]]></category>

		<guid isPermaLink="false">http://www.wildgardenseed.com/Taj/blog/2005/09/25/converting-non-techies-to-jabber/</guid>
		<description><![CDATA[Jabber for my IM system of choice. In Kopete, I connect to two services; Jabber and IRC (freenode). I used to connect to a MSN server too, but support for MSN is broken in my version of Kopete.
That leaves me with a problem: If I want to exchange IMs with someone who isn&#8217;t a geek [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jabber.org">Jabber</a> for my IM system of choice. In Kopete, I connect to two services; Jabber and IRC (freenode). I used to connect to a MSN server too, but support for MSN is broken in my version of Kopete.</p>
<p>That leaves me with a problem: If I want to exchange IMs with someone who isn&#8217;t a geek (I know; it&#8217;s amazing, a geek that actually knows someone who isn&#8217;t a total computer nut!), I can&#8217;t. Yeah, yeah, I know, I could give them the whole &#8220;Proprietary IM System is Bad&#8221; lecture, but they probably won&#8217;t care in the end. Something like &#8220;Taj, why don&#8217;t you just use AIM (or ICQ, or MSN, or Yahoo, or <a href="http://www.wildgardenseed.com/Taj/blog/2005/09/23/google-talk/">Google Talk</a>, or whatever) like every one else?&#8221; is the reply I&#8217;m most likely to get. Damn it! I don&#8217;t want to end up with 6 different IM accounts! I want <em>one IM address</em>. Heck, if I wanted to run my own Jabber Server, I could have the same Jabber address as my email address.</p>
<p>Yes, I could tell them to go to Jabber.org, download a Jabber client, create an account, etc etc. But do you think anyone is willing to do that? I&#8217;m not willing to download Yahoo messenger to talk to them, so why should they do the same thing for me?</p>
<p>How do <em>you</em> convert non-techies to Jabber? It&#8217;s a question I really want an answer too&#8230;</p>
<p>(By the way, my JID is tmorton@jabber.org).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wildgardenseed.com/Taj/blog/2005/09/25/converting-non-techies-to-jabber/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google Talk</title>
		<link>http://www.wildgardenseed.com/Taj/blog/2005/09/23/google-talk/</link>
		<comments>http://www.wildgardenseed.com/Taj/blog/2005/09/23/google-talk/#comments</comments>
		<pubDate>Sat, 24 Sep 2005 02:06:48 +0000</pubDate>
		<dc:creator>taj</dc:creator>
		
		<category><![CDATA[The Web]]></category>

		<guid isPermaLink="false">http://www.wildgardenseed.com/Taj/blog/2005/09/23/google-talk/</guid>
		<description><![CDATA[On Google Talk, I apparently talk a lot. Yes, that&#8217;s exactly what I thought too. I sent a letter to Google about server to server (s2s) communications a while ago. I never heard back, of course. However, according to the Google Talk group there&#8217;s a rumor that they will allow server to server communication.
I hope [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.livejournal.com/users/nugget/97081.html">On Google Talk, I apparently talk a lot</a>. Yes, that&#8217;s exactly what I thought too. I sent a letter to Google about server to server (s2s) communications a while ago. I never heard back, of course. However, according to <a href="http://groups.google.com/group/google-talk-open/browse_thread/thread/27be1b6599b31854/02cc022157607594#02cc022157607594">the Google Talk group</a> there&#8217;s a rumor that they will allow server to server communication.</p>
<p>I hope so&#8211;until then: All you Google Talk users can&#8217;t talk to me! <img src='http://www.wildgardenseed.com/Taj/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wildgardenseed.com/Taj/blog/2005/09/23/google-talk/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A month with GMail</title>
		<link>http://www.wildgardenseed.com/Taj/blog/2005/09/18/a-month-with-gmail/</link>
		<comments>http://www.wildgardenseed.com/Taj/blog/2005/09/18/a-month-with-gmail/#comments</comments>
		<pubDate>Sun, 18 Sep 2005 23:32:46 +0000</pubDate>
		<dc:creator>taj</dc:creator>
		
		<category><![CDATA[The Web]]></category>

		<guid isPermaLink="false">http://www.wildgardenseed.com/Taj/blog/2005/09/18/a-month-with-gmail/</guid>
		<description><![CDATA[(Well, almost, anyway).
I decided to try GMail about 3 weeks ago &#8220;just for fun&#8221;. I kind of liked GMail&#8217;s interface and was sick of Thunderbird. So I started forwarding all my emails to my GMail account.
I was hooked. The &#8220;Conversation&#8221; concept is brilliant. It lets me see all the messages in an almost &#8220;threaded&#8221; way, [...]]]></description>
			<content:encoded><![CDATA[<p>(Well, almost, anyway).</p>
<p>I decided to try GMail about 3 weeks ago &#8220;just for fun&#8221;. I kind of liked GMail&#8217;s interface and was sick of Thunderbird. So I started forwarding all my emails to my GMail account.</p>
<p>I was hooked. The <a href="http://gmail.google.com/support/bin/answer.py?answer=5900">&#8220;Conversation&#8221;</a> concept is brilliant. It lets me see all the messages in an almost &#8220;threaded&#8221; way, and keeps my inbox somewhat more sane. The key shortcuts are great, and the spam filtering is almost perfect. In my 3 weeks of using GMail I have had 0 false positives AND 0 false negatives. Pretty good considering that all my taj@wildgardenseed.com mail is getting run through the GMail filter.</p>
<p>The message composition window is very intuitive. For example, when attaching a file, instead of selecting the file, hitting upload, and then send (I usually miss the upload step), you can simply select your file and hit send when you&#8217;re ready. The file is automatically uploaded and attached when sent.</p>
<p>Spell checking works pretty well, with the exception of the fact that you can&#8217;t add words to your own dictionary. GMail always thinks that &#8220;Taj&#8221; is spelled wrong&#8211;but other than that, it &#8220;worgs gread!&#8221;, like any spell checker.</p>
<p>Oh, and did I mention the speed? I know, usually webmail gets bad rap for being sloow&#8211;but not GMail. It uses <a href="http://en.wikipedia.org/wiki/AJAX">AJAX</a> and DHTML to make the interface blazing fast! Heck, it&#8217;s even faster than Thunderbird!</p>
<p>The one problem? If I want to sign/encrypt messages with GPG I need to do it manually. But that&#8217;s not really a problem&#8211;I don&#8217;t need encryption or signing. <img src='http://www.wildgardenseed.com/Taj/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Will I keep GMail? I think so. It has a nice &#8220;Standard HTML&#8221; interface as well, so that I can check my email from something like lynx or Konqueror. It&#8217;s been a fun experiment and I think Google has actually done something cool!</p>
<p>(Look, a post with no &lt;blockquote&gt;!)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wildgardenseed.com/Taj/blog/2005/09/18/a-month-with-gmail/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to Leave the Planet</title>
		<link>http://www.wildgardenseed.com/Taj/blog/2005/09/15/how-to-leave-the-planet/</link>
		<comments>http://www.wildgardenseed.com/Taj/blog/2005/09/15/how-to-leave-the-planet/#comments</comments>
		<pubDate>Thu, 15 Sep 2005 16:42:53 +0000</pubDate>
		<dc:creator>taj</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.wildgardenseed.com/Taj/blog/2005/09/15/how-to-leave-the-planet/</guid>
		<description><![CDATA[

Phone NASA. Their phone number is (713) 483-3111. Explain that it&#8217;s very important that you get away as soon as possible.
If they do not cooperate, phone any friend you may have in the White House&#8211;(202) 456-1414&#8211;to have a word on your behalf with the guys at NASA.
If you don&#8217;t have any friends in the White [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
<ol>
<li>Phone NASA. Their phone number is (713) 483-3111. Explain that it&#8217;s very important that you get away as soon as possible.</li>
<li>If they do not cooperate, phone any friend you may have in the White House&#8211;(202) 456-1414&#8211;to have a word on your behalf with the guys at NASA.</li>
<li>If you don&#8217;t have any friends in the White House, phone the Kremlin (ask the overseas operator for 0107-095-295-9051). They don&#8217;t have any friends there either (at least, none to speak of), but they do seem to have a little influence, so you may as well try.</li>
<li>If that also fails, phone the Pope for guidance. His telephone number is 011-39-6-6982, and I gather that his switchboard is infallible.</li>
<li>If all these attemps fail, flag down a passing flying saucer and explain that it&#8217;s vitally important you get away before your phone bill arrives.</li>
</ol>
</blockquote>
<p><cite>Douglas Adams (Forward to <em>The Hitchhiker&#8217;s Guide to the Galaxy</em>. Forward written in 1983,  1985 and 1986)</cite></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wildgardenseed.com/Taj/blog/2005/09/15/how-to-leave-the-planet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>On New Words&#8230;</title>
		<link>http://www.wildgardenseed.com/Taj/blog/2005/09/12/on-new-words/</link>
		<comments>http://www.wildgardenseed.com/Taj/blog/2005/09/12/on-new-words/#comments</comments>
		<pubDate>Mon, 12 Sep 2005 22:45:23 +0000</pubDate>
		<dc:creator>taj</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.wildgardenseed.com/Taj/blog/2005/09/12/on-new-words/</guid>
		<description><![CDATA[Some modern writers, however, have indulged in a habit of arbitrarily fabricating new words and a new-fangled phraseology, without any necessity, and with manifest injury to the purity of the language. This vicious practice, the offspring of indolence or conceit, implies an ignorance or neglect of the riches in with the English language already abounds, [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Some modern writers, however, have indulged in a habit of arbitrarily fabricating new words and a new-fangled phraseology, without any necessity, and with manifest injury to the purity of the language. This vicious practice, the offspring of indolence or conceit, implies an ignorance or neglect of the riches in with the English language already abounds, and which would have supplied them with words of recognized legitimacy, conveying precisely the same meaning as those they so recklessly coin in the illegal mint of their own fancy.</p></blockquote>
<p><cite>The New American Roget&#8217;s College Thesaurus (1958)</cite></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wildgardenseed.com/Taj/blog/2005/09/12/on-new-words/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Random Quotes</title>
		<link>http://www.wildgardenseed.com/Taj/blog/2005/09/10/random-quotes/</link>
		<comments>http://www.wildgardenseed.com/Taj/blog/2005/09/10/random-quotes/#comments</comments>
		<pubDate>Sun, 11 Sep 2005 03:06:22 +0000</pubDate>
		<dc:creator>taj</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.wildgardenseed.com/Taj/blog/2005/09/10/random-quotes/</guid>
		<description><![CDATA[Here are two snippits of conversation I heard yesterday:
Taj has a bubble, but it&#8217;s all over the place.

Yeah, jumping off of things is really big now.
]]></description>
			<content:encoded><![CDATA[<p>Here are two snippits of conversation I heard yesterday:</p>
<blockquote><p>Taj has a bubble, but it&#8217;s all over the place.
</p></blockquote>
<blockquote><p>Yeah, jumping off of things is really big now.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.wildgardenseed.com/Taj/blog/2005/09/10/random-quotes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hardware Support in Linux (or, &#8220;plug it in and it works&#8221;)</title>
		<link>http://www.wildgardenseed.com/Taj/blog/2005/09/06/hardware-support-in-linux-or-plug-it-in-and-it-works/</link>
		<comments>http://www.wildgardenseed.com/Taj/blog/2005/09/06/hardware-support-in-linux-or-plug-it-in-and-it-works/#comments</comments>
		<pubDate>Tue, 06 Sep 2005 21:20:11 +0000</pubDate>
		<dc:creator>taj</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.wildgardenseed.com/Taj/blog/2005/09/06/hardware-support-in-linux-or-plug-it-in-and-it-works/</guid>
		<description><![CDATA[I&#8217;m writing this from pico because a) uninstalling Dropline totally broke my system, and b) links/lynx doesn&#8217;t let me log into WordPress.
I read a great article in the Linux Journal a few days ago about hardware under Linux by Robert Love. Everyone knows that getting hardware to work under Linux is not fun. I know [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m writing this from pico because a) uninstalling Dropline totally broke my system, and b) links/lynx doesn&#8217;t let me log into WordPress.</p>
<p>I read a great article in the Linux Journal a few days ago about hardware under Linux by Robert Love. Everyone knows that getting hardware to work under Linux is not fun. I know myself because I have a very hard time getting my PCMCIA Belkin Wireless card to work every time I recompile my kernel&#8211;it drives me nuts!</p>
<p>In the article, Robert talks about a &#8220;Hardware Utopia&#8221; in which you plug in your digital camera and you&#8217;re asked if you want to download photos, you put a DVD into your CD/DVD drive, and it starts playing, or you plug in a USB Memory stick and it is automatically mounted and opened in Nautilus/Konqueror.</p>
<p>Now, doesn&#8217;t that sound great? It would be even better if it was true, right? That&#8217;s the best part? It is! Now, you&#8217;re going to say &#8220;No, it&#8217;s not&#8211;my Linux box doesn&#8217;t do that!&#8221; You&#8217;re probably right, it doesn&#8217;t. You need a 2.6 Kernel, HAL, DBUS, and Gnome 2.10. It&#8217;s too bad that I&#8217;m on a 2.4 kernel with KDE 3.4.</p>
<p>But still, it was pretty cool the way it works. You plug in a USB device, HAL uses DBUS to notify everyone that a device of a certain type was plugged in, and gnome-volume-manager then picks up the message and interacts with the user (e.g., starts playing a CD, downloads photos from your digital camera, etc).</p>
<p>After Dropline gets removed from my computer (and after I get some more spare time), I plan to try and port gnome-volume-manager to KDE. I realized that if I wasn&#8217;t going to fork the code base and create an independent &#8220;kde-volume-manager&#8221; I would need to be some easy and clean way to start the proper program based on what Desktop Environment was running.</p>
<p>My idea was to create a library that would return the proper application to run to handle using a device. For example, when a DVD is inserted, the program would call get_application_handler(&#8221;play-dvd&#8221;). If Gnome was running, the library would return &#8220;/usr/bin/totem dvd:/&#8221;. If KDE was running, it would return &#8220;/opt/kde/bin/okle /dev/dvd&#8221;.</p>
<p>The only problem with what I described there is that it isn&#8217;t very flexable. You can&#8217;t set your own favorite handlers. The solution: Have users define their own profiles. You create your profile by dragging-and-dropping .desktop files to a GUI or by editing a XML file. The library then uses your profile when a) it is selected to be the default, or b) when a shell command returns true. For example, in the KDE profile, the command would be `ps ax | grep -cs &#8220;[ ]kwin&#8221;` (returns true if KDE is running).</p>
<p>The advantage of having a library like this is that suddenly GNOME and KDE applications will standardize their configuration on preferred application handlers. The important thing to remember is that <em>this is not a replacement for the MIME-type database!</em> It is, however, a replacement for `gconftool-2 -g /desktop/gnome/url-handlers/http/command` (replacement: get_application_handler(&#8221;http&#8221;)) and the like.</p>
<p>Any comments on this? It might be a pipe dream, never to come true&#8211;but if anyone is interested in helping implement this please drop me a line and we can discuss it more. <img src='http://www.wildgardenseed.com/Taj/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wildgardenseed.com/Taj/blog/2005/09/06/hardware-support-in-linux-or-plug-it-in-and-it-works/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Now Listening To&#8230;</title>
		<link>http://www.wildgardenseed.com/Taj/blog/2005/09/05/now-listening-to/</link>
		<comments>http://www.wildgardenseed.com/Taj/blog/2005/09/05/now-listening-to/#comments</comments>
		<pubDate>Tue, 06 Sep 2005 02:27:11 +0000</pubDate>
		<dc:creator>taj</dc:creator>
		
		<category><![CDATA[The Web]]></category>

		<guid isPermaLink="false">http://www.wildgardenseed.com/Taj/blog/2005/09/05/now-listening-to/</guid>
		<description><![CDATA[I just got a &#8220;Now Listening&#8221; thing setup for Wordpress and amaroK. I modified the Now Playing script to use scp to copy a file containing info on what&#8217;s playing to the webserver. I then wrote a PHP script which parsed this file and inserted the info into a table. Then I wrote a WordPress [...]]]></description>
			<content:encoded><![CDATA[<p>I just got a &#8220;Now Listening&#8221; thing setup for Wordpress and amaroK. I modified the <a href="http://www.kde-apps.org/content/show.php?content=24449">Now Playing</a> script to use scp to copy a file containing info on what&#8217;s playing to the webserver. I then wrote a PHP script which parsed <a href="http://www.wildgardenseed.com/Taj/amarok/nowPlaying.txt">this file</a> and inserted the info into a table. Then I wrote a WordPress plugin to extract the info from the table and append it onto the end of a post. Sometime I&#8217;ll post a patch and put it up on my website. I&#8217;ve got two other posts that I wrote a few days ago (when I was board), but never finished them&#8211;maybe they&#8217;ll make it up sometime.</p>
<p>It&#8217;s a nasty hack, but it works. <img src='http://www.wildgardenseed.com/Taj/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>EDIT 2007/05/16 :: No, I never made it any prettier, however, if you care, here&#8217;s the a letter I sent to someone on how to implement a similar thing in your blog. Use with caution, and always make a backup of your files and DB. I&#8217;m not responsible if anything blows up. You keep all the pieces.</strong></p>
<p>I&#8217;ve got a script running in Amarok that uses uploads info on the currently playing song with FTP into a <a href="http://wildgardenseed.com/Taj/amarok/nowPlaying-1.txt">file like this</a>. This file gets<br />
the info off my computer and onto the server.</p>
<p>On the server side of things:<br />
I have a table called now_playing in the same DB as WP. It&#8217;s created like this:</p>
<p><code><br />
CREATE TABLE `now_playing` (<br />
 `id` int(10) unsigned NOT NULL auto_increment,<br />
 `post_id` bigint(20) unsigned NOT NULL default '0',<br />
 `title` varchar(255) default NULL,<br />
 `artist` varchar(255) default NULL,<br />
 `album` varchar(255) default NULL,<br />
 PRIMARY KEY  (`id`)<br />
);</code></p>
<p>In wp-admin/post.php is where most of the code is. The code starts around line 37 inside the
<pre>'switch($action) { case 'post':'</pre>
<p> statement.</p>
<p>This is the code I have:<br />
<code><br />
case 'post':<br />
       check_admin_referer();</p>
<p>       $post_ID = write_post();</p>
<p>       // deal with nowPlaying<br />
       $file = "/home/www/wildgardenseed.com/Taj/amarok/nowPlaying.txt";<br />
   if (!$lines=@file($file)) {<br />
       //echo "Failed to open file";<br />
       $music_query = "INSERT INTO now_playing(post_id,title,artist,album) VALUES ('$post_ID', NULL,NULL,NULL)";<br />
       $result = $wpdb-&gt;query($music_query);<br />
   }<br />
   else {<br />
       foreach ($lines as $line_num =&gt; $line) {<br />
           switch ($line) {<br />
               case (strpos($line,"isPlaying")):<br />
                   if ($line=="isPlaying: true\n") {<br />
                       $info["is_playing"]=true;<br />
                   }<br />
                   else {<br />
                       $info["is_playing"]=false;<br />
                   }<br />
                   break;<br />
               case (strpos($line,"artist")):<br />
                   $info["artist"]=str_replace("\n","",substr($line,8));<br />
                   break;<br />
               case (strpos($line,"title")):<br />
                   $info["title"]=str_replace("\n","",substr($line,7));<br />
                   break;<br />
               case (strpos($line,"album")):<br />
                   $info["album"]=str_replace("\n","",substr($line,7));<br />
                   break;<br />
           }<br />
       }<br />
       if ($info["is_playing"]) {<br />
           $music_query = "INSERT INTO now_playing (post_id,title,artist,album) VALUES ('$post_ID', '".mysql_escape_string($info["title"])."', '".mysql_escape_string($info["artist"])."', '".mysql_escape_string($info["album"])."')";<br />
           $result = $wpdb->query($music_query);<br />
       }<br />
       else {<br />
           $music_query = "INSERT INTO now_playing (post_id,title,artist,album) VALUES ('$post_ID',<br />
'Silence',NULL,NULL)";<br />
           $result = $wpdb-&gt;query($music_query);<br />
       }<br />
       }</p>
<p>       // Done with nowPlaying</p>
<p>       // Redirect.<br />
</code><br />
[&#8230;continue normal code]</p>
<p>Of course, change the $file variable to contain the full path to the file that you&#8217;ve uploaded.</p>
<p>The above code reads the file and stores it in the DB. To display the info at the end of each post, I wrote this plugin. It goes in wp-content/plugins/nowplaying.php:<br />
<code><br />
&lt;?php<br />
# -- WordPress Plugin Interface -----------------------------------------------<br />
/*<br />
Plugin Name: Now Playing<br />
Plugin URI: http://www.wildgardenseed.com/Taj<br />
Description: Now Playing takes info from the now_playing table and<br />
appends it to the post_content<br />
Version: 1.0.0<br />
Author: Taj Morton<br />
Author URI: http://www.wildgardenseed.com/Taj/blog<br />
*/</p>
<p>function add_nowplaying($content) {<br />
   $song=get_the_song();<br />
   //if all columns are null, then don't output anything--if amarok<br />
isn't running, then we're listening to "Silence"<br />
   if ($song-&gt;title=='Silence') {<br />
       $content.="Listening to &lt;strong&gt;Silence&lt;/strong&gt;";<br />
   }<br />
   elseif($song->artist) {<br />
       $content.="&lt;p&gt;Listening to<br />
&lt;strong&gt;".htmlentities($song->title)."&lt;/strong&gt; by<br />
&lt;strong&gt;".htmlentities($song->artist)."&lt;/strong&gt; on<br />
&lt;strong&gt;".htmlentities($song->album)."&lt;/strong&gt;.&lt;/p&gt;";<br />
   }</p>
<p>   return $content;<br />
}</p>
<p>add_filter('the_content','add_nowplaying');<br />
?&gt;<br />
</code></p>
<p>That just might work! <em>Be sure</em> to make a backup first, and always play with a local copy. Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wildgardenseed.com/Taj/blog/2005/09/05/now-listening-to/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.272 seconds -->
