<?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>Pontus Östlund &#187; Ruby</title>
	<atom:link href="http://www.poppa.se/blog/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.poppa.se/blog</link>
	<description>My blog about web development and such</description>
	<lastBuildDate>Mon, 16 Jan 2012 00:38:45 +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>Plogger is dead, long live Redroom</title>
		<link>http://www.poppa.se/blog/plogger-is-dead-long-live-redroom/</link>
		<comments>http://www.poppa.se/blog/plogger-is-dead-long-live-redroom/#comments</comments>
		<pubDate>Sun, 04 Mar 2007 12:54:11 +0000</pubDate>
		<dc:creator>Pontus</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.poppa.se/blog/?p=79</guid>
		<description><![CDATA[Now I have renamed my blogging system Plogger to Redroom. As I wrote before I noticed that there is a web photo gallery named Plogger written in PHP so I just had to come up with a new name. 
I decided to call it Redroom for a couple of reasons:

It sounds pretty OK I think, [...]]]></description>
			<content:encoded><![CDATA[<p>Now I have renamed my blogging system Plogger to Redroom. As I wrote before I noticed that there is a <a href='http://www.plogger.org'>web photo gallery</a> named Plogger written in <a href='http://www.php.net'>PHP</a> so I just had to come up with a new name. </p>
<p>I decided to call it <strong>Redroom</strong> for a couple of reasons:</p>
<ol>
<li>It sounds pretty OK I think, short and snappy?!</li>
<li>A <a href='http://www.google.se/search?q=redroom'>Google search</a> gives no (high rank) hits to anything related to any software project.</li>
<li><a href="http://en.wikipedia.org/wiki/The_Red_Room_(Strindberg)">The Red Room</a> is probably the most famous novel by one of Swedens most (in)famous authors <a href='http://en.wikipedia.org/wiki/August_Strindberg'>August Strindberg</a>. Authors write and so do bloggers so I thought the analogy with Strindberg and The Red Room works rather well <img src='http://www.poppa.se/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
</ol>
<p>So now I have renamed every occurance of <em>Plogger</em> to <em>RedRoom</em> in the source code. I first thought I should try <code>grep</code> and <code>grep</code> to rename every occurance in all files in one go but since I store the source in <a href='http://subversion.tigris.org/'>Subversion</a> I have a lot of .svn directories that mustn&#8217;t be tempered with. What I did was I made a copy of my work area and wrote a <a href='http://www.ruby-lang.org'>Ruby</a> script that did the text replacing and deleted all .svn directories. Then it was just to over write the original directory with the altered copy. All altered files was updated and the .svn directories was untouched so lastly it was just to commit the changes and that was that.</p>
<p>Here&#8217;s the little Ruby script:</p>
<pre><code lang='ruby'>#!/usr/bin/ruby

Discart_Files = ["logs", "data"]

def Recurse_Dir(dir)
  Dir.foreach(dir) do |file|
    next if Discart_Files.include?(file) || file =~ /^\\.\\.?$/
    file_dir = dir + File::Separator + file
    `rm -Rf #{file_dir}` and next if file == '.svn'
    if File.directory?(file_dir)
      Recurse_Dir(file_dir)
    else
      if file =~ /\\.php$/
        content = IO.readlines(file_dir).join.gsub(/Plogger/, "RedRoom") \\
                                               .gsub(/PLOGGER/, 'REDROOM')
          File.open(file_dir, "w") { |f| f.write content }
      end
    end
  end
end

Recurse_Dir('./blog')</code></pre>
<p>Whats left to rename is the desktop client, but that&#8217;s no rush!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.poppa.se/blog/plogger-is-dead-long-live-redroom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

