<?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>puntofissopuntoebasta. &#187; sage</title>
	<atom:link href="http://puntofisso.net/blog/tag/sage/feed/" rel="self" type="application/rss+xml" />
	<link>http://puntofisso.net/blog</link>
	<description>Il blog di Giuseppe Sollazzo. Un cognome, un perche'.</description>
	<lastBuildDate>Thu, 29 Dec 2011 15:32:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Sage to Google Reader OPML converter</title>
		<link>http://puntofisso.net/blog/2008/09/18/sage-to-google-reader-opml-converter/</link>
		<comments>http://puntofisso.net/blog/2008/09/18/sage-to-google-reader-opml-converter/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 17:43:15 +0000</pubDate>
		<dc:creator>puntofisso</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[google reader]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[sage]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://puntofisso.net/blog/?p=26</guid>
		<description><![CDATA[[WARNING: If you are not a nerd, please jump to the following post ] For some reason, when exporting rss feeds from Sage, a Firefox plugin, to an OPML file it does not save the feed (i.e. the xml/rss/atom/whatever) link, but the feeds themselves, i.e. the content of the feeds. If you have the same [...]]]></description>
			<content:encoded><![CDATA[<p>[WARNING: If you are not a nerd, please jump to the following post <img src='http://puntofisso.net/blog/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> ]</p>
<p>For some reason, when exporting rss feeds from Sage, a Firefox plugin, to an OPML file it does not save the feed (i.e. the xml/rss/atom/whatever) link, but the feeds themselves, i.e. the content of the feeds.</p>
<p>If you have the same problem, here&#8217;s a fast-and-dirty solution.</p>
<ol>
<li>export your Firefox bookmarks in HTML format, in a file called, say, bookmarks.html</li>
<li>using a bash shell, extract the feed lines into a file called feeds.xml doing
<pre><strong>cat bookmarks.html | grep FEEDURL &gt; feeds.xml</strong></pre>
</li>
<li>create the following script called &#8220;scriptfeed.sh&#8221;
<pre><strong>#!/bin/bash
echo "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;"
echo "&lt;opml version=\"1.0\"&gt;"
echo "&lt;head&gt;&lt;title&gt;RSS Subscriptions&lt;/title&gt;&lt;/head&gt;"
echo "&lt;body&gt;"
while read line
do
        temp=`echo $line | awk -F"&lt;" {'print $3;'}`
        feed=`echo $temp | awk -F"\"" {'print $2;'}`
        url=`echo $temp | awk -F"\"" {'print $4;'}`
        text=`echo $temp | awk -F"&gt;" {'print $2;'}`
        echo "&lt;outline text=\"$text\""
        echo "  title=\"$text\""
        echo "  type=\"rss\""
        echo "  xmlUrl=\"$feed\""
        echo "  htmlUrl=\"$url\"/&gt;"
done &lt; feeds.xml
echo "&lt;/body&gt;"
echo "&lt;/opml&gt;"</strong></pre>
</li>
<li>Give the script the right to execute
<pre><strong>chmod +x scriptfeed.sh</strong></pre>
</li>
<li>Launch the script on the output file, say, exp.xml
<pre><strong>./scriptfeed.sh &gt; exp.xml</strong></pre>
</li>
</ol>
<p>I know, it&#8217;s dirty and tricky, but it works <img src='http://puntofisso.net/blog/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://puntofisso.net/blog/2008/09/18/sage-to-google-reader-opml-converter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

