<?xml version="1.0" encoding="utf-8"?>
        <?xml-stylesheet type="text/css" href="http://www.orvtech.com/styles/feed.css"?>
<rss version="2.0"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:admin="http://webns.net/mvcb/"
 xmlns:atom="http://www.w3.org/2005/Atom"
>
<channel>
<title>Categorizado como: Twitter | Linux y el NSLU2</title>
<atom:link href="http://www.orvtech.com/archives/twitter/index-rss.xml" rel="self" type="application/rss+xml" />
<link>http://www.orvtech.com</link>
<description></description>
<dc:language>es-ve</dc:language>
<dc:creator>orvtech</dc:creator>
<dc:date>2010-09-02T18:22:06-04:00</dc:date>
<admin:generatorAgent rdf:resource="http://nanoblogger.sourceforge.net" />
<image><link>http://www.orvtech.com</link><url>http://www.orvtech.com/images/feedicon.png</url><title>Categorizado como: Twitter | Linux y el NSLU2</title></image>
<item>
<link>http://www.orvtech.com/archives/2010/06/22/instalando_turpial_en_fedora_13/index.html</link>
<guid isPermaLink="true">http://www.orvtech.com/archives/2010/06/22/instalando_turpial_en_fedora_13/index.html</guid>
<title>Instalando Turpial en Fedora 13</title>
<dc:date>2010-06-22T12:20:55-04:00</dc:date>
<dc:creator></dc:creator>
<dc:subject> Linux, Twitter</dc:subject>
<description><![CDATA[<p>Tengo ya un poco de tiempo escuchando sobre el cliente Turpial para Linux. El cliente fue&nbsp;desarrollado&nbsp;por venezolanos usando python y gtk. Hoy que la carga de trabajo bajo un poco y estoy esperando que me resuelvan unos tickets que escale a otro departamento me dispuse a instalarlo. Como ya saben uso Fedora Goddard en mi laptop de trabajo y afortunadamente&nbsp;<a href="http://richzendy.org">Richzendy</a> del fedoraproject.org ya&nbsp;hab&iacute;a&nbsp;creado un RPM asi que la&nbsp;instalaci&oacute;n&nbsp;super&nbsp;f&aacute;cil. Veamos los comandos para instalarlo:</p>

<pre>su -
wget http://forja.softwarelibre.gob.ve/frs/download.php/170/turpial-1.0-1.fc12.noarch.rpm
yum --nogpgcheck localinstall turpial-1.0-1.fc12.noarch.rpm
rm -f&nbsp;&nbsp;turpial-1.0-1.fc12.noarch.rpm</pre>

<p>En este caso me vi obligado a usar el <i title="deshabilita el chequeo gpg sobre este paquete">--nogpgcheck</i> para instalarlo, yo conozco al empaquetador y se quien es uno de los creadores de Turpial as&iacute; que no me preocupa c&oacute;digo malicioso.</p>

<p>Aqui adjunto unas capturas de pantalla de Turpial, para mas informaci&oacute;n de turpial pueden visitar la pagina del proyecto <a href="http://turpial.org.ve">turpial.org.ve</a>.</p>

<div style="text-align: center;">
<a href="http://www.orvtech.com/images/galleries/instalando_turpial/index.html" rel="bookmark"><img src="http://www.orvtech.com/images/galleries/instalando_turpial/thumbs/screenshot-turpial-1.gif" alt="Captura de pantall de cliente twitter Turpial por orvtech.com" height="95px" width="95px"/></a>

<a href="http://www.orvtech.com/images/galleries/instalando_turpial/index.html" rel="bookmark"><img src="http://www.orvtech.com/images/galleries/instalando_turpial/thumbs/screenshot-turpial-2.gif" alt="Captura de pantall de cliente twitter Turpial por orvtech.com" height="95px" width="95px"/></a>

<a href="http://www.orvtech.com/images/galleries/instalando_turpial/index.html" rel="bookmark"><img src="http://www.orvtech.com/images/galleries/instalando_turpial/thumbs/screenshot-turpial-3.gif" alt="Captura de pantall de cliente twitter Turpial por orvtech.com" height="95px" width="95px"/></a>

<a href="http://www.orvtech.com/images/galleries/instalando_turpial/index.html" rel="bookmark"><img src="http://www.orvtech.com/images/galleries/instalando_turpial/thumbs/screenshot-turpial-4.gif" alt="Captura de pantall de cliente twitter Turpial por orvtech.com" height="95px" width="95px"/></a>

<a href="http://www.orvtech.com/images/galleries/instalando_turpial/index.html" rel="bookmark"><img src="http://www.orvtech.com/images/galleries/instalando_turpial/thumbs/screenshot-turpial-5.gif" alt="Captura de pantall de cliente twitter Turpial por orvtech.com" height="95px" width="95px"/></a>

<a href="http://www.orvtech.com/images/galleries/instalando_turpial/index.html" rel="bookmark"><img src="http://www.orvtech.com/images/galleries/instalando_turpial/thumbs/screenshot-turpial-6.gif" alt="Captura de pantall de cliente twitter Turpial por orvtech.com" height="95px" width="95px"/></a>

<a href="http://www.orvtech.com/images/galleries/instalando_turpial/index.html" rel="bookmark"><img src="http://www.orvtech.com/images/galleries/instalando_turpial/thumbs/screenshot-turpial-6.gif" alt="Captura de pantall de cliente twitter Turpial por orvtech.com" height="95px" width="95px"/></a>
</div>

<br /><br />

<p>
<em><strong>Articulo vinculado:</strong>
<a href="archives/2009/11/30/el_nslu2_como_un_puente_de_last_fm_a_twitter/index.html">El NSLU2 como un puente de last.fm a twitter</a>.</em><br />

<em><strong>Galería vinculada:</strong> <a href="http://www.orvtech.com/images/galleries/instalando_turpial/">Probando Turpial, cliente para twitter</a>.</em>
</p>]]></description>

