<?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>Claudio&#039;s Hideout &#187; english</title>
	<atom:link href="http://claudio.cicali.name/post/tag/english/feed/" rel="self" type="application/rss+xml" />
	<link>http://claudio.cicali.name</link>
	<description>Claudio Cicali web hub</description>
	<lastBuildDate>Sun, 25 Sep 2011 11:29:05 +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>How to export your friendfeed stream (posts and comments)</title>
		<link>http://claudio.cicali.name/post/2011/01/how-to-export-your-friendfeed-stream-posts-and-comments/</link>
		<comments>http://claudio.cicali.name/post/2011/01/how-to-export-your-friendfeed-stream-posts-and-comments/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 10:29:51 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Annunci]]></category>
		<category><![CDATA[Articoli]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[friendfeed]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://claudio.cicali.name/?p=976</guid>
		<description><![CDATA[I just wrote a script to easily download your FULL friendfeed stream. I mean: every post with comments, likes and even images and/or files. Enough for the good news: the bad news is that this a PHP command line script and you have to know how to run it. On a recent  OSX or Linux [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-980" href="http://claudio.cicali.name/post/2011/01/how-to-export-your-friendfeed-stream-posts-and-comments/ff-2/"><img class="alignleft size-full wp-image-980" title="ff" src="http://claudio.cicali.name/wp-content/uploads/2011/01/ff1.png" alt="" width="227" height="50" /></a></p>
<p>I just wrote a script to easily download your FULL <a href="http://friendfeed.com">friendfeed</a> stream. I mean: every post with comments, likes and even images and/or files. Enough for the good news: the bad news is that this a PHP command line script and you have to know how to run it. On a recent  OSX or Linux environment you should be ready to go. For Windows-ers it could be a little more difficult. Sorry.</p>
<p>Anyway, here is the features list:</p>
<ul>
<li>can fetch a private stream, giving your <a href="http://friendfeed.com/remotekey">remote key</a></li>
<li>locally downloads images and files (detects already downloaded things)</li>
<li>upon subsequent runs, it tries to get only the newly added posts</li>
<li>the output file is <a href="http://www.json.org/">JSON</a></li>
<li>it scales well!</li>
<li>it&#8217;s free software (MIT license)</li>
</ul>
<p>
Download the scripts <a href="https://github.com/claudioc/ffexp">from Github</a> (the link points to the project page, where you can read the README too. In this case you&#8217;re interested to the <a href="https://github.com/claudioc/ffexp/blob/master/ffexp.php">ffexp.php</a> script).
</p>
<p>You then may run it like:</p>
<pre>php ffexp.php somefilename.json</pre>
<p>As you may infer from the output file extension, the output is plain good JSON. This format is <strong>very</strong> handy for whatever thing you may need to do with the export file. But this is up to you (or your programmer friend).
</p>
<p>As an example of <em>JSON postprocessor</em> I also wrote <strong>a converter</strong> that given your export file will render a fully functional HTML file, looking just like a Friendfeed page. It also automatically embeds the necessary JavaScript, CSS and even icon images. <a href="https://github.com/claudioc/ffexp/blob/master/ffexp2html.php">Download the ffexp2html from Github</a>, open it, read the fine documentation and run it like:</p>
<pre>php ffexp2html.php somefilename.json &gt; somefilename.html</pre>
<p>Now you can open the somefile.html file with your browser (no internet connection needed). You may find a generated <a href="http://web20.it/stuff/caludio.html">output here</a>.</p>
<p>Limits? Yes there are:</p>
<ul>
<li>No download of your DMs (don&#8217;t know exactly why, maybe a limit of the API. But I don&#8217;t care)</li>
<li>You can download even entire rooms (just use the room name as the username), but it seems that there is a limit of how back you can go. Very high, but it exists.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://claudio.cicali.name/post/2011/01/how-to-export-your-friendfeed-stream-posts-and-comments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Convert Delicious bookmarks to CSV</title>
		<link>http://claudio.cicali.name/post/2010/12/convert-delicious-bookmarks-to-csv/</link>
		<comments>http://claudio.cicali.name/post/2010/12/convert-delicious-bookmarks-to-csv/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 15:54:46 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Annunci]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[delicious]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://claudio.cicali.name/?p=964</guid>
		<description><![CDATA[Following the news that the Delicious social bookmarking service will soon be dismissed by Yahoo!, people started wondering which other service could they use in its place and how to better export their delicious bookmarks. This post is not yet another list of sites, but I&#8217;d try to help to better manage the exodus and even gain [...]]]></description>
			<content:encoded><![CDATA[<p>Following the news that the <a href="http://delicious.com">Delicious</a> social bookmarking service will soon be dismissed by Yahoo!, people started wondering which other service could they use in its place and how to better export their delicious bookmarks. This post is not yet another list of sites, but I&#8217;d try to help to better manage the exodus and even gain something from this deliciousastrous.</p>
<p>I wrote a little script in PHP that converts your bookmarks file <a href="https://secure.delicious.com/settings/bookmarks/export">exported from Delicious</a> in some other formats. The script, if you&#8217;re in the mood, is even easily extensibile if you provide it another &#8220;driver&#8221; to convert in another format (you write it and then plug it into the script. Pretty straightforward).</p>
<p>The script is ready to be used if you need to <strong>convert the file in CSV</strong>.</p>
<p>Run it like this:</p>
<pre>php deliconv.php delicious_export.html &gt; delicious_export.csv</pre>
<p>Another idea on how to use the script would be to check every URL for its existance. It&#8217;s a pretty easy task if you know how to use the curl extension. I&#8217;ll leave it as an exercise for the reader :)</p>
<p>So, if know how to run PHP from the command line, <a href="http://lab.web20.it/uploads/deliconv.php.txt">grab the script here</a> (remove the .txt extension).</p>
<p>There is also a Delicious XML exporter, <a href="http://deliciousxml.com/">out there</a>.</p>
<p>Update: my friend <a href="http://www.nicoladagostino.net/">Nicola D&#8217;Agostino</a> has collected some other <a href="http://www.nicoladagostino.net/2010-fuga-da-delicious-come-copiare-i-dati.html">useful informations and tricks</a> on the matter.</p>
]]></content:encoded>
			<wfw:commentRss>http://claudio.cicali.name/post/2010/12/convert-delicious-bookmarks-to-csv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The new providers discovery for Zend_Tool 1.10</title>
		<link>http://claudio.cicali.name/post/2010/03/the-new-providers-discovery-for-zend-tool-1-10/</link>
		<comments>http://claudio.cicali.name/post/2010/03/the-new-providers-discovery-for-zend-tool-1-10/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 13:06:30 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Articoli]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://claudio.cicali.name/?p=732</guid>
		<description><![CDATA[With the recent release of the 1.10 version of the  Zend Framework, they made a subtle change on how Zend_Tool searches its providers. Before 1.10 the loader (aka the provider discover) was set to be the IncludePathLoader class; what that meens is that if you wrote a new provider, all that you needed to do to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://framework.zend.com/"><img class="alignleft size-full wp-image-735" title="zf-logo" src="http://claudio.cicali.name/wp-content/uploads/2010/03/zf-logo.jpg" alt="" width="150" height="84" /></a></p>
<p>With the recent release of the 1.10 version of the  Zend Framework, they made a subtle change on how <a href="http://framework.zend.com/manual/1.10/en/zend.tool.html">Zend_Tool</a> searches its providers. Before 1.10 the loader (aka the provider discover) was set to be the <strong>IncludePathLoader</strong> class; what that meens is that if you wrote a new provider, all that you needed to do to have Zend_Tool automatically find it was to edit your PHP&#8217;s include_path or add your provider&#8217;s directory to the ZEND_TOOL_INCLUDE_PATH_PREPEND environment variable.</p>
<p>Now that is history, because (<a href="http://n4.nabble.com/Several-issues-for-Zend-Tool-1-10-td1555536.html">source</a>):</p>
<blockquote><p>There were many issues for people when Zend_Tool used a scanning approach to finding providers. This caused many issues on all different platforms.  Now we&#8217;ve opted to go the specify your providers approach.</p></blockquote>
<p>(beware: the suggested solution in that post is wrong)</p>
<p>So if you ever write a new tool provider remember that there&#8217;s no more &#8220;auto discovery&#8221; by scanning the path. The loader now is the <strong>BasicLoader</strong> and you have to explicitely tell Zend_Tool where <strong>your</strong> providers are and how their classes are named. For this to happen, you can use the <strong>zf enable config.provider</strong> command or use the <strong>zf.ini</strong> file.</p>
<p>My solution is:</p>
<ul>
<li>create a <strong>zf.ini</strong> file for your project. This is slighlty different from what the documentation implies; it considers zf.ini to be an hidden file in your $HOME. But this is only a default you can change via the  ﻿ZF_CONFIG_FILE env variable</li>
<li>put something like <strong>basicloader.classes.0 = &#8220;Migrations_MigrationProvider&#8221;</strong> as the first line (that example is the actual class name of my migration tool provider)</li>
<li>assure that your class can be loaded, setting ZEND_TOOL_INCLUDE_PATH_PREPEND accordingly</li>
</ul>
<p>On the same topic you can also read <a href="http://framework.zend.com/issues/browse/ZF-8899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel">this issue</a>.</p>
<p>As a bonus track, below is a little bash script I use to run my migration tool.</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash

APPPATH=$(readlink -f ..)/app

export ZF_CONFIG_FILE=${APPPATH}/../zf.ini

if [ ! -f ${ZF_CONFIG_FILE} ]; then
  echo &quot;Non trovo zf.ini&quot;
  echo &quot;Forse non stai eseguendo questo programma dalla directory DB?&quot;
  exit -1
fi

if [[ &quot;${ZF_BIN_DIR}&quot; == &quot;&quot; ]]; then
  ZF_BIN_DIR=$(readlink -f ../vendor/Zend)/../../bin
  ZF_BIN_DIR=$(readlink -f ${ZF_BIN_DIR})
fi

if [ ! -f ${ZF_BIN_DIR}/zf.sh ]; then
  echo &quot;Non trovo zf.sh in &quot; ${ZF_BIN_DIR}
  echo &quot;Forse non stai eseguendo questo programma dalla directory DB?&quot;
  exit -1
fi

MIGCLASSDIR=$(readlink -f ../vendor/Renomo/library)

if [ ! -d ${MIGCLASSDIR} ]; then
  echo &quot;Impossibile trovare la directory della classe Migration&quot;
  exit -1
fi

MIGDIR=$(readlink -f migrations)

if [ ! -d ${MIGDIR} ]; then
  echo &quot;Impossibile trovare la directory delle migration&quot;
  exit -1
fi

export ZEND_TOOL_INCLUDE_PATH_PREPEND=${MIGCLASSDIR}

${ZF_BIN_DIR}/zf.sh run migration ${1}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://claudio.cicali.name/post/2010/03/the-new-providers-discovery-for-zend-tool-1-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN customized bash prompt (and Git!)</title>
		<link>http://claudio.cicali.name/post/2010/02/svn-customized-bash-prompt/</link>
		<comments>http://claudio.cicali.name/post/2010/02/svn-customized-bash-prompt/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 11:37:55 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Annunci]]></category>
		<category><![CDATA[Articoli]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://claudio.cicali.name/?p=650</guid>
		<description><![CDATA[I recently had to split an SVN repository of mine into a TRUNK and a TAGged branch. Nothing fancy: a tag to identify the REV1.x and the TRUNK to keep developing. From time to time I have to svn switch, jumping from the tagged branch to the trunk (testing, merging, usual staff&#8230;). And you know [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to split an SVN repository of mine into a TRUNK and a TAGged branch. Nothing fancy: a tag to identify the REV1.x and the TRUNK to keep developing.</p>
<p>From time to time I have to <strong>svn switch</strong>, jumping from the tagged branch to the trunk (testing, merging, usual staff&#8230;). And you know what? I&#8217;m keeping committing on the tagged branch! And that <strong>is bad</strong> (more on this with an appropriate future post. I promise).</p>
<p>How beautiful could be having a bash prompt that will costantly display the branch I&#8217;m in and the svn repository revision of the current directory?</p>
<p>So, here we are:</p>
<p>append this code to your ~/.bashrc, logout/login and enter a svn managed directory (beware: I&#8217;ve tested it only on my Ubuntu box&#8230; the key here is to use the PROMPT_COMMAND env variabile, passing it the function that does the &#8220;sniffing&#8221;. The PROMPT_COMMAND command will be executed every time, just before displaying the shell prompt).</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">
PROMPT_COMMAND=prompt_command

prompt_command() {

  if [[ -d &quot;.svn&quot; ]] ; then
    local info rev url ver
    info=$(LC_MESSAGES=C svn info 2&gt;/dev/null)
    rev=$(echo &quot;${info}&quot; | awk '/^Revision: [0-9]+/{print $2}')
    url=$(echo &quot;${info}&quot; | awk '/^URL: .*/{print $2}')

    echo ${url} | grep -q &quot;/trunk\b&quot;
    if [[ $? -eq 0 ]] ; then
      ver=trunk
    else
      echo ${url} | grep -q &quot;/tags\b&quot;
      if [[ $? -eq 0 ]] ; then
        ver=tag-$(echo ${url} | grep -o &quot;/tags.*&quot; | awk -F/ '{print $3}')
      fi
    fi

    echo -e &quot;\e[00;33m[svn:r${rev}@${ver}]\e[00m&quot;
  fi

}
</pre>
<p>The svn information will be displayed in yellow (is the 33 in the final echo line). Change it at your liking.</p>
<p>UPDATE: <a href="http://www.develer.com">Giovanni Bajo</a> gives the hints for the "-q" switch and the LC_MESSAGES trick to avoid locale inconsistences.</p>
<p>Giovanni has gone a step forward, giving us the code for a git enhanced prompt too.</p>
<p>Here it is:</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">
  local gitout
  gitout=$(git branch -v --abbrev --no-color 2&gt;/dev/null)
  if [[ $? -eq 0 ]]; then
    local full branch sha1
    full=$(echo &quot;${gitout}&quot; | grep '^*')
    branch=$(echo &quot;${full}&quot; | awk '/^* \w+ \w+/{print $2}')
    sha1=$(echo &quot;${full}&quot; | awk '/^* \w+ \w+/{print $3}')
    echo -e &quot;\e[00;33m[git:${sha1}@${branch}]\e[00m&quot;
  fi
</pre>
<p>Thanks to Uqbar on Freenode IRC for the awk hints!</p>
<p>example:</p>
<pre>claudioc@enebish:~/Sites$
claudioc@enebish:~/Sites$ cd scrive2/
[svn:r452@trunk]
claudioc@enebish:~/Sites/scrive2$ svn switch $myrepos/tags/R2.4
[svn:r431@tag-R2.4]
claudioc@enebish:~/Sites/scrive2$</pre>
]]></content:encoded>
			<wfw:commentRss>http://claudio.cicali.name/post/2010/02/svn-customized-bash-prompt/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

