<?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>Tell Me a Story About the Devil &#187; wordpress</title>
	<atom:link href="http://rumored.com/journal/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://rumored.com/journal</link>
	<description>The assorted ramblings of a Midwestern writer in California</description>
	<lastBuildDate>Sat, 31 Jul 2010 02:54:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Shell scripting will eventually kill me</title>
		<link>http://rumored.com/journal/2009/10/01/shell-scripting-will-eventually-kill-me/</link>
		<comments>http://rumored.com/journal/2009/10/01/shell-scripting-will-eventually-kill-me/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 14:00:03 +0000</pubDate>
		<dc:creator>jkonrath</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://rumored.com/journal/?p=322</guid>
		<description><![CDATA[I spent two hours the other night trying to hack out a shell script to import the archives into this thing. WordPress doesn&#8217;t have a simple way to just suck in a bunch of text files; you need to assemble &#8230; <a href="http://rumored.com/journal/2009/10/01/shell-scripting-will-eventually-kill-me/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I spent two hours the other night trying to hack out a shell script to import the archives into this thing.  WordPress doesn&#8217;t have a simple way to just suck in a bunch of text files; you need to assemble them into something that resembles an RSS feed, and then import that.  This brought up two problems:</p>
<p>1) All of the posts had to be on a single line in the <code></code> element.  This involved a bit of dicking around with <code>awk</code> and then <code>sed</code> before I finally gave up and realized I could do it faster with <code>tr</code>.</p>
<p>2) The pubdate element had to be in RFC-822 time format, and the only thing I had to work with was the filename, which was in YYYYMMDD format.  It took most of the two hours to figure out the god damned <code>/bin/date</code> program that ships with OS X is fundamentally broken, and ALL date commands in unixes are broken, because instead of curing cancer or stopping wars, about 80% of our world&#8217;s brainpower goes to stupid pursuits like &#8220;oh, I have philosophical issues with the 87 flags offered in BSD&#8217;s date program, so I&#8217;m going to write a completely incompatible one with 73 flags of its own, but still fail to address the two or three things people need to do with a time program.&#8221;</p>
<p>Case in point, this DOES NOT work in OS X:</p>
<p><code>date -j -f "%Y%m%d" "20090930" +"%+"</code></p>
<p>This DOES work:</p>
<p><code>date -j -f "%Y %m%d" "2009 0930" +"%+"</code></p>
<p>But my filenames are <code>20090930.html</code> and not <code>2009 0930.html</code>.  That extra fucking space killed me.</p>
<p>AND YES, I am sure I am just an idiot, and if I sat around all day writing shell scripts, I would KNOW that blah blah blah hidden flag blah blah blah run it through a perl script blah blah blah.  But truth of the matter is, I write maybe a half-dozen lines of shell script every three months, and then promptly forget everything.  I&#8217;m sure if I sat around all day slicing onions into cubes, I would be a god damned onion slicing master, but the truth of it is, I only need to cut up maybe one onion a week tops, and I&#8217;m not about to quit my day job just to sit around slicing up onions.</p>
<p>Here&#8217;s the script:</p>
<pre>for f in ~/website-mirror/oldjournal/html/1997*.html; do
    echo "&lt;item&gt;"
    OLDDATE=`basename -s .html $f`
    THEYEAR=`echo $OLDDATE | cut -c1-4`
    THEREST=`echo $OLDDATE | cut -c5-8`
    SHIT=`echo $THEYEAR $THEREST`
    pubdate=$(    date -j -f "%Y %m%d" "`echo $SHIT`" +"%+")
    echo -n "&lt;pubDate&gt;"
    echo -n $pubdate
    echo "&lt;/pubDate&gt;"
    echo "&lt;category&gt;&lt;/category&gt;"
    echo "&lt;title&gt;&lt;/title&gt;"
    echo "&lt;content:encoded&gt;`tr '\n' ' ' &lt; $f`&lt;/content:encoded&gt;"
    echo "&lt;/item&gt;"
done</pre>
]]></content:encoded>
			<wfw:commentRss>http://rumored.com/journal/2009/10/01/shell-scripting-will-eventually-kill-me/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Switch</title>
		<link>http://rumored.com/journal/2009/09/27/the-switch/</link>
		<comments>http://rumored.com/journal/2009/09/27/the-switch/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 19:24:22 +0000</pubDate>
		<dc:creator>jkonrath</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[site-news]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://rumored.com/journal/?p=45</guid>
		<description><![CDATA[No, a piece of rogue malware did not hit my site. I finally threw in the towel and switched to WordPress as the back-end of this site. I got sick of all of the duct tape maintenance keeping this thing &#8230; <a href="http://rumored.com/journal/2009/09/27/the-switch/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>No, a piece of rogue malware did not hit my site.  I finally threw in the towel and switched to WordPress as the back-end of this site.  I got sick of all of the duct tape maintenance keeping this thing going, and I wanted it to not look like it was created in 1997 (which it was).  So here we are.  This is still in shakedown mode, so there will be lots of bugs and omissions and other errata.  Please leave comments and let me know if this works for you and if it&#8217;s more or less readable than the previous version.</p>
<p>I have not imported over any archives prior to this year, and it looks like this will be a monumental cut-and-paste task.  I will (famous last words) get to it eventually.</p>
<p>No real news to report right now, and I am in a hurry to finish lunch and get out the door to the grocery store.  I have been busy writing something, although I don&#8217;t know what it is.  I&#8217;ve also got a &#8220;must read immediately&#8221; queue of at least four books that are burning a hole in my pocket (mixed metaphor, sorry.)</p>
<p>OK, more later &#8211; hopefully this will be more conducive to shorter &#8220;blogging&#8221; posts mixed within the other longer bits.  I know I hate &#8220;blogging&#8221;, but I always have quick thoughts or riffs that are too long for twitter and will go stale before I get a spare hour to mess around on here.</p>
<p>BTW create yourself an account and log in &#8211; anyone with an email address can comment, but I&#8217;ll be going password-only for some rants that fall into the blood and money genres.  (No, not Wall Street vampires.)</p>
]]></content:encoded>
			<wfw:commentRss>http://rumored.com/journal/2009/09/27/the-switch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
