<?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>random stuff about photography, geek things and the web in general &#187; tips</title>
	<atom:link href="http://www.bergspot.com/blog/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bergspot.com/blog</link>
	<description>Random stuff about photography, geek things and the web in general</description>
	<lastBuildDate>Fri, 11 May 2012 01:49:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Getting XML Tidy (xmllint) to work on TextWrangler 4.0</title>
		<link>http://www.bergspot.com/blog/2012/05/getting-xml-tidy-xmllint-to-work-on-textwrangler-4-0/</link>
		<comments>http://www.bergspot.com/blog/2012/05/getting-xml-tidy-xmllint-to-work-on-textwrangler-4-0/#comments</comments>
		<pubDate>Fri, 11 May 2012 01:46:01 +0000</pubDate>
		<dc:creator>bergonzzi</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[mac os]]></category>
		<category><![CDATA[textwrangler]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://bergspot.com/blog/?p=120</guid>
		<description><![CDATA[TextWrangler has recently released a major update &#8211; version 4.0. A lot has changed, check out the release notes here. One of the things that changed is the way it handles scripts and text filters. If you don&#8217;t want to read through the whole thing, here&#8217;s the main part: There are two fundamental types of [...]]]></description>
			<content:encoded><![CDATA[
<p>TextWrangler has recently released a major update &#8211; version 4.0. A lot has changed, <a title="TextWrangler 4.0 Release Notes" href="http://www.barebones.com/support/textwrangler/current_notes.html" target="_blank">check out the release notes here</a>.</p>
<p>One of the things that changed is the way it handles scripts and text filters. If you don&#8217;t want to read through the whole thing, here&#8217;s the main part:</p>
<p style="padding-left: 30px;"><em>There are two fundamental types of runnable file: &#8220;text filters&#8221;, which accept the selection range (or entire document, if no selection) as input, and which return text that replaces the selection range (or document); and &#8220;scripts&#8221;, which do neither. In unix-y terms, text filters accept the selection range on <code>STDIN</code>, and <code>STDOUT</code> replaces the selection range.</em></p>
<p>It just happens that I use XML Tidy a lot to format xml documents in a pretty way. To do that I had a nice little script (which is just a xmllint command really) for which I assigned a shortcut (alt+cmd+p). That made my workflow pretty fast. The problem is that this script stopped working as before so it took a while to find out why but <a href="http://groups.google.com/group/textwrangler/browse_thread/thread/15e3d87cd2a2e2bb/5de3d2d649deff4c" target="_blank">I found a thread in google groups about this issue</a> and someone from Barebones helped find the solution.</p>
<p>So in summary, here&#8217;s what you have to do to make XML Tidy work again in TextWrangler 4.0:</p>
<ul>
	<li>
<p>Paste this into a file</p></li>
</ul>
<pre style="padding-left: 60px;">#!/bin/sh
XMLLINT_INDENT=$'\t' xmllint --format --encode utf-8 -</pre><ul>
	<li>Save with the name tidy.sh under ~/Library/Application Support/TextWrangler/Text Filters/</li>
	<li>Open TextWrangler, write some unformatted xml, and try it out from Text menu &gt; Apply Text Filter</li>
	<li>To make it even easier, go to Preferences &gt; Menus and Shortcuts and set a shortcut like I did (alt+cmd+p)</li>
</ul>
<p>Hope that helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bergspot.com/blog/2012/05/getting-xml-tidy-xmllint-to-work-on-textwrangler-4-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build your own camera stabilizer</title>
		<link>http://www.bergspot.com/blog/2009/03/build-your-own-camera-stabilizer/</link>
		<comments>http://www.bergspot.com/blog/2009/03/build-your-own-camera-stabilizer/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 17:03:30 +0000</pubDate>
		<dc:creator>bergonzzi</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tripod]]></category>

		<guid isPermaLink="false">http://bergspot.com/blog/?p=38</guid>
		<description><![CDATA[This is quick one, and one of the best tips I&#8217;ve seen lately! If you&#8217;re like me and don&#8217;t have a decent tripod or you don&#8217;t like taking it everywhere you go, and also if your lenses have no image stabilization, this may come in handy. In a few minutes you can build your own [...]]]></description>
			<content:encoded><![CDATA[
<p>This is quick one, and one of the best tips I&#8217;ve seen lately!  If you&#8217;re like me and don&#8217;t have a decent tripod or you don&#8217;t like taking it everywhere you go, and also if your lenses have no image stabilization, this may come in handy. In a few minutes you can build your own flexible stabilizing device/flexible tripod, and best of all, you can carry it in your pocket!  If you don&#8217;t believe me just take a look at the video:</p>

<object width="480" height="385">
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="movie" value="http://www.youtube.com/v/Af3aJ2kviJ4&autoplay=0&loop=0&rel=0" />
<param name="wmode" value="transparent">
<embed src="http://www.youtube.com/v/Af3aJ2kviJ4&autoplay=0&loop=0&rel=0" type="application/x-shockwave-flash" wmode="transparent" allowfullscreen="true" allowscriptaccess="always" width="480" height="385">
</embed>
</object>


]]></content:encoded>
			<wfw:commentRss>http://www.bergspot.com/blog/2009/03/build-your-own-camera-stabilizer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

