<?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>Marcus Hellberg &#187; Programming</title>
	<atom:link href="http://www.marcushellberg.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marcushellberg.com</link>
	<description>blog.</description>
	<lastBuildDate>Sat, 20 Mar 2010 12:39:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Update</title>
		<link>http://www.marcushellberg.com/2010/03/20/update/</link>
		<comments>http://www.marcushellberg.com/2010/03/20/update/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 12:39:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Info]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[touchkit]]></category>
		<category><![CDATA[vaadin]]></category>

		<guid isPermaLink="false">http://www.marcushellberg.com/?p=235</guid>
		<description><![CDATA[So apparently I haven&#8217;t updated my blog in quite a while. Quite a lot has happened since the last update.
I started working at IT Mill, the company behind the Vaadin framework.I&#8217;ve gotten off to a good start, I&#8217;m currently working on something I call TouchKit. It&#8217;s a combination of a few custom components and extensions [...]]]></description>
			<content:encoded><![CDATA[<p>So apparently I haven&#8217;t updated my blog in quite a while. Quite a lot has happened since the last update.</p>
<p>I started working at IT Mill, the company behind the <a href="http://vaadin.com">Vaadin framework</a>.I&#8217;ve gotten off to a good start, I&#8217;m currently working on something I call TouchKit. It&#8217;s a combination of a few custom components and extensions to Vaadin that allows you to create web applications that look like iPhone applications using nothing but Java. Check out the video preview below:</p>
<p><object width="400" height="738"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10278516&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=10278516&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="738"></embed></object></p>
<p>Well, that&#8217;s all for now. I&#8217;ll try to get back to the habit of updating the blog a bit more often again <img src='http://www.marcushellberg.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.marcushellberg.com/2010/03/20/update/&amp;title=Update" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.marcushellberg.com/2010/03/20/update/&amp;title=Update" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.marcushellberg.com/2010/03/20/update/&amp;t=Update" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Update+-+http://b2l.me/knx2r+(via+@marcushellberg)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.marcushellberg.com/2010/03/20/update/&amp;title=Update&amp;summary=So%20apparently%20I%20haven%27t%20updated%20my%20blog%20in%20quite%20a%20while.%20Quite%20a%20lot%20has%20happened%20since%20the%20last%20update.%0D%0A%0D%0AI%20started%20working%20at%20IT%20Mill%2C%20the%20company%20behind%20the%20Vaadin%20framework.I%27ve%20gotten%20off%20to%20a%20good%20start%2C%20I%27m%20currently%20working%20on%20something%20I%20call%20TouchKit.%20It%27s%20a%20combination%20of%20a%20few%20custom%20c&amp;source=Marcus Hellberg" rel="nofollow" class="external" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://www.marcushellberg.com/2010/03/20/update/&amp;title=Update" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.marcushellberg.com/2010/03/20/update/&amp;t=Update" rel="nofollow" class="external" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.marcushellberg.com/2010/03/20/update/&amp;n=Update&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://www.marcushellberg.com/2010/03/20/update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Textile to XHTML converter</title>
		<link>http://www.marcushellberg.com/2010/01/22/textile-to-xhtml-converter/</link>
		<comments>http://www.marcushellberg.com/2010/01/22/textile-to-xhtml-converter/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 11:42:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.marcushellberg.com/?p=225</guid>
		<description><![CDATA[A while back, I needed to quickly write some documentation that needed to be in XHTML format. Writing in plain XHTML is a pain, so I decided to write the documentation in Textile and then convert it to XHTML before publishing.
The problem I found was that all Textile converters were made for use in blogs [...]]]></description>
			<content:encoded><![CDATA[<p>A while back, I needed to quickly write some documentation that needed to be in XHTML format. Writing in plain XHTML is a pain, so I decided to write the documentation in Textile and then convert it to XHTML before publishing.</p>
<p>The problem I found was that all Textile converters were made for use in blogs and other online tools. What I needed was a good old-fashioned command line program to convert a given textile file into XHTML.</p>
<p>Fortunately, using Ruby and the excellent RedCloth gem, I could write a small script to accomplish this in a few minutes.</p>
<p>If you have any similar needs, copy the source into a file named textile2html, make it executable (chmod +x) and place it somewhere in your path. Then all you have to do is call textile2html with the textile file as an argument:</p>
<pre>$ textile2html documentation.textile</pre>
<pre class="brush:ruby">#!/usr/bin/env ruby -wKU
require "rubygems"
require "RedCloth"

if ARGV.size != 1
puts "Usage: textile2html file.textile"
exit
end

# Read input file
textile_string = ""
begin
  input_file = File.new(ARGV[0], "r")
  input_file.each do |line|
    textile_string+=line
  end
  input_file.close
rescue
  puts "Could not read input file."
  exit
end

# Create output file
filename = ARGV[0].gsub(/\.\w+$/, "")
begin
  output_file = File.new("#{filename}.html", "w")
rescue
  puts "Could not create output file."
  exit
end

html_header = &lt;&lt;DOC
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"&gt;
&lt;head&gt;
&lt;title&gt;
DOC

html_header += filename;
html_header += &lt;&lt;DOC
&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
DOC

html_footer = &lt;&lt;DOC
&lt;/body&gt;
&lt;/html&gt;
DOC

html_output = RedCloth.new(textile_string).to_html
output_file.puts(html_header)
output_file.puts(html_output)
output_file.puts(html_footer)
output_file.close

puts "Done."
</pre>
<p>Questions? Comments? Post them below.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.marcushellberg.com/2010/01/22/textile-to-xhtml-converter/&amp;title=Textile+to+XHTML+converter" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.marcushellberg.com/2010/01/22/textile-to-xhtml-converter/&amp;title=Textile+to+XHTML+converter" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.marcushellberg.com/2010/01/22/textile-to-xhtml-converter/&amp;t=Textile+to+XHTML+converter" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Textile+to+XHTML+converter+-+http://b2l.me/ede5D+(via+@marcushellberg)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.marcushellberg.com/2010/01/22/textile-to-xhtml-converter/&amp;title=Textile+to+XHTML+converter&amp;summary=A%20while%20back%2C%20I%20needed%20to%20quickly%20write%20some%20documentation%20that%20needed%20to%20be%20in%20XHTML%20format.%20Writing%20in%20plain%20XHTML%20is%20a%20pain%2C%20so%20I%20decided%20to%20write%20the%20documentation%20in%20Textile%20and%20then%20convert%20it%20to%20XHTML%20before%20publishing.%0D%0A%0D%0AThe%20problem%20I%20found%20was%20that%20all%20Textile%20converters%20were%20made%20for%20use%20&amp;source=Marcus Hellberg" rel="nofollow" class="external" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://www.marcushellberg.com/2010/01/22/textile-to-xhtml-converter/&amp;title=Textile+to+XHTML+converter" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.marcushellberg.com/2010/01/22/textile-to-xhtml-converter/&amp;t=Textile+to+XHTML+converter" rel="nofollow" class="external" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.marcushellberg.com/2010/01/22/textile-to-xhtml-converter/&amp;n=Textile+to+XHTML+converter&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://www.marcushellberg.com/2010/01/22/textile-to-xhtml-converter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Syntax highlighters</title>
		<link>http://www.marcushellberg.com/2009/12/21/syntax-highlighters/</link>
		<comments>http://www.marcushellberg.com/2009/12/21/syntax-highlighters/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 07:05:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://www.marcushellberg.com/?p=66</guid>
		<description><![CDATA[As I am probably going to post much on programming, I felt that I needed a way of highlighting code syntax and showing it in an easier to read format to you. At first I thought of just using Alex Gorbatchev&#8217;s SyntaxHighlighter. It turned out that there were in fact several WordPress plugins using Alex&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>As I am probably going to post much on programming, I felt that I needed a way of highlighting code syntax and showing it in an easier to read format to you. At first I thought of just using Alex Gorbatchev&#8217;s <a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter" target="_blank">SyntaxHighlighter</a>. It turned out that there were in fact several WordPress plugins using Alex&#8217;s highlighter. Many of the existing highlighters did not work very well, they simply included the JavaScript file, requiring users to insert</p>
<pre class="brush:html">&lt;pre name="code" class="html"&gt;
...
&lt;/pre&gt;</pre>
<p>into the HTML. The problem is that WordPress&#8217; HTML editor strips out the name=&#8221;code&#8221; part, rendering the plugins useless.</p>
<p>What I settled on using, for the time being at least, is Vijesh Mehta <a href="http://www.lastengine.com/syntax-highlighter-wordpress-plugin/" target="_blank">Syntax Highlighter Wordpress Plugin</a>. The plugin still requires manual HTML editing, but avoids the stripping of the name attribute by using class=&#8221;brush:language_name&#8221; instead.</p>
<p>So, as a start for my posts on programming: the classical &#8220;hello world&#8221;, in ruby this time.</p>
<pre class="brush:ruby">puts "hello world!"</pre>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.marcushellberg.com/2009/12/21/syntax-highlighters/&amp;title=Syntax+highlighters" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://www.marcushellberg.com/2009/12/21/syntax-highlighters/&amp;title=Syntax+highlighters" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.marcushellberg.com/2009/12/21/syntax-highlighters/&amp;t=Syntax+highlighters" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Syntax+highlighters+-+http://b2l.me/bxacd+(via+@marcushellberg)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.marcushellberg.com/2009/12/21/syntax-highlighters/&amp;title=Syntax+highlighters&amp;summary=As%20I%20am%20probably%20going%20to%20post%20much%20on%20programming%2C%20I%20felt%20that%20I%20needed%20a%20way%20of%20highlighting%20code%20syntax%20and%20showing%20it%20in%20an%20easier%20to%20read%20format%20to%20you.%20At%20first%20I%20thought%20of%20just%20using%20Alex%20Gorbatchev%27s%20SyntaxHighlighter.%20It%20turned%20out%20that%20there%20were%20in%20fact%20several%20WordPress%20plugins%20using%20Al&amp;source=Marcus Hellberg" rel="nofollow" class="external" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://www.marcushellberg.com/2009/12/21/syntax-highlighters/&amp;title=Syntax+highlighters" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-myspace">
			<a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.marcushellberg.com/2009/12/21/syntax-highlighters/&amp;t=Syntax+highlighters" rel="nofollow" class="external" title="Post this to MySpace">Post this to MySpace</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.marcushellberg.com/2009/12/21/syntax-highlighters/&amp;n=Syntax+highlighters&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://www.marcushellberg.com/2009/12/21/syntax-highlighters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
