<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>eventless.net</title>
	<atom:link href="http://eventless.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://eventless.net</link>
	<description>random thoughts and scripts</description>
	<lastBuildDate>Sat, 07 Jan 2012 15:53:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='eventless.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/1193e7618c2ad61d8db98841d6f408cf?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>eventless.net</title>
		<link>http://eventless.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://eventless.net/osd.xml" title="eventless.net" />
	<atom:link rel='hub' href='http://eventless.net/?pushpress=hub'/>
		<item>
		<title>Sharepoint 2010 Managed Metadata Tag Cloud</title>
		<link>http://eventless.net/2011/06/11/sharepoint-2010-managed-metadata-tag-cloud/</link>
		<comments>http://eventless.net/2011/06/11/sharepoint-2010-managed-metadata-tag-cloud/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 16:35:29 +0000</pubDate>
		<dc:creator>Even</dc:creator>
				<category><![CDATA[Random Scripts]]></category>
		<category><![CDATA[Extensible Stylesheet Language]]></category>
		<category><![CDATA[Metadata]]></category>
		<category><![CDATA[Microsoft SharePoint]]></category>
		<category><![CDATA[Tag cloud]]></category>
		<category><![CDATA[Web part]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://eventlessdotnet.wordpress.com/?p=26</guid>
		<description><![CDATA[I&#8217;m in the process of reorganizing a Sharepoint 2010 site for our department, and one of the big changes is going from a folder based structure to a flat list of tagged and categorized documents. In order to create a nice &#8230; <a href="http://eventless.net/2011/06/11/sharepoint-2010-managed-metadata-tag-cloud/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=26&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the process of reorganizing a <a class="zem_slink" title="Microsoft SharePoint" href="http://en.wikipedia.org/wiki/Microsoft_SharePoint" rel="wikipedia">Sharepoint</a> 2010 site for our department, and one of the big changes is going from a folder based structure to a flat list of tagged and categorized documents.</p>
<p>In order to create a nice visual way of filtering the list, I&#8217;ve implemented a tag cloud using the managed metadata fields in the list. Here it is:</p>
<p><img class="alignnone size-full wp-image-30" title="Sharepoint 2010 Tag Cloud" src="http://eventlessdotnet.files.wordpress.com/2011/06/tagcloud.png?w=584" alt=""   /></p>
<p>Now, Sharepoint&#8217;s built in Tag Cloud Webpart can only access Tags, not Managed Metadata columns. Tags are a no-go since they can&#8217;t be shown in list views, and you can&#8217;t have multiple sets of metadata. Managed Metadata on the other hand, is perfect for our situation.</p>
<p>So, in order to create the managed metadata tag cloud, I used the brilliant <a title="Sharepoint 2010 Managed Metadata WebPart" href="http://metadatawebpart.codeplex.com/">Sharepoint 2010 Managed Metadata WebPart</a> from <a href="http://www.codeplex.com/site/users/view/Brian_J_C">Brian JC</a>. The web part takes as arguments a list, the column from which you want to display the metadata fields, and an <a class="zem_slink" title="Extensible Stylesheet Language" href="http://en.wikipedia.org/wiki/Extensible_Stylesheet_Language" rel="wikipedia">XSL stylesheet</a> to format the contents. And it&#8217;s free! (GPL license)</p>
<p>The default stylesheet produces the following output:</p>
<p><a href="http://eventlessdotnet.files.wordpress.com/2011/06/default_output.jpg"><img class="alignnone size-full wp-image-29" title="Managed Metadata WebPart default view" src="http://eventlessdotnet.files.wordpress.com/2011/06/default_output.jpg?w=584" alt=""   /></a></p>
<p>Now, in order to get it to display as a tag cloud, replace the default stylesheet with this XSL (swap METADATACOLUMNNAME with the actual column name in your list):</p>
<p><pre class="brush: xml;">
&lt;?xml version='1.0' encoding='utf-8'?&gt;
&lt;xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-microsoft-com:xslt' exclude-result-prefixes='msxsl'&gt;
  &lt;xsl:output method='html' indent='yes'/&gt;
  &lt;xsl:template name='terms' match='//termset'&gt;
    &lt;xsl:param name='d'/&gt;
    &lt;div class='termset' style='padding: 10px 0px; text-align: center;'&gt;
      &lt;xsl:variable name='AvgHit'&gt;&lt;xsl:value-of select='sum(//term/itemcount) div count(//term[itemcount &gt; 0])'/&gt;&lt;/xsl:variable&gt;
      &lt;xsl:for-each select='//term[itemcount &gt; 0]'&gt;
        &lt;xsl:sort select='name'/&gt;
        &lt;xsl:element name='span'&gt;
          &lt;xsl:attribute name='style'&gt;
            padding-right: 5px;
            vertical-align: middle;
            padding-left: 5px;
            &lt;xsl:if test='itemcount &gt; $AvgHit'&gt;font-size:1.5em;&lt;/xsl:if&gt;
          &lt;/xsl:attribute&gt;
          &lt;xsl:element name='a'&gt;
            &lt;xsl:attribute name='href'&gt;?FilterField1=METADATACOLUMNNAME&amp;amp;FilterValue1=&lt;xsl:value-of select='name'/&gt;&lt;/xsl:attribute&gt;
            &lt;xsl:value-of select='name'/&gt;
          &lt;/xsl:element&gt;
        &lt;/xsl:element&gt;
        &lt;xsl:if test='position() != last()'&gt;
          &lt;span style=&quot;font-size: 90%; color:#ccc; vertical-align:middle;&quot;&gt; | &lt;/span&gt;
        &lt;/xsl:if&gt;
      &lt;/xsl:for-each&gt;
    &lt;/div&gt;
  &lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;
</pre></p>
<p>What it does:</p>
<ul>
<li>Ignores the metadata structure, listing all tags</li>
<li>Removes tags that aren&#8217;t used in the list</li>
<li>Increases the font size for all tags used in a higher than average number of items (the most popular tags)</li>
<li>Adds a link to filter the given list using the chosen tag (Note: The list to be filtered must be on the same page as this web part)</li>
</ul>
<div>And that&#8217;s it! With some knowledge of XSL, it should be easy to adjust this to whatever needs you might have.</div>
<div>Thanks to Brian for a great web part! Any issues or success stories, feel free to post in the comments.</div>
<div><strong>UPDATE:</strong> Added a couple of spaces in the delimiter span to fix a problem where the line doesn&#8217;t break if there are no tags with spaces in them. Thanks to Christian for the input!</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eventlessdotnet.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eventlessdotnet.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eventlessdotnet.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eventlessdotnet.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eventlessdotnet.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eventlessdotnet.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eventlessdotnet.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eventlessdotnet.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eventlessdotnet.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eventlessdotnet.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eventlessdotnet.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eventlessdotnet.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eventlessdotnet.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eventlessdotnet.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=26&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eventless.net/2011/06/11/sharepoint-2010-managed-metadata-tag-cloud/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3d5dbfe6775c6ce06fc3ef98ab9036d6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evenv</media:title>
		</media:content>

		<media:content url="http://eventlessdotnet.files.wordpress.com/2011/06/tagcloud.png" medium="image">
			<media:title type="html">Sharepoint 2010 Tag Cloud</media:title>
		</media:content>

		<media:content url="http://eventlessdotnet.files.wordpress.com/2011/06/default_output.jpg" medium="image">
			<media:title type="html">Managed Metadata WebPart default view</media:title>
		</media:content>
	</item>
		<item>
		<title>Fantasy &#8211; a Ruby library for scraping Fantasy Premier League</title>
		<link>http://eventless.net/2010/10/17/fantasy-premier-league-ruby-library/</link>
		<comments>http://eventless.net/2010/10/17/fantasy-premier-league-ruby-library/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 13:29:11 +0000</pubDate>
		<dc:creator>Even</dc:creator>
				<category><![CDATA[Random Scripts]]></category>

		<guid isPermaLink="false">http://eventlessdotnet.wordpress.com/?p=6</guid>
		<description><![CDATA[The Fantasy Premier League site has one (quite strange) limitation &#8211; the mini league tables aren&#8217;t updated live even though the actual team pages are. This makes it a chore to stay updated on how you&#8217;re doing compared to your &#8230; <a href="http://eventless.net/2010/10/17/fantasy-premier-league-ruby-library/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=6&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Fantasy <a class="zem_slink" title="Premier League" href="http://www.premierleague.com/" rel="homepage">Premier League</a> site has one (quite strange) limitation &#8211; the mini league tables aren&#8217;t updated live even though the actual team pages are. This makes it a chore to stay updated on how you&#8217;re doing compared to your mini league buddies. So I created a small <a class="zem_slink" title="Ruby (programming language)" href="http://www.ruby-lang.org/" rel="homepage">Ruby</a> library to scrape information from the Premier League website and then present it in whichever way is wanted.</p>
<p>The library is available at <a href="http://github.com/evenv/fantasy">http://github.com/evenv/fantasy</a>.</p>
<p>It&#8217;s released under the <a class="zem_slink" title="MIT License" href="http://en.wikipedia.org/wiki/MIT_License" rel="wikipedia">MIT license</a>, so feel free to use it for whatever you&#8217;d like.</p>
<p>I&#8217;ve included the <a class="zem_slink" title="Sinatra (software)" href="http://www.sinatrarb.com/" rel="homepage">Sinatra</a> app I created along with the library to show updated points for a list of teams. It&#8217;s not particularly advanced, but does the trick for me (and works pretty well on the <a class="zem_slink" title="iPhone" href="http://www.apple.com/iphone" rel="homepage">iPhone</a>).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eventlessdotnet.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eventlessdotnet.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eventlessdotnet.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eventlessdotnet.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eventlessdotnet.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eventlessdotnet.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eventlessdotnet.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eventlessdotnet.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eventlessdotnet.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eventlessdotnet.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eventlessdotnet.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eventlessdotnet.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eventlessdotnet.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eventlessdotnet.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=6&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eventless.net/2010/10/17/fantasy-premier-league-ruby-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3d5dbfe6775c6ce06fc3ef98ab9036d6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evenv</media:title>
		</media:content>
	</item>
		<item>
		<title>Automatically Unrar Everything In A Folder</title>
		<link>http://eventless.net/2009/05/29/auto-unrar/</link>
		<comments>http://eventless.net/2009/05/29/auto-unrar/#comments</comments>
		<pubDate>Fri, 29 May 2009 15:41:34 +0000</pubDate>
		<dc:creator>Even</dc:creator>
				<category><![CDATA[Random Scripts]]></category>

		<guid isPermaLink="false">http://eventlessdotnet.wordpress.com/?p=9</guid>
		<description><![CDATA[This script enters into all subfolders of the given folder, unrars all archives and then deletes the rar files. If the folder name matches HDTV or another filter of your choosing, the script will also move any video files to &#8230; <a href="http://eventless.net/2009/05/29/auto-unrar/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=9&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This script enters into all subfolders of the given folder, unrars all archives and then deletes the rar files. If the folder name matches HDTV or another filter of your choosing, the script will also move any video files to the root folder and delete the containing folder.</p>
<p>Designed to be run on a regular schedule, the script will skip any folders it has already processed. To run regularly, add to cron.</p>
<p>Here’s the script:</p>
<p><pre class="brush: ruby;">
def episode(dir)
  dir.match &quot;HDTV&quot;
end

def unrar_delete(thefile,allfiles)
  if system &quot;/opt/local/bin/unrar e -y %s &gt; /dev/null&quot; % thefile.gsub(' ',' ')
    for file in allfiles
      File.delete(file)
    end
    return true
  end
  return false
end

rootdir = &quot;/Volumes/Filmer/Incoming&quot;

Dir[&quot;%s/*&quot; % rootdir].each do |dir|
  if File.directory? dir and not dir.match &quot;UNPACKED&quot;
    ok = false
    Dir.chdir(dir)
    Dir['%s/*.rar' % dir].each do |rarfile|
      puts rarfile
      ok = unrar_delete(rarfile, Dir[rarfile.gsub(&quot;part01&quot;,&quot;part??&quot;)]) if rarfile.match &quot;part01.rar&quot;
      ok = unrar_delete(rarfile, Dir[rarfile.gsub(&quot;.rar&quot;,&quot;.r??&quot;)]) if not rarfile.match /part[0-9]{2}/
    end

    if ok
      if episode(dir)
        system &quot;mv *.avi %s&quot; % rootdir
        system &quot;mv *.mkv %s&quot; % rootdir
        Dir.chdir(rootdir)
        system &quot;rm -r %s&quot; % dir
      else
        File.rename(dir,&quot;%s UNPACKED&quot; % dir)
      end
    end
  end
end
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eventlessdotnet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eventlessdotnet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eventlessdotnet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eventlessdotnet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eventlessdotnet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eventlessdotnet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eventlessdotnet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eventlessdotnet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eventlessdotnet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eventlessdotnet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eventlessdotnet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eventlessdotnet.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eventlessdotnet.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eventlessdotnet.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=9&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eventless.net/2009/05/29/auto-unrar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3d5dbfe6775c6ce06fc3ef98ab9036d6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evenv</media:title>
		</media:content>
	</item>
		<item>
		<title>Export All OmniGraffle Files In A Folder To PDF</title>
		<link>http://eventless.net/2009/04/05/automatic-export-from-omnigraffle-to-pdf/</link>
		<comments>http://eventless.net/2009/04/05/automatic-export-from-omnigraffle-to-pdf/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 15:51:40 +0000</pubDate>
		<dc:creator>Even</dc:creator>
				<category><![CDATA[Random Scripts]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[OmniGraffle]]></category>

		<guid isPermaLink="false">http://eventlessdotnet.wordpress.com/?p=16</guid>
		<description><![CDATA[So I cooked up this small script that opens all OmniGraffle documents in a folder, and exports them to PDF files. The PDF files are named the same as the Graffle files, and will be saved in the same folder. &#8230; <a href="http://eventless.net/2009/04/05/automatic-export-from-omnigraffle-to-pdf/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=16&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I cooked up this small script that opens all OmniGraffle documents in a folder, and exports them to PDF files. The PDF files are named the same as the Graffle files, and will be saved in the same folder.</p>
<p>To use it, just load up Script Editor, paste, compile, and run. Of course, you could also save it to the AppleScripts folder so you can easily access it.</p>
<p><pre class="brush: plain;">
tell application &quot;Finder&quot;
  set the theFolder to choose folder with
    &quot;Pick a folder containing the OmniGraffle files you want to export to PDF:&quot;
  set theList to every file of the theFolder whose
  name extension is &quot;graffle&quot;
end tell

repeat with theFile in theList
  set theOutFile to ((do shell script &quot;basename \&quot;&quot; &amp; (theFile) &amp; &quot;\&quot;&quot; &amp; &quot; .graffle&quot;) &amp; &quot;.pdf&quot;)
  set theInFile to theFile as string
  tell application &quot;OmniGraffle Professional 5&quot;
    activate
    open file (theInFile)
    save front window in file theOutFile
    close front window
  end tell
end repeat
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eventlessdotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eventlessdotnet.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eventlessdotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eventlessdotnet.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eventlessdotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eventlessdotnet.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eventlessdotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eventlessdotnet.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eventlessdotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eventlessdotnet.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eventlessdotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eventlessdotnet.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eventlessdotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eventlessdotnet.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=16&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eventless.net/2009/04/05/automatic-export-from-omnigraffle-to-pdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3d5dbfe6775c6ce06fc3ef98ab9036d6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evenv</media:title>
		</media:content>
	</item>
		<item>
		<title>Vino v1.3 released</title>
		<link>http://eventless.net/2009/02/12/vino-v13-released/</link>
		<comments>http://eventless.net/2009/02/12/vino-v13-released/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 09:45:57 +0000</pubDate>
		<dc:creator>Even</dc:creator>
				<category><![CDATA[Vino]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[Sparkle]]></category>
		<category><![CDATA[Wine]]></category>

		<guid isPermaLink="false">http://eventless.net/?p=55</guid>
		<description><![CDATA[Because of the surprising amount of feedback (and 4000 downloads!) I’ve gotten on my wine organizer program Vino, I decided to spend some hours and fix some of the more glaring issues with the original version of the program. The &#8230; <a href="http://eventless.net/2009/02/12/vino-v13-released/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=55&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Because of the surprising amount of feedback (and 4000 downloads!) I’ve gotten on my wine organizer program Vino, I decided to spend some hours and fix some of the more glaring issues with the original version of the program. The updated version can be found <a title="Get Vino" href="/vino/">here</a>.</p>
<p>Here are some of the bigger changes in v1.3:</p>
<ul>
<li>Added fields for added date, quantity and drinking time suggestions.</li>
<li>Added library items for pink and bubbly wine.</li>
<li>Updated the UI to look a bit more like Cocoa programs should.</li>
<li>Wine Library is now a drawer attached to the main window.</li>
<li>Added support for custom wine libraries. More about this later on.</li>
<li>Added Sparkle support for automatic updates. Thanks to alex for the tip.</li>
<li>Added Norwegian localization. Thanks to Jørgen for input on this.</li>
<li>Replaced the monster of an icon from the first version with something a little easier on the eyes.</li>
<li>Many many tiny fixes hopefully allowing for a more intuitive user experience.</li>
<li>I’ve chosen not to release the source code for v1.3. The source for v1.2 is still available. The reasons for this is mainly that some of the code, such as the Sparkle framework support, contain encryption keys. The program is still freeware though, and I have no intentions of changing that fact.</li>
</ul>
<p>A big thank you to everyone who has contributed with comments, suggestions and linkbacks. Any feedback on this version is appreciated as well.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eventlessdotnet.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eventlessdotnet.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eventlessdotnet.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eventlessdotnet.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eventlessdotnet.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eventlessdotnet.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eventlessdotnet.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eventlessdotnet.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eventlessdotnet.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eventlessdotnet.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eventlessdotnet.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eventlessdotnet.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eventlessdotnet.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eventlessdotnet.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=55&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eventless.net/2009/02/12/vino-v13-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3d5dbfe6775c6ce06fc3ef98ab9036d6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evenv</media:title>
		</media:content>
	</item>
		<item>
		<title>Vinmonopolet Scraper Code</title>
		<link>http://eventless.net/2009/02/05/vinmonopolet-scraper-code/</link>
		<comments>http://eventless.net/2009/02/05/vinmonopolet-scraper-code/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 09:35:35 +0000</pubDate>
		<dc:creator>Even</dc:creator>
				<category><![CDATA[Vino]]></category>
		<category><![CDATA[Hpricot]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Wine]]></category>

		<guid isPermaLink="false">http://eventless.net/?p=53</guid>
		<description><![CDATA[Okay, so by request here’s the Ruby script I’ve used to scrape vinmonopolet.no for the wines found in Vino. Caveat: This is not publishing grade code, it is completely hacky and might not work for your setup. It will probably &#8230; <a href="http://eventless.net/2009/02/05/vinmonopolet-scraper-code/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=53&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Okay, so by request here’s the <a class="zem_slink" title="Ruby (programming language)" href="http://www.ruby-lang.org/" rel="homepage">Ruby</a> script I’ve used to scrape vinmonopolet.no for the wines found in Vino.</p>
<p><em>Caveat: This is <strong>not</strong> publishing grade code, it is completely hacky and might not work for your setup. It will probably break if vinmonopolet.no updates their page structure even slightly. You will need some coding knowledge to have any use for this. I post it here strictly for educational value, so please bear that in mind.</em></p>
<p><pre class="brush: ruby;">

require 'rubygems'
require 'hpricot'
require 'open-uri'
require 'sqlite3'
require 'iconv'

require 'HTMLEntities.rb'

class String
  def to_iso
    Iconv.conv('ISO-8859-1', 'utf-8', self)
  end
  def fixx
    self.gsub(&quot; &quot;,&quot; &quot;).decode_entities.strip
  end
  def camelcase
    self.downcase.capitalize.gsub(/ (.)/) { &quot; #{$1.upcase}&quot; }
  end
end

db = SQLite3::Database.new('vino.db')

wines = {}

base = &quot;http://www.vinmonopolet.no/is-bin/INTERSHOP.enfinity/WFS/store-vmp-Site/no_NO/-/NOK/&quot;
nexturl = ARGV[0]
while nexturl
  puts nexturl
  doc = Hpricot(open([base,nexturl].join))
  doc.search(&quot;#productList tr&quot;).each do |row|
    next if row.at(&quot;th&quot;)
    wine = {}
    wine[:polnumber] = row.at(&quot;td.id &gt; p&quot;).inner_html.match(/(([0-9]+))/)[1]
    wine[:volume] = row.at(&quot;td.price em&quot;).inner_html.fixx
    if db.get_first_value(&quot;SELECT 1 FROM vino WHERE polnumber = '%s' AND volume = '%s';&quot; % [wine[:polnumber],wine[:volume]])
      puts &quot;XX %s&quot; % wine[:polnumber]
      next
    else
      puts &quot;-- %s&quot; % wine[:polnumber]
    end
    wine[:link] = row.at(&quot;h3 a&quot;).attributes['href']
    wine[:title] = row.at(&quot;h3 a&quot;).inner_html.fixx
    wdoc = Hpricot(open(wine[:link]))
    wine[:price] = wdoc.at(&quot;td.price strong&quot;).inner_html.gsub(&quot;Kr. &quot;,&quot;&quot;).fixx
    wdoc.search(&quot;.productData li&quot;).each do |data|
      wine[:region] = data.at(&quot;span&quot;).inner_html.fixx if data.at(&quot;strong&quot;).inner_html.include? &quot;distrikt&quot;
      wine[:varietals] = data.at(&quot;span&quot;).inner_html.fixx if data.at(&quot;strong&quot;).inner_html.include? &quot;stoff&quot;
      wine[:winery] = data.at(&quot;span&quot;).inner_html.fixx if data.at(&quot;strong&quot;).inner_html.include? &quot;Produsent&quot;
      wine[:type] = data.at(&quot;span&quot;).inner_html.fixx if data.at(&quot;strong&quot;).inner_html.include? &quot;Varetype&quot;
    end
    wine[:vintage] = wine[:title].scan(/[0-9]{4}/).last
    db.execute(&quot;INSERT INTO vino VALUES (:title,:volume,:price,:region,:varietals,:winery,:polnumber,:type,:vintage,:link);&quot;,wine)
  end #wine
  lastlink = doc.at(&quot;table.pages tr &gt; td:last a:last&quot;)
  begin
    if lastlink.inner_html.include? &quot;Neste&quot;
      nexturl = lastlink.attributes['href']
    else
      nexturl = false
    end
  rescue
    next
  end
end
</pre></p>
<p>Usage: Save the file as vinoscan.rb along with HTMLEntities.rb, enter Terminal and go to the folder where it is saved, type</p>
<p><pre class="brush: bash;">
ruby vinoscan.rb &quot;v_PerformSearch-Prod?query=*&amp;nav=true&amp;filter25=Hvitvin&amp;sort=21&quot;
</pre></p>
<p>with <em>v_PerformSearch…</em> being the page you want the script to start scraping. (To find this go to vinmonopolet.no and look for matching urls.) The script will follow Next links until it can’t find any more, and save all the wines it comes across into a SQLite database.</p>
<p>It’s important to note that this database is not directly compatible with Vino – I have another script cleaning the data before I copy it into Vino but that script is such a mess I find it hard to believe anyone could have anything to gain from looking at it.</p>
<p>Many thanks to Paul Battley for the <a href="https://github.com/threedaymonk/htmlentities">HTML Entities</a> library, and even more so to <a href="http://en.wikipedia.org/wiki/Why_the_lucky_stiff">why the lucky stiff</a> for the magnificent <a title="hpricot" href="https://github.com/hpricot/hpricot/wiki">hpricot</a> web scraping library.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eventlessdotnet.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eventlessdotnet.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eventlessdotnet.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eventlessdotnet.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eventlessdotnet.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eventlessdotnet.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eventlessdotnet.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eventlessdotnet.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eventlessdotnet.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eventlessdotnet.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eventlessdotnet.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eventlessdotnet.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eventlessdotnet.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eventlessdotnet.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=53&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eventless.net/2009/02/05/vinmonopolet-scraper-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3d5dbfe6775c6ce06fc3ef98ab9036d6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evenv</media:title>
		</media:content>
	</item>
		<item>
		<title>Introducing Vino</title>
		<link>http://eventless.net/2009/01/30/introducing-vino/</link>
		<comments>http://eventless.net/2009/01/30/introducing-vino/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 09:32:46 +0000</pubDate>
		<dc:creator>Even</dc:creator>
				<category><![CDATA[Vino]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[Wine]]></category>

		<guid isPermaLink="false">http://eventless.net/?p=51</guid>
		<description><![CDATA[Vino is a small wine organizer program I created to manage wines I’ve tasted and what I thought about them. It’s pretty basic, but has some nice features such as: Adding wine labels with iSight integration Pre-populated database with 7000 &#8230; <a href="http://eventless.net/2009/01/30/introducing-vino/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=51&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Vino is a small wine organizer program I created to manage wines I’ve tasted and what I thought about them.</p>
<p>It’s pretty basic, but has some nice features such as:</p>
<ul>
<li>Adding wine labels with iSight integration</li>
<li>Pre-populated database with 7000 common wines</li>
<li>It’s freeware, so if you want it grab it. I can’t promise any further development though.</li>
</ul>
<p><a title="Get Vino" href="/vino/">Get Vino</a></p>
<p>All thoughts on the program are appreciated.</p>
<p><strong>By the way</strong>, if you find the program useful, it’d be great if you registered it at iusethis.com – a great Mac software site.</p>
<p>If anyone is interested, I’d be happy to post the source code both for the program and the tiny Ruby script scraping the wine webshop vinmonopolet.no for wine information.</p>
<p><strong>UPDATE:</strong> Source code and scraper code has now been posted.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eventlessdotnet.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eventlessdotnet.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eventlessdotnet.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eventlessdotnet.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/eventlessdotnet.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/eventlessdotnet.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/eventlessdotnet.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/eventlessdotnet.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eventlessdotnet.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eventlessdotnet.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eventlessdotnet.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eventlessdotnet.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eventlessdotnet.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eventlessdotnet.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eventless.net&amp;blog=24029017&amp;post=51&amp;subd=eventlessdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://eventless.net/2009/01/30/introducing-vino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3d5dbfe6775c6ce06fc3ef98ab9036d6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">evenv</media:title>
		</media:content>
	</item>
	</channel>
</rss>