</item>
<item>
<link>http://www.orvtech.com/archives/2009/11/30/el_nslu2_como_un_puente_de_last_fm_a_twitter/index.html</link>
<guid isPermaLink="true">http://www.orvtech.com/archives/2009/11/30/el_nslu2_como_un_puente_de_last_fm_a_twitter/index.html</guid>
<title>El NSLU2 como un puente de last.fm a twitter.</title>
<dc:date>2009-11-30T16:57:10-04:00</dc:date>
<dc:creator>orvtech</dc:creator>
<dc:subject> Linux, Scripts, NSLU2, Twitter, last_fm, IRC</dc:subject>
<description><![CDATA[<p>Este script nació de la necesidad (ocio?) de actualizar mi estado en <a href="http://twitter.com/m1n1m3">twitter</a> con la canción que estaba escuchando en mi iPhone. El detalle esta en que solo actualizara mi perfil si la canción esta marcada como 'loved' en last.fm también detecta que día de la semana es y evalúa si es necesario agregar el hash tag <a href="http://twitter.com/#search?q=%23mm"><i>#mm</i></a>.</p>

<!-- <textarea class="bashcode" readonly>twitter_user="<your_twitter_user_here>" //-->
<pre lang="CC">
twitter_passwd=&#34;your_twitter_password_here&#34;&#39;
URL=&#34;http:&#47;&#47;twitter.com&#47;statuses&#47;update.xml&#34;&#39;
tags=&#34;#lastfm&#34;&#39;
lastfm_api=&#34;&lt;your_api_from_lastfm_here&gt;&#34;&#39;
lastfm_user=&#34;&lt;your_lastfm_user_here&gt;&#34;&#39;
bit_ly_user=&#34;&lt;your_bit.ly_user_here&gt;&#34;&#39;
bit_ly_apikey=&#34;&lt;your_bit.ly_api_key_here&gt;&#34;&#39;
&#39;
fmtwitted=`cat &#47;tmp&#47;lastfm2twitter.tmp | \&#39;
sed -e 's&#47;status=Just played: &#47;&#47;g' -e 's&#47;#.*&#47;&#47;g' | \&#39;
grep '&#91;a-z&#93;'|sed -e 's&#47;\ &#47;&#47;g' -e 's&#47;\-&#47;.&#47;g'`&#39;
&#39;
fmcurrent=`curl -s &#34;http:&#47;&#47;ws.audioscrobbler.com&#47;2.0&#47;?method=user.getrecenttracks&limit=1&user=$lastfm_user&api_key=$lastfm_api&#34; | \&#39;
grep -E '&lt;name&gt;|&lt;&#47;name&gt;|&lt;artist\ |&lt;&#47;artist&gt;' |\&#39;
head -n2| sed -e 's&#47;&lt;&#91;^&gt;&#93;*&gt;&#47;&#47;g' | tr '\n' '.' |\&#39;
sed -e 's&#47;\ &#47;&#47;g' -e 's&#47;.$&#47;&#47;g'`&#39;
&#39;
&#39;
lastfm_song_url=`curl -s &#34;http:&#47;&#47;ws.audioscrobbler.com&#47;2.0&#47;?method=user.getrecenttracks&limit=1&user=$lastfm_user&api_key=$lastfm_api&#34; |\&#39;
grep -E '&lt;url&gt;|&lt;&#47;url&gt;' | sed -e 's&#47;&lt;&#91;^&gt;&#93;*&gt;&#47;&#47;g' |\&#39;
head -n1| tr '\n' '.' | sed -e 's&#47;\ &#47;&#47;g' -e 's&#47;.$&#47;&#47;g'`&#39;
bit_ly_url=`curl -s &#34;http:&#47;&#47;api.bit.ly&#47;shorten?version=2.0.1&longUrl=$lastfm_song_url&login=$bit_ly_user&apiKey=$bit_ly_apikey&#34; | \&#39;
grep shortUrl | sed -e 's&#47;\&#34;&#47;\ &#47;g' | awk '{print $3}'`&#39;
&#39;
today_mm=`date +%A`&#39;
if &#91;&#91; $today_mm == &#34;Monday&#34;  &#93;&#93; &#39;
  then tags=&#34;$tags #mm&#34;&#39;
fi&#39;
&#39;
&#39;
if grep $fmcurrent &#47;tmp&#47;lastfm_loved.tmp  &gt; &#47;dev&#47;null&#39;
  then if &#91;&#91; &#34;$fmtwitted&#34; == &#34;$fmcurrent&#34; &#93;&#93;&#39;
      then exit 0&#39;
        else curl -s &#34;http:&#47;&#47;ws.audioscrobbler.com&#47;2.0&#47;?method=user.getrecenttracks&limit=1&user=$lastfm_user&api_key=$lastfm_api&#34; | \&#39;
	grep -E '&lt;name&gt;|&lt;&#47;name&gt;|&lt;artist\ |&lt;&#47;artist&gt;' |\&#39;
	head -n2| sed -e 's&#47;&lt;&#91;^&gt;&#93;*&gt;&#47;&#47;g' | tr '\n' '-' | \&#39;
	sed -e 's&#47;^&#91; \t&#93;*&#47;&#47;' -e 's&#47;-&#47;\ -\ &#47;g' -e 's&#47;- $&#47;&#47;g' -e 's&#47;\ $&#47;&#47;g' |\&#39;
	awk '{print &#34;status=Just played: &#34;$0}' &gt; &#47;tmp&#47;lastfm2twitter.tmp&#39;
	lastfm2twitter=`cat &#47;tmp&#47;lastfm2twitter.tmp; &#39;
	echo $bit_ly_url &#39;
	echo $tags | tr '\n' ' '`&#39;
	echo $lastfm2twitter &gt; &#47;tmp&#47;lastfm2twitter.tmp&#39;
	curl -s -u $twitter_user:$twitter_passwd -d @&#47;tmp&#47;lastfm2twitter.tmp $URL &gt; &#47;dev&#47;null&#39;
	  fi&#39;
	  else exit 0&#39;
fi&#39;
</pre>
<!-- </textarea> //-->
<br />
<p>Como se pueden dar cuenta estoy usando bit.ly para acortar las URLs de last.fm para lo cual tendrán que obtener una API Key. Aun tengo que optimizar el script guardando las peticiones de curl en un archivo y formar algo así como un cache o base de datos local de last.fm a bit.ly.
</p><p>
El script detecta si el mensaje sobrepasa el limite de 140 caracteres permitido por twitter y acorta el mensaje antes de enviarlo. 
</p> ]]></description>

</item>
</channel>
</rss>
