<?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>Josef Richter &#187; ruby</title>
	<atom:link href="http://www.josefrichter.com/blog/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.josefrichter.com/blog</link>
	<description>blogging about the world around</description>
	<lastBuildDate>Sat, 14 Jan 2012 10:55:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>One more wallpaper with The Hit List to-dos</title>
		<link>http://www.josefrichter.com/blog/one-more-wallpaper-with-the-hit-list-to-dos/</link>
		<comments>http://www.josefrichter.com/blog/one-more-wallpaper-with-the-hit-list-to-dos/#comments</comments>
		<pubDate>Tue, 26 May 2009 15:04:04 +0000</pubDate>
		<dc:creator>Josef Richter</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[user interface]]></category>
		<category><![CDATA[appscript]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[geektool]]></category>
		<category><![CDATA[gtd]]></category>
		<category><![CDATA[potion factory]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[the hit list]]></category>
		<category><![CDATA[todo]]></category>
		<category><![CDATA[wallpaper]]></category>

		<guid isPermaLink="false">http://www.josefrichter.com/blog/?p=151</guid>
		<description><![CDATA[My friend Vojto from http://www.infinite.sk/(check his portfolio, talented guy!) sent me his variation on my wallpaper, which displays to-dos from The Hit List. The Hit List is a really very nice alternative to Things. I used it before Things, but I was missing the iPhone version. I beleive they will be adding iPhone version sooner [...]]]></description>
			<content:encoded><![CDATA[<p>My friend Vojto from <a href="http://www.infinite.sk/">http://www.infinite.sk/</a>(check his portfolio, talented guy!) sent me his variation on my wallpaper, which displays to-dos from The Hit List. <a href="http://www.potionfactory.com/thehitlist/">The Hit List</a> is a really very nice alternative to Things. I used it before Things, but I was missing the iPhone version. I beleive they will be adding iPhone version sooner or later, though. It&#8217;s a must. But I just LOVE their icon. Maybe the most beautiful one on my MacBook.</p>
<p><a href="http://www.josefrichter.com/blog/wp-content/uploads/thehitlisticon.png"><img src="http://www.josefrichter.com/blog/wp-content/uploads/thehitlisticon-500x500.png" alt="thehitlisticon" title="thehitlisticon" width="500" height="500" class="alignnone size-large wp-image-152" /></a></p>
<p>Here is the screenshot of Vojto&#8217;s wallpaper &#8220;in action&#8221;. It&#8217;s for tiny displays: 1680&#215;1050 <img src='http://www.josefrichter.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://www.josefrichter.com/blog/wp-content/uploads/blue_screenshot.jpg"><img src="http://www.josefrichter.com/blog/wp-content/uploads/blue_screenshot-500x312.jpg" alt="blue dynamic wallpaper" title="blue dynamic wallpaper" width="500" height="312" class="alignnone size-large wp-image-153" /></a></p>
<p>Grab the underlying JPG wallpaper <a href="http://www.josefrichter.com/blog/wp-content/uploads/blue-wallpaper.jpg">here</a>.</p>
<p>Now the scripting. It&#8217;s going to be just a little bit more difficult than with Things, but nothing to be scared of.</p>
<p>If you need the introduction to GeekTool, please see the <a href="http://www.josefrichter.com/blog/dynamic-gtd-wallpaper-with-things-to-dos/">previous post</a>.</p>
<p>1. You will need <a href="http://developer.apple.com/Tools/">Apple Developer Tools</a> and <a href="http://www.ruby-lang.org/en/downloads/">Ruby</a>, which should both be included in your Mac OS installation.</p>
<p>2. You will need <a href="http://appscript.sourceforge.net/">rb-appscript</a> which you install by entering &#8220;sudo gem install rb-appscript&#8221; in terminal. This makes application scriptable using Ruby (alternatively Python or ObjC). If you don&#8217;t know what the hell does it mean, just don&#8217;t care and proceed <img src='http://www.josefrichter.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>3. Now create file ~/.hitlist and put in the following code UPDATE: the new code checks if The Hit List is open, and if not, it will close it again after taking the to-dos from it.</p>
<div style="font-size: 10px;">
<pre class="brush: ruby; gutter: false; auto-links: false; font-size: 5%; tab-size: 2;">
#!/usr/bin/ruby 

# Load up appscript
begin; require 'rubygems'; rescue LoadError; end
require 'appscript'

# Load Hit List and check if running
thl=Appscript.app('The Hit List')
begin
  wasnt_running = true
  thl.run
end unless thl.is_running?

# Get todos
puts thl.today_list.tasks.get.find_all { |t|
  !t.completed.get
}.map{ |t|
  t.title.get
}.join("\n")

thl.quit if wasnt_running
</pre>
</div>
<p>Save &#038; close</p>
<p>4. In terminal, type &#8220;chmod +x ~/.hitlist&#8221; to allow reading from this file.</p>
<p>5. Open the geek tool and add new item as follows:</p>
<p><a href="http://www.josefrichter.com/blog/wp-content/uploads/hitlist_geektool.png"><img src="http://www.josefrichter.com/blog/wp-content/uploads/hitlist_geektool-500x355.png" alt="hitlist_geektool" title="hitlist_geektool" width="500" height="355" class="alignnone size-large wp-image-154" /></a></p>
<p>And you should be done! Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.josefrichter.com/blog/one-more-wallpaper-with-the-hit-list-to-dos/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
	</channel>
</rss>

