<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Luís Henrique</title>
	
	<link>http://luishenrique.org/blog</link>
	<description>Blog sobre Linux, programação, WebStandards e música.</description>
	<lastBuildDate>Thu, 06 Oct 2011 17:38:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/luishenrique" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="luishenrique" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><image><url>http://www.feedburner.com/fb/images/pub/fb_pwrd.gif</url></image><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">luishenrique</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Meu ambiente de trabalho</title>
		<link>http://luishenrique.org/blog/posts/meu-ambiente-de-trabalho</link>
		<comments>http://luishenrique.org/blog/posts/meu-ambiente-de-trabalho#comments</comments>
		<pubDate>Sun, 02 Jan 2011 13:46:46 +0000</pubDate>
		<dc:creator>Luís Henrique</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Pessoal]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ArchLinux]]></category>
		<category><![CDATA[Desenvolvimento]]></category>
		<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Ferramentas]]></category>
		<category><![CDATA[Software Livre]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://luishenrique.org/blog/?p=461</guid>
		<description><![CDATA[Convidado pelo Jonnas Fonini, descrevo aqui meu ambiente de trabalho em alguns itens. Tenho basicamente 3 ambientes de trabalho: desktop, notebook e um PC na empresa que eu trabalho.
1. SO
Arch Linux no desktop, Xubuntu no notebook e Ubuntu no computador da empresa. Todos com XFCE.
Para programar, gosto do notebook porque o teclado é inglês, mas [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fonini.net/posts/54-meu-ambiente-de-trabalho-em-7-itens">Convidado pelo Jonnas Fonini</a>, descrevo aqui meu ambiente de trabalho em alguns itens. Tenho basicamente 3 ambientes de trabalho: desktop, <a href="http://sledge.boo-box.com/list/page/bm90ZWJvb2tfIyNfYm94XyMjX3RhZ2dpbmctdG9vbC13cF8jI18xNjM5OTg=-60" class="bbli">notebook<img src="http://boo-box.com/bbli" alt="[bb]" class="bbic" /></a> e um PC na empresa que eu trabalho.</p>
<p><strong>1. SO</strong></p>
<p><a href="http://www.archlinux.org">Arch Linux</a> no desktop, <a href="http://www.xubuntu.org">Xubuntu</a> no notebook e Ubuntu no <a href="http://sledge.boo-box.com/list/page/Y29tcHV0YWRvcl8jI19ib3hfIyNfdGFnZ2luZy10b29sLXdwXyMjXzE2Mzk5OA==-64" class="bbli">computador<img src="http://boo-box.com/bbli" alt="[bb]" class="bbic" /></a> da empresa. Todos com XFCE.</p>
<p>Para programar, gosto do notebook porque o teclado é inglês, mas é melhor no desktop devido à tela de 22 polegadas. Então intercalo um pouco entre os dois.</p>
<div class="centro"><a href="http://luishenrique.org/blog/wp-content/uploads/2011/01/shot-jan-2011.png"><img src="http://luishenrique.org/blog/wp-content/uploads/2011/01/shot-jan-2011-200x125.png" alt="" title="Meu ambiente de trabalho" width="200" height="125" class="aligncenter size-medium wp-image-464" /></a></div>
<p><strong>2. IDE</strong></p>
<p>Netbeans para projetos PHP e <a href="http://sledge.boo-box.com/list/page/SmF2YV8jI19ib3hfIyNfdGFnZ2luZy10b29sLXdwXyMjXzE2Mzk5OA==-56" class="bbli">Java<img src="http://boo-box.com/bbli" alt="[bb]" class="bbic" /></a> que tem participação de uma equipe. Para projetos pessoais, Python (usando Django quando é para web), ShellScript e PHP, uso o Gedit (com vários plugins, é claro) no desktop e o Geany no notebook. Na empresa, utilizo o Komodo.</p>
<p>Na minha opinião, utilizar IDE para programar em linguagens como <a href="http://sledge.boo-box.com/list/page/UHl0aG9uXyMjX2JveF8jI190YWdnaW5nLXRvb2wtd3BfIyNfMTYzOTk4-56" class="bbli">Python<img src="http://boo-box.com/bbli" alt="[bb]" class="bbic" /></a> e Ruby não é tão produtivo quanto utilizar um editor sem tantas funcionalidades mas que podem ser adaptados ao nosso jeito. Então utilizo também o VIM (gVim as vezes) com vários scripts (entre eles: sparkup, snipMate e NerdTree).</p>
<div class="centro"><a href="http://luishenrique.org/blog/wp-content/uploads/2011/01/gedit.png"><img src="http://luishenrique.org/blog/wp-content/uploads/2011/01/gedit.png" alt="" title="gedit" class="aligncenter size-full wp-image-468" width="50%" /></a> <a href="http://luishenrique.org/blog/wp-content/uploads/2011/01/gvim.png"><img src="http://luishenrique.org/blog/wp-content/uploads/2011/01/gvim.png" alt="" title="gVim" class="aligncenter size-full wp-image-469" width="50%" /></a></div>
<p><strong>3. Controle de Versão</strong></p>
<p>Git em projetos pessoais e SVN na empresa. Para o SVN, encontrei alguns scripts para o Nautilus (para o Gnome) que agilizam o processo. E, melhor ainda, tem o <a href="http://rabbitvcs.org/">RabbitVCS</a>, que foi inspirado no Tortoise SVN.</p>
<p><strong>4. Browser e Email</strong></p>
<p>Firefox em todos os ambientes. Gosto do Google Chrome também, mas sinto falta de alguns complementos e funcionalidades.</p>
<p>Uma conta no Gmail centraliza todos os emails mais “importantes”, como a de contato pessoal do meu domínio, da empresa e da LinuxMail.org. Tenho outra conta para listas de discussão, newsletters e alguns lixos eletrônicos (leia-se correntes de emails).</p>
<p><strong>5. Utilitários</strong></p>
<p>Para FTP gosto do FileZilla. Utilizo o GIMP para ajustes rápidos em imagens. Mas, na maior parte do tempo, utilizo a linha de comando para fazer tarefas repetitivas, como redimensionar ou renomear um lote de imagens.</p>
<p>Acho que nem preciso citar o terminal, né? <img src='http://luishenrique.org/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><strong>6. Organização Pessoal</strong></p>
<p>Criei uma pequena aplicação para centralizar minhas tarefas e a deixo como homepage nos browsers. Uma boa dica é usar uma homepage contendo links rápidos e campos de buscas (para o google e php.net, por exemplo) para melhorar a produtividade. Eu baseei <a href="http://k3ttc4r.deviantart.com/art/browser-startpage-105703135">nesta aqui no deviantart</a>.</p>
<p>Também tento utilizar o Remember The Milk sempre que posso, utilizando o messenger e o Twitter para avisar das tarefas. Gostei do software Osmo, que tem um aviso sonoro um tanto chato, que não me deixa esquecer das tarefas.</p>
<p>Outra ferramente que gostei também é o <a href="http://ginatrapani.github.com/todo.txt-cli/">Todo.txt</a>, um script para ser usado no terminal, mas sem data para conclusão da tarefa. Exemplo de uso:</p>
<p><code>$ todo.sh add "Fazer testes da aplicação X +dev"<br />
$ todo.sh list<br />
$ todo.sh rm 3</code></p>
<p><strong>7. Entretenimento</strong></p>
<p>Quanto a player de música, utilizo o Sonata, que é um GUI em GTK para o MPD (Music Player Daemon) ou o cliente modo texto (e bastante completo!) NCMPCPP (que está no screenshot lá em cima). Para playlists específicas, uso o Rhythmbox. Assisto a vídeos e filmes no Gnome MPlayer. Para gerenciar podcasts comecei a usar o gPodder e estou gostando bastante.</p>
<p>Gosto também de jogos antigos. Para isso uso o emulador Snes9x para games como Rock N’ Roll Racing, Mario Kart e Top Gear. <img src='http://luishenrique.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Também gosto de Sudoku e Go.</p>
<p><strong>8. Comunicação</strong></p>
<p>Não sei se parei no tempo, mas utilizo com frequência o IRC, principalmente em canais de Linux e <a href="http://sledge.boo-box.com/list/page/cHJvZ3JhbWElRTclRTNvXyMjX2JveF8jI190YWdnaW5nLXRvb2wtd3BfIyNfMTYzOTk4-68" class="bbli">programação<img src="http://boo-box.com/bbli" alt="[bb]" class="bbic" /></a>. <img src='http://luishenrique.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
Uso também Gtalk, MSN e Skype (<a href="http://luishenrique.org/sobre">veja os dados na página sobre</a>).</p>
<p>Pronto, esse é meu ambiente de trabalho. Agora convido para participar da brincadeira o <a href="http://twitter.com/leandrow">Leandro Alonso</a>.</p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "vim";
            bb_bid  = "163998";
            bb_lang = "pt-BR";
            bb_name = "custom";bb_limit = "8";bb_format = "bbb";
          </script>
          <script type="text/javascript" src="http://widgets.boo-box.com/javascripts/embed.js"></script>
          <!-- boo-widget end -->


Compartilhe:


	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fmeu-ambiente-de-trabalho&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://delicious.com/post?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fmeu-ambiente-de-trabalho&amp;title=Meu%20ambiente%20de%20trabalho&amp;notes=Convidado%20pelo%20Jonnas%20Fonini%2C%20descrevo%20aqui%20meu%20ambiente%20de%20trabalho%20em%20alguns%20itens.%20Tenho%20basicamente%203%20ambientes%20de%20trabalho%3A%20desktop%2C%20notebook%20e%20um%20PC%20na%20empresa%20que%20eu%20trabalho.%0D%0A%0D%0A1.%20SO%0D%0A%0D%0AArch%20Linux%20no%20desktop%2C%20Xubuntu%20no%20notebook%20e%20Ubuntu%20no%20?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fmeu-ambiente-de-trabalho&amp;t=Meu%20ambiente%20de%20trabalho?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fmeu-ambiente-de-trabalho&amp;title=Meu%20ambiente%20de%20trabalho&amp;annotation=Convidado%20pelo%20Jonnas%20Fonini%2C%20descrevo%20aqui%20meu%20ambiente%20de%20trabalho%20em%20alguns%20itens.%20Tenho%20basicamente%203%20ambientes%20de%20trabalho%3A%20desktop%2C%20notebook%20e%20um%20PC%20na%20empresa%20que%20eu%20trabalho.%0D%0A%0D%0A1.%20SO%0D%0A%0D%0AArch%20Linux%20no%20desktop%2C%20Xubuntu%20no%20notebook%20e%20Ubuntu%20no%20?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Meu%20ambiente%20de%20trabalho&amp;body=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fmeu-ambiente-de-trabalho" title="email"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fmeu-ambiente-de-trabalho&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Meu%20ambiente%20de%20trabalho%20-%20http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fmeu-ambiente-de-trabalho" title="Twitter"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="javascript:AddToFavorites();" title="Add to favorites"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/addtofavorites.png" title="Add to favorites" alt="Add to favorites" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://luishenrique.org/blog/feed?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fmeu-ambiente-de-trabalho" title="Identi.ca"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://luishenrique.org/blog/posts/meu-ambiente-de-trabalho/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Highlighter de Expressão Regular</title>
		<link>http://luishenrique.org/blog/posts/expressao-regular-highlight</link>
		<comments>http://luishenrique.org/blog/posts/expressao-regular-highlight#comments</comments>
		<pubDate>Mon, 26 Jul 2010 19:00:21 +0000</pubDate>
		<dc:creator>Luís Henrique</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Expressão Regular]]></category>
		<category><![CDATA[Ferramentas]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Regex]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://luishenrique.org/blog/?p=398</guid>
		<description><![CDATA[Usando JavaScript e ShellScript para facilitar a leitura de Expressões Regulares (regex), através do destaque de metacaracteres.]]></description>
			<content:encoded><![CDATA[<p>Uma expressão regular bem trabalhada e com muitos caracteres geralmente é de difícil leitura e pode parecer um bicho de sete cabeças. A dificuldade está em identificar onde fecham alguns metacaracteres, como um grupo (os parênteses), as chaves e colchetes.</p>
<p>Para solucionar esse problema, existem scripts para fazer <em>highlight</em> (destacar) os metacaracteres e facilitar a leitura da regex.</p>
<p><a href="http://twitter.com/slevithan">Steven Levithan</a>, criador do <a href="http://www.regexpal.com">RegexPal</a>, extraiu a engine de highlight do RegexPal e deixou ela disponível, chamando-a de <a href="http://stevenlevithan.com/regex/syntaxhighlighter/">Javascript Regex Syntax Highlighter</a>, para ser usada em qualquer página HTML.</p>
<p><strong>Exemplos</strong></p>
<pre class="regex">\b[0-9]{4}(-[0-9]{2})?\b</pre>
<pre class="regex">^[A-Za-z0-9\._+-]+[@]{1}[A-Za-z0-9\.|-|_]*[.]{1}[a-z]{2,5}$</pre>
<p><strong>Os erros da <a href="http://sledge.boo-box.com/list/page/ZXhwcmVzcyVFM28rcmVndWxhcl8jI19ib3hfIyNfdGFnZ2luZy10b29sLXdwXyMjXzE2Mzk5OA==-76" class="bbli">expressão regular<img src="http://boo-box.com/bbli" alt="[bb]" class="bbic" /></a> são estilizados na cor vermelha.</strong> Confira abaixo (parênteses e colchetes sem fechamento):</p>
<pre class="regex">([0-9]{4}\/[a-z</pre>
<h2>Instalação</h2>
<p>1. Fazer o download do javascript e do CSS, na página <a href="http://stevenlevithan.com/regex/syntaxhighlighter/">http://stevenlevithan.com/regex/syntaxhighlighter/</a>.</p>
<p>2. Chamar os 2 arquivos entre as tags <head> e </head> da página que você vai usar o Javascript Regex Syntax Highlighter:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.seusite.com/js/jsresyntaxhighlighter-min.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.seusite.com/css/jsresyntaxhighlighter.css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>3. Acrescentar o script que dispara a função do javascript que faz highlight nas regex. Pode fazer como sugerido pelo autor do script, salvando o seguinte código em um arquivo .js, como <em>regex-highlighter.js</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> regexEls <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByClassName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;regex&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    len <span style="color: #339933;">=</span> regexEls.<span style="color: #660066;">length</span><span style="color: #339933;">,</span>
    el<span style="color: #339933;">,</span> text<span style="color: #339933;">,</span> i<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> len<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    el <span style="color: #339933;">=</span> regexEls<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    text <span style="color: #339933;">=</span> el.<span style="color: #660066;">textContent</span> <span style="color: #339933;">||</span> el.<span style="color: #660066;">innerText</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// this is where the magic happens</span>
    el.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> highlightJsReSyntax<span style="color: #009900;">&#40;</span>text<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>e importá-lo, no final da página:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.seusite.com/js/regex-highlighter.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>4. Usar <em>&lt;pre style=&quot;regex&quot;&gt;sua regex aqui&lt;/pre&gt;</em> onde quiser fazer o destaque da expressão.</p>
<h2>Outra solução: ShellScript</h2>
<p>Fiz um script utilizando as ferramentas <em>grep</em> e <em>sed</em>, geralmente nativas do bash linux. O código está disponível no <a href="http://github.com/luish/re-tester">meu GitHub</a>.</p>
<p><strong>Exemplo</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ er-tester <span style="color: #ff0000;">'abc42 casa'</span> <span style="color: #ff0000;">'\b[a-z]{3}([0-9]{2})\b'</span></pre></div></div>

<div class="centro"><img src="http://luishenrique.org/blog/wp-content/uploads/2010/07/er-tester-demo.png" alt="er-tester-demo" title="er-tester-demo" width="438" height="195" class="aligncenter size-full wp-image-442" /></div>
<p>Espero ter ajudado! <a href="#respond">Comente</a>!</p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "JavaScript, Regex";
            bb_bid  = "163998";
            bb_lang = "pt-BR";
            bb_name = "custom";bb_limit = "8";bb_format = "bbb";
          </script>
          <script type="text/javascript" src="http://widgets.boo-box.com/javascripts/embed.js"></script>
          <!-- boo-widget end -->


Compartilhe:


	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fexpressao-regular-highlight&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://delicious.com/post?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fexpressao-regular-highlight&amp;title=Highlighter%20de%20Express%C3%A3o%20Regular&amp;notes=Usando%20JavaScript%20e%20ShellScript%20para%20facilitar%20a%20leitura%20de%20Express%C3%B5es%20Regulares%20%28regex%29%2C%20atrav%C3%A9s%20do%20destaque%20de%20metacaracteres.?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fexpressao-regular-highlight&amp;t=Highlighter%20de%20Express%C3%A3o%20Regular?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fexpressao-regular-highlight&amp;title=Highlighter%20de%20Express%C3%A3o%20Regular&amp;annotation=Usando%20JavaScript%20e%20ShellScript%20para%20facilitar%20a%20leitura%20de%20Express%C3%B5es%20Regulares%20%28regex%29%2C%20atrav%C3%A9s%20do%20destaque%20de%20metacaracteres.?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Highlighter%20de%20Express%C3%A3o%20Regular&amp;body=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fexpressao-regular-highlight" title="email"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fexpressao-regular-highlight&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Highlighter%20de%20Express%C3%A3o%20Regular%20-%20http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fexpressao-regular-highlight" title="Twitter"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="javascript:AddToFavorites();" title="Add to favorites"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/addtofavorites.png" title="Add to favorites" alt="Add to favorites" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://luishenrique.org/blog/feed?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fexpressao-regular-highlight" title="Identi.ca"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://luishenrique.org/blog/posts/expressao-regular-highlight/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Documente seu código PHP usando o PHPDoc</title>
		<link>http://luishenrique.org/blog/posts/php-doc-instalacao-e-uso</link>
		<comments>http://luishenrique.org/blog/posts/php-doc-instalacao-e-uso#comments</comments>
		<pubDate>Thu, 03 Jun 2010 04:12:33 +0000</pubDate>
		<dc:creator>Luís Henrique</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Documentação]]></category>
		<category><![CDATA[instalação]]></category>
		<category><![CDATA[php-doc]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://luishenrique.org/blog/?p=406</guid>
		<description><![CDATA[O phpDocumentator é uma ferramenta para geração de documentação de código feito na linguagem de programação PHP. Ele pode exportar para HTML e PDF, suporta templates, é rápido e pode ser usado tanto em interface web quanto em linha de comando.]]></description>
			<content:encoded><![CDATA[<p>O <a href="http://phpdoc.org/">phpDocumentator</a> é uma ferramenta para geração de documentação de código feito na linguagem de programação PHP.</p>
<p>Um pouco sobre o phpDoc:</p>
<ul>
<li>Pode ser usado tanto via linha de comando quanto via interface web.</li>
<li>Pode exportar para HTML, XML, PDF e para CHM (helpfile do Windows).</li>
<li>Bastante customizável (usa templates). A interface web tem um preview de cada tema.</li>
<li><em>Linka</em> classes e faz herança entre elas.</li>
<li>Documentação de arquivos README/CHANGELOG/INSTALL/FAQ</li>
</ul>
<p><a href="http://phpdoc.org/features.php">Veja mais features na página oficial.</a></p>
<h2 id="download">Download</h2>
<p>Versão <a href="http://sourceforge.net/projects/phpdocu/files/PhpDoc/phpDocumentor-1.4.3/PhpDocumentor-1.4.3.zip/download">1.4.3 .zip</a> | <a href="http://sourceforge.net/projects/phpdocu/files/PhpDoc/phpDocumentor-1.4.3/PhpDocumentor-1.4.3.tgz/download">1.4.3 .tgz</a> (<a href="http://phpdoc.org/downloads.php">verifique se há alguma versão mais recente</a>)</p>
<h2>Instalação (Linux e Windows)</h2>
<ul>
<li>Esteja certo que você tem o PHP rodando corretamente na sua máquina. Para a interface web, você precisa de um servidor. Para Windows, indico o tutorial do Pedro Rogério chamado <a href="http://www.pinceladasdaweb.com.br/blog/2010/02/22/instalar-apache-php-mysql-no-windows-7-vista-xp/">Instalar Apache+PHP+MySQL no Windows 7/Vista/XP</a> e para Linux <a href="http://www.google.com.br/search?q=linux+apache+php">existem vários artigos por aí</a>.</li>
<li>Extraia o arquivo .zip ou .tgz <a href="#download">que você baixou</a>.</li>
<li>No Linux: sugiro colocar a pasta do <em>phpdoc</em> em /opt (faça isso como super usuário) e adicioná na variável $PATH do sistema: <strong>$ echo &#8216;PATH=$PATH:/opt/php-doc&#8217; >> ~/.bashrc &#038;&#038; source ~/.bashrc</strong></li>
<li>No Windows: coloque o caminho da pasta extraída no PATH do sistema (configurações avançadas) para que possa executá-lo apenas com o comando <em>phpdoc</em> (referente ao arquivo phpdoc.bat).</li>
<li>Para rodar a interface web, coloque a pasta que foi extraída dentro do seu diretório de documentos do apache (ex: c:/apache/htdocs/php-doc ou /var/www/php-doc) e abra a página no seu navegador com http://localhost/php-doc, por exemplo.</li>
</ul>
<h2>Documentando um arquivo PHP</h2>
<p>Use a opção -f:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ phpdoc <span style="color: #660033;">-o</span> HTML:frames:earthli <span style="color: #660033;">-f</span> exemplo1.php <span style="color: #660033;">-t</span> documentacao<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<h2>Documentando uma pasta</h2>
<p>Use a opção -d:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ phpdoc <span style="color: #660033;">-o</span> HTML:frames:earthli <span style="color: #660033;">-d</span> includes<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-t</span> documentacao<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<h2>Templates</h2>
<p>É a opção -o que determina o template a ser criado a documentação. Experimente usar vários argumentos separados por vírgula:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ phpdoc <span style="color: #660033;">-o</span> HTML:Smarty:PHP,HTML:frames:phpedit,HTML:Smarty:default,HTML:frames:phphtmllib <span style="color: #660033;">-d</span> includes<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-t</span> documentacao<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<h2>Outras opções</h2>
<p>
<strong>-ti &#8216;Qcodo Documentation&#8217;</strong> = indica o título da documentação.<br />
<strong>-dc &#8216;Framework&#8217;</strong> = indica a categoria padrão (default category).<br />
<strong>-ric</strong> = documenta arquivos README, INSTALL e CHANGELOG.<br />
<strong>-s</strong> = gera código com highlight de todas páginas PHP.
</p>
<p>Digite <strong>phpdoc -h</strong> para exibir todas as outras opções.</p>
<h2>Exemplos de documentação</h2>
<div class="centro"><a href="http://luishenrique.org/blog/wp-content/uploads/2010/06/phpdoc-1.png"><img src="http://luishenrique.org/blog/wp-content/uploads/2010/06/phpdoc-1.png" alt="phpdoc" title="phpDocumentator" class="aligncenter size-full wp-image-413 center" /></a></p>
<p><a href="http://luishenrique.org/blog/wp-content/uploads/2010/06/phpdoc-2.png"><img src="http://luishenrique.org/blog/wp-content/uploads/2010/06/phpdoc-2.png" alt="phpdoc" title="phpDocumentator" class="aligncenter size-full wp-image-414 center" /></a></p>
<p><a href="http://luishenrique.org/blog/wp-content/uploads/2010/06/phpdoc-webinterface.png"><img src="http://luishenrique.org/blog/wp-content/uploads/2010/06/phpdoc-webinterface.png" alt="phpDoc Interface web" title="phpDoc Interface web" width="750" height="331" class="aligncenter size-full wp-image-424" /></a></div>
<p>Qualquer dúvida, crítica ou sugestão é bem-vinda! Até a próxima.</p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "PHP, Documentação";
            bb_bid  = "163998";
            bb_lang = "pt-BR";
            bb_name = "custom";bb_limit = "8";bb_format = "bbb";
          </script>
          <script type="text/javascript" src="http://widgets.boo-box.com/javascripts/embed.js"></script>
          <!-- boo-widget end -->


Compartilhe:


	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fphp-doc-instalacao-e-uso&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://delicious.com/post?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fphp-doc-instalacao-e-uso&amp;title=Documente%20seu%20c%C3%B3digo%20PHP%20usando%20o%20PHPDoc&amp;notes=O%20phpDocumentator%20%C3%A9%20uma%20ferramenta%20para%20gera%C3%A7%C3%A3o%20de%20documenta%C3%A7%C3%A3o%20de%20c%C3%B3digo%20feito%20na%20linguagem%20de%20programa%C3%A7%C3%A3o%20PHP.%20Ele%20pode%20exportar%20para%20HTML%20e%20PDF%2C%20suporta%20templates%2C%20%C3%A9%20r%C3%A1pido%20e%20pode%20ser%20usado%20tanto%20em%20interface%20web%20quanto%20em%20linha%20de%20comando.?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fphp-doc-instalacao-e-uso&amp;t=Documente%20seu%20c%C3%B3digo%20PHP%20usando%20o%20PHPDoc?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fphp-doc-instalacao-e-uso&amp;title=Documente%20seu%20c%C3%B3digo%20PHP%20usando%20o%20PHPDoc&amp;annotation=O%20phpDocumentator%20%C3%A9%20uma%20ferramenta%20para%20gera%C3%A7%C3%A3o%20de%20documenta%C3%A7%C3%A3o%20de%20c%C3%B3digo%20feito%20na%20linguagem%20de%20programa%C3%A7%C3%A3o%20PHP.%20Ele%20pode%20exportar%20para%20HTML%20e%20PDF%2C%20suporta%20templates%2C%20%C3%A9%20r%C3%A1pido%20e%20pode%20ser%20usado%20tanto%20em%20interface%20web%20quanto%20em%20linha%20de%20comando.?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Documente%20seu%20c%C3%B3digo%20PHP%20usando%20o%20PHPDoc&amp;body=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fphp-doc-instalacao-e-uso" title="email"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fphp-doc-instalacao-e-uso&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Documente%20seu%20c%C3%B3digo%20PHP%20usando%20o%20PHPDoc%20-%20http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fphp-doc-instalacao-e-uso" title="Twitter"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="javascript:AddToFavorites();" title="Add to favorites"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/addtofavorites.png" title="Add to favorites" alt="Add to favorites" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://luishenrique.org/blog/feed?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fphp-doc-instalacao-e-uso" title="Identi.ca"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://luishenrique.org/blog/posts/php-doc-instalacao-e-uso/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS pra quem nunca viu</title>
		<link>http://luishenrique.org/blog/posts/css-pra-quem-nunca-viu</link>
		<comments>http://luishenrique.org/blog/posts/css-pra-quem-nunca-viu#comments</comments>
		<pubDate>Thu, 18 Mar 2010 21:05:09 +0000</pubDate>
		<dc:creator>Luís Henrique</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[WebStandards]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Desenvolvimento]]></category>
		<category><![CDATA[Padrões web]]></category>

		<guid isPermaLink="false">http://luishenrique.org/blog/?p=202</guid>
		<description><![CDATA[Claro que existem pessoas que estudam (ou trabalham com) computação e não conhecem CSS. Talvez o foco é outro (bem) distante de web ou há algum motivo para continuar a estilização via HTML. Vou tentar ser o mais direto possível, pois meu objetivo aqui é mostrar o básico através de exemplos.
Neste tutorial vamos construir uma [...]]]></description>
			<content:encoded><![CDATA[<p>Claro que existem pessoas que estudam (ou trabalham com) computação e não conhecem <a class="bbli" href="http://sledge.boo-box.com/list/page/Q1NTXyMjX2JveF8jI19ib28tYm94ZnktYXV0b18jI18=-44">CSS<img class="bbic" src="http://boo-box.com/bbli" alt="[bb]" /></a>. Talvez o foco é outro (bem) distante de web ou há algum motivo para continuar a estilização via HTML. Vou tentar ser o mais direto possível, pois meu objetivo aqui é mostrar o básico através de exemplos.</p>
<p>Neste tutorial vamos construir uma área de artigos na qual cada uma da lista contém um título, uma imagem e o texto. O <a href="http://labs.luishenrique.org/css/css-basico/">exemplo final</a> será parecido com isso:</p>
<h3>Exemplo final</h3>
<div class="centro"><a href="http://luishenrique.org/blog/wp-content/uploads/2010/02/css-basico-preview.png"><img src="http://luishenrique.org/blog/wp-content/uploads/2010/02/css-basico-preview.png" alt="" title="Preview" class="aligncenter wp-image-357" style="width: 400px" /></a>
<p><em>Clique para ampliar</em></p>
</div>
<p>Obs.: O texto foi gerado com o famoso <a href="http://pt.lipsum.com/">Lorem Lipsum</a>.</p>
<h3>Definição</h3>
<p><strong>CSS &#8211; Cascading Style Sheet</strong> (folhas de estilo) &#8211; é uma linguagem para atribuir forma visual &#8211; estilo, formas, cores e tamanhos &#8211; a elementos usados na linguagem de marcação (<a href="http://sledge.boo-box.com/list/page/SFRNTF8jI19ib3hfIyNfdGFnZ2luZy10b29sLXdwXyMjXw==-48" class="bbli">HTML<img src="http://boo-box.com/bbli" alt="[bb]" class="bbic" /></a>, XHTML e <a href="http://sledge.boo-box.com/list/page/WE1MXyMjX2JveF8jI190YWdnaW5nLXRvb2wtd3BfIyNf-44" class="bbli">XML<img src="http://boo-box.com/bbli" alt="[bb]" class="bbic" /></a> são exemplos).</p>
<h3>Sintaxe básica</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">seletor <span style="color: #00AA00;">&#123;</span>
	propriedade<span style="color: #00AA00;">:</span> valor<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<div class="notice">
O &#8221; <strong>;</strong> &#8221; (ponto-vírgula) é <strong>opcional</strong> na última propriedade.
</div>
<h3>CSS em ação</h3>
<p>Veja como atua o CSS aplicado ao HTML na página descrita abaixo.</p>
<ul>
<li><a href="http://labs.luishenrique.org/css/css-basico/" title="Exemplo com CSS aplicado">Exemplo com CSS</a></li>
<li><a href="http://labs.luishenrique.org/css/css-basico/?css=false" title="Exemplo sem CSS aplicado">Exemplo <span style="color: red">sem</span> CSS</a></li>
</ul>
<h3>Primeiro o HTML</h3>
<p>O HTML é da seguinte estrutura:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>  <span style="color: #000066;">dir</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ltr&quot;</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;pt-BR&quot;</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Título da minha lista de artigos<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;geral&quot;</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;topo&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Ir para a página inicial&quot;</span>&gt;</span>Minha página<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>Uma descrição do site.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;conteudo&quot;</span>&gt;</span>
&nbsp;
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;noticia&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h3</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;chamada&quot;</span>&gt;</span>Título do primeiro artigo<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h3</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;img1.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;img1&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Primeira imagem&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Texto da notícia aqui.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Continuar lendo esta notícia&quot;</span>&gt;</span>Leia na íntegra<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;noticia&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h3</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;chamada&quot;</span>&gt;</span>Título do segundo artigo<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h3</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;img2.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;img2&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Segunda imagem&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Texto da outra notícia.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Continuar lendo esta notícia&quot;</span>&gt;</span>Leia na íntegra<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;rodape&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Todos os direitos reservados.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p>No HTML, usa-se os atributos <strong style="color: rgb(204, 0, 204);">ID</strong> e <strong style="color: rgb(102, 102, 255);">CLASS</strong>. Observe isso em <em>div id</em> e em <em>h3 class</em>.</p>
<h3>Explicação do HTML</h3>
<p>Dentro do <strong>head</strong> chamamos o arquivo <em>estilo.css</em>, que contém toda a estilização. Essa forma de aplicar o CSS é denominada &#8220;<a href="#css-externo">externa</a>&#8220;, que pode ser lido no próximo item deste post.</p>
<p>A div #geral foi criada para englobar toda a página e definir uma largura geral.<br />
A div #topo somente para conter o título da página.<br />
A div #conteudo é onde ficam os artigos. Cada artigo é colocado dentro de uma div .noticia (com a CLASS noticia).<br />
Dentro de cada div .noticia temos: o título do artigo dentro de um H3, o subtítulo em um H4, uma imagem e o texto em parágrafos. No final de cada artigo há um link permanente para a leitura completa.<br />
Depois há uma div #rodape para conter informações de copyright e etc.</p>
<h3>Maneiras de aplicar CSS ao HTML</h3>
<p>1) <strong id="css-externo">Externo</strong>: todo o CSS fica em um arquivo (com extensão .css) separado do HTML. É chamado entre as tags <em>head</em> da seguinte maneira:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span>”stylesheet” <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span>”<span style="color: #000066;">text</span><span style="color: #66cc66;">/</span>css” <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span>”estilo.css” <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span></pre></td></tr></table></div>

<p>2) <strong>Interno</strong>: tag <strong>style</strong> dentro do <strong>head</strong>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span>”<span style="color: #000066;">text</span><span style="color: #66cc66;">/</span>css”&gt;</span>
		Seletor { propriedade: atributo }
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span></pre></td></tr></table></div>

<p>3) <strong>Inline</strong>: aplica a(s) propriedade(s) somente a um determinado elemento, usando o atributo <em>style</em> do HTML.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span>”<span style="color: #000066;">color</span>:blue”&gt;</span>Parágrafo com fonte azul.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Esse outro parágrafo não é azul, a não ser que exista <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;color: #FF0&quot;</span>&gt;</span>CSS em outro lugar<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span>.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span></pre></td></tr></table></div>

<h3>Diferença entre ID e CLASS</h3>
<p>É tão trivial que muita gente erra nisso.</p>
<p><strong style="color: rgb(204, 0, 204);">ID # (tralha)</strong> = deve ser único, usado em <strong>apenas um elemento</strong><br />
<strong style="color: rgb(102, 102, 255);">CLASS . (ponto)</strong> = número ilimitado de elementos</p>
<p>Por exemplo:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">white</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#conteudo</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.chamada</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FF6600</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>O que fizemos:</p>
<p>1) O primeiro seletor (<strong>body</strong>) vai definir o fundo branco para toda a página. Como ele não tem atributo no HTML, o CSS referencia apenas com o nome da tag.<br />
2) <strong style="color: rgb(204, 0, 204);">#conteudo</strong> para estilizar a div cujo <strong style="color: rgb(204, 0, 204);">ID</strong> é <em>conteudo</em>. Poderiamos usar tambem div#conteudo.<br />
3) O terceiro elemento pode aparecer <strong style="color: rgb(102, 102, 255);">várias vezes na página</strong>. Portanto, usamos <strong style="color: rgb(102, 102, 255);">class</strong>.</p>
<h3>Explicação do CSS</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@import url(&quot;reset.css&quot;);</span>
&nbsp;
body <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fde7d1</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">bg.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat-y</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#8B6914</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#8B6914</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
p <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#geral</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">580px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#topo</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#topo</span> h1 a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">220</span>%</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#conteudo</span> <span style="color: #6666ff;">.noticia</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ddd</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#conteudo</span> <span style="color: #6666ff;">.noticia</span> <span style="color: #6666ff;">.chamada</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">200</span>%</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#conteudo</span> <span style="color: #6666ff;">.noticia</span> <span style="color: #6666ff;">.subtitulo</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">italic</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#conteudo</span> <span style="color: #6666ff;">.noticia</span> img <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">15px</span> <span style="color: #933;">15px</span> <span style="color: #cc66cc;">0</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#conteudo</span> <span style="color: #6666ff;">.noticia</span> p <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">justify</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#conteudo</span> <span style="color: #6666ff;">.noticia</span> p<span style="color: #6666ff;">.direita</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#rodape</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span> <span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>A primeira linha importa o arquivo <a href="http://meyerweb.com/eric/tools/css/reset/">reset.css pelo Erick Meyer</a>. <a href="http://maujor.com/tutorial/faq.php#import">Leia mais sobre @import no site do Maujor</a>.</p>
<p>Depois definimos o fundo da página e a família de fontes a ser usada. O fundo da página (<a href="http://labs.luishenrique.org/css/css-basico/bg.png">bg.png</a>) é uma imagem de apenas 2px de altura para economizar banda, pois a imagem se repete verticalmente (repeat-y). Para estilizar os links em estado normal e ao posicionar o mouse sobre eles usamos <em>a</em> e <em>a:hover</em>, respectivamente.</p>
<p>A div <strong>#geral</strong> tem a largura da área branca da imagem de fundo menos um tamanho lateral para espaçar um pouco das bordas. Para centralizar, basta definir <em>margin-left: auto</em> e <em>margin-right: auto</em> ou <em>margin: X auto</em> (x é a distância do topo e da base; é zero no nosso exemplo). </p>
<p>Um ponto importante é quanto ao uso do <strong>float</strong>. Como nosso exemplo é de apenas uma coluna, não usamos <em>float</em> em 2 divs de modo que fiquem lado a lado. Mas o <strong>float: left</strong> foi usado (na linha 18) nas imagens dos artigos. Com ele, a imagem flutua (óbvio) para esquerda, fazendo com que o texto se &#8220;esparrame&#8221; pelos lados da imagem. O <em>margin</em> é interessante para fazer com que o texto não fique grudado na imagem.</p>
<p>Este post é apenas uma introdução bem superficial de desenvolvimento web. O intuito é despertar o interesse de quem ainda não usa/conhece o CSS. Deixe seu comentário! Até a próxima.</p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "CSS WebDesign XML";
            bb_bid  = "163998";
            bb_lang = "pt-BR";
            bb_name = "custom";bb_limit = "8";bb_format = "bbb";
          </script>
          <script type="text/javascript" src="http://widgets.boo-box.com/javascripts/embed.js"></script>
          <!-- boo-widget end -->


Compartilhe:


	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fcss-pra-quem-nunca-viu&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://delicious.com/post?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fcss-pra-quem-nunca-viu&amp;title=CSS%20pra%20quem%20nunca%20viu&amp;notes=Claro%20que%20existem%20pessoas%20que%20estudam%20%28ou%20trabalham%20com%29%20computa%C3%A7%C3%A3o%20e%20n%C3%A3o%20conhecem%20CSS.%20Talvez%20o%20foco%20%C3%A9%20outro%20%28bem%29%20distante%20de%20web%20ou%20h%C3%A1%20algum%20motivo%20para%20continuar%20a%20estiliza%C3%A7%C3%A3o%20via%20HTML.%20Vou%20tentar%20ser%20o%20mais%20direto%20poss%C3%ADvel%2C%20pois%20meu%20obje?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fcss-pra-quem-nunca-viu&amp;t=CSS%20pra%20quem%20nunca%20viu?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fcss-pra-quem-nunca-viu&amp;title=CSS%20pra%20quem%20nunca%20viu&amp;annotation=Claro%20que%20existem%20pessoas%20que%20estudam%20%28ou%20trabalham%20com%29%20computa%C3%A7%C3%A3o%20e%20n%C3%A3o%20conhecem%20CSS.%20Talvez%20o%20foco%20%C3%A9%20outro%20%28bem%29%20distante%20de%20web%20ou%20h%C3%A1%20algum%20motivo%20para%20continuar%20a%20estiliza%C3%A7%C3%A3o%20via%20HTML.%20Vou%20tentar%20ser%20o%20mais%20direto%20poss%C3%ADvel%2C%20pois%20meu%20obje?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=CSS%20pra%20quem%20nunca%20viu&amp;body=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fcss-pra-quem-nunca-viu" title="email"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fcss-pra-quem-nunca-viu&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=CSS%20pra%20quem%20nunca%20viu%20-%20http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fcss-pra-quem-nunca-viu" title="Twitter"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="javascript:AddToFavorites();" title="Add to favorites"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/addtofavorites.png" title="Add to favorites" alt="Add to favorites" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://luishenrique.org/blog/feed?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fcss-pra-quem-nunca-viu" title="Identi.ca"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://luishenrique.org/blog/posts/css-pra-quem-nunca-viu/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Editor TinyMCE no Django admin</title>
		<link>http://luishenrique.org/blog/posts/editor-tinymce-no-django-admin</link>
		<comments>http://luishenrique.org/blog/posts/editor-tinymce-no-django-admin#comments</comments>
		<pubDate>Thu, 11 Feb 2010 18:04:44 +0000</pubDate>
		<dc:creator>Luís Henrique</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Screencast]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[tinymce]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[video-tutorial]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://luishenrique.org/blog/?p=374</guid>
		<description><![CDATA[Tutorial (com vídeo - screencast) simples sobre como implementar o <a href="http://tinymce.moxiecode.com/">TinyMCE</a> (editor <a href="http://pt.wikipedia.org/wiki/WYSIWYG">WYSIWYG</a>)  em textareas no Django admin.]]></description>
			<content:encoded><![CDATA[<p>Primeiramente, <a href="http://tinymce.moxiecode.com/">TinyMCE</a> é um editor <a href="http://pt.wikipedia.org/wiki/WYSIWYG">WYSIWYG</a> (&#8220;O que você vê é o que você obtem&#8221;) mais popular em todo o mundo. É usado em grandes CMS como Wordpress e Joomla. Aqui vamos implementar o TinyMCE no painel de  administração do <a href="http://www.djangoproject.com/">Django</a>.</p>
<p><strong><span style="color: red">UPDATE:</span> se você está usando o Django no Apache com mod_python, leia também o tópico <a href="#tinymce-apache">Considerações para quem está em servidor Apache em produção</a>.</strong></p>
<h2>Preview</h2>
<div class="centro"><img width="80%" src="http://luishenrique.org/blog/wp-content/uploads/2010/02/tinymce-django-admin.png" alt="TinyMCE no Django admin" title="tinymce-django-admin" class="wp-image-375" /></a></div>
<h2>Screencast (vídeo tutorial)</h2>
<div class="centro"><object width="400" height="250"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=12903891&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=12903891&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="250"></embed></object>
<p><a href="http://vimeo.com/12903891">TinyMCE (editor WYSIWYG) in Django Admin</a> from <a href="http://vimeo.com/luish">Luis Henrique</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
</div>
<h2>Vamos por etapas</h2>
<ol>
<li>Fazer o <a href="http://tinymce.moxiecode.com/download.php" rel="external">download do TinyMCE</a></li>
<li>Criar estrutura de pastas do template</li>
<li>Configurar o <strong>TEMPLATE_DIRS</strong> no <strong>settings.py</strong> do seu projeto (<a href="#config_template_dirs">exemplo abaixo</a>)</li>
<li>Editar o urls.py</li>
<li>Editar o admin.py</li>
<li>Criar arquivo de configuração do TinyMCE</li>
</ol>
<h2>2. Estrutura</h2>
<p>A estrutura de pastas é algo como:</p>
<ul>
<li>projeto
<ul>
<li>app</li>
<li>templates
<ul>
<li>css</li>
<li>js
<ul>
<li>tinymce</li>
</ul>
</li>
</ul>
</li>
</ul>
</ul>
<ul>
</li>
</ul>
<p><img src="http://luishenrique.org/blog/wp-content/uploads/2010/02/tinymce_diretorio.png" alt="templates dir" title="tinymce_diretorio" class="size-full wp-image-377" /></p>
<p>Coloque a pasta do tinymce dentro de <strong><em>projeto > templates > js</em></strong>, como na figura acima.</p>
<h2 id="config_template_dirs">3. TEMPLATE_DIRS (settings.py)</h2>
<p>Edite o <strong>settings.py</strong> e edite/inclua essas linhas:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>
&nbsp;
TEMPLATE_DIRS = <span style="color: black;">&#40;</span>
    <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">dirname</span><span style="color: black;">&#40;</span>__file__<span style="color: black;">&#41;</span>, <span style="color: #483d8b;">'templates'</span><span style="color: black;">&#41;</span>,    
<span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h2>4. Servindo os arquivos estáticos</h2>
<p>Abra o arquivo <strong>urls.py</strong> (na raiz do projeto) e adicione a linha 3 como abaixo:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">urlpatterns = patterns<span style="color: black;">&#40;</span><span style="color: #483d8b;">''</span>,
...
    <span style="color: black;">&#40;</span>r<span style="color: #483d8b;">'^js/(?P&lt;path&gt;.*)$'</span>, <span style="color: #483d8b;">'django.views.static.serve'</span>, <span style="color: black;">&#123;</span><span style="color: #483d8b;">'document_root'</span>: <span style="color: #483d8b;">'templates/js'</span><span style="color: black;">&#125;</span><span style="color: black;">&#41;</span>,
...
<span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>Assim, quando abrimos http://127.0.0.1:8000/js/textareas.js, por exemplo, o arquivo /projeto/templates/js/textareas.js é requisitado.</p>
<h2>5. Agora o admin.py</h2>
<p>Se você está usando o admin do django, deve existir o arquivo <strong>admin.py</strong> dentro da pasta da aplicação. Se não existir, dê uma olhada na <a href="http://docs.djangoproject.com/en/dev/ref/contrib/admin/">documentação sobre o admin</a>.</p>
<p>Edite o admin.py de acordo com o seu projeto. No meu exemplo está assim:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> django.<span style="color: black;">contrib</span> <span style="color: #ff7700;font-weight:bold;">import</span> admin
<span style="color: #ff7700;font-weight:bold;">from</span> weblog.<span style="color: black;">blog</span>.<span style="color: black;">models</span> <span style="color: #ff7700;font-weight:bold;">import</span> Post
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> PostAdmin<span style="color: black;">&#40;</span>admin.<span style="color: black;">ModelAdmin</span><span style="color: black;">&#41;</span>:
	<span style="color: #ff7700;font-weight:bold;">class</span> Media:
		js = <span style="color: black;">&#40;</span><span style="color: #483d8b;">'/js/tiny_mce/tiny_mce.js'</span>, <span style="color: #483d8b;">'/js/textareas.js'</span><span style="color: black;">&#41;</span>
&nbsp;
admin.<span style="color: #dc143c;">site</span>.<span style="color: black;">register</span><span style="color: black;">&#40;</span>Post, PostAdmin<span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h2>6. E o textareas.js</h2>
<p>Já está acabando, falta dizer à engine do TinyMCE qual o tema, tamanho e botões nossas <em>textareas</em> vão ter. Conforme colocamos no admin.py, crie o arquivo <strong>textareas.js</strong> na pasta <strong>templates > js</strong>. O meu está assim:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">tinyMCE.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">// General options</span>
	mode <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;textareas&quot;</span><span style="color: #339933;">,</span>
	theme <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;advanced&quot;</span><span style="color: #339933;">,</span>
	plugins <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave&quot;</span><span style="color: #339933;">,</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// Theme options</span>
	theme_advanced_buttons1 <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect,fullscreen,code&quot;</span><span style="color: #339933;">,</span>
	theme_advanced_buttons2 <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;cut,copy,paste,pastetext,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,|,insertdate,inserttime,preview,|,forecolor,backcolor&quot;</span><span style="color: #339933;">,</span>
	theme_advanced_buttons3 <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl&quot;</span><span style="color: #339933;">,</span>
&nbsp;
	theme_advanced_toolbar_location <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;top&quot;</span><span style="color: #339933;">,</span>
	theme_advanced_toolbar_align <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;left&quot;</span><span style="color: #339933;">,</span>
	theme_advanced_statusbar_location <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;bottom&quot;</span><span style="color: #339933;">,</span>
	theme_advanced_resizing <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// Example content CSS (should be your site CSS)</span>
	<span style="color: #006600; font-style: italic;">//content_css : &quot;/css/style.css&quot;,</span>
&nbsp;
	template_external_list_url <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;lists/template_list.js&quot;</span><span style="color: #339933;">,</span>
	external_link_list_url <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;lists/link_list.js&quot;</span><span style="color: #339933;">,</span>
	external_image_list_url <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;lists/image_list.js&quot;</span><span style="color: #339933;">,</span>
	media_external_list_url <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;lists/media_list.js&quot;</span><span style="color: #339933;">,</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// Style formats</span>
	style_formats <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
		<span style="color: #009900;">&#123;</span>title <span style="color: #339933;">:</span> <span style="color: #3366CC;">'Bold text'</span><span style="color: #339933;">,</span> inline <span style="color: #339933;">:</span> <span style="color: #3366CC;">'strong'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		<span style="color: #009900;">&#123;</span>title <span style="color: #339933;">:</span> <span style="color: #3366CC;">'Red text'</span><span style="color: #339933;">,</span> inline <span style="color: #339933;">:</span> <span style="color: #3366CC;">'span'</span><span style="color: #339933;">,</span> styles <span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>color <span style="color: #339933;">:</span> <span style="color: #3366CC;">'#ff0000'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		<span style="color: #009900;">&#123;</span>title <span style="color: #339933;">:</span> <span style="color: #3366CC;">'Help'</span><span style="color: #339933;">,</span> inline <span style="color: #339933;">:</span> <span style="color: #3366CC;">'strong'</span><span style="color: #339933;">,</span> classes <span style="color: #339933;">:</span> <span style="color: #3366CC;">'help'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		<span style="color: #009900;">&#123;</span>title <span style="color: #339933;">:</span> <span style="color: #3366CC;">'Table styles'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		<span style="color: #009900;">&#123;</span>title <span style="color: #339933;">:</span> <span style="color: #3366CC;">'Table row 1'</span><span style="color: #339933;">,</span> selector <span style="color: #339933;">:</span> <span style="color: #3366CC;">'tr'</span><span style="color: #339933;">,</span> classes <span style="color: #339933;">:</span> <span style="color: #3366CC;">'tablerow'</span><span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
&nbsp;
	width<span style="color: #339933;">:</span> <span style="color: #3366CC;">'700'</span><span style="color: #339933;">,</span>
	height<span style="color: #339933;">:</span> <span style="color: #3366CC;">'400'</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>No arquivo baixado você encontra exemplos do tema advanced e do simple.</p>
<p>Mais informações: <a href="http://code.djangoproject.com/wiki/AddWYSIWYGEditor">AddWYSIWYGEditor (no site oficial do Django)</a></p>
<h2 id="tinymce-apache">UPDATE: Considerações para quem está em servidor Apache em produção</h2>
<p>Para seguir o tutorial em servidor Apache (com mod_python), considerando que você já <a href="http://docs.djangoproject.com/en/1.2/howto/static-files/">serve seus arquivos estáticos</a>, faça as seguintes alterações:</p>
<p><strong>settings.py</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">ADMIN_MEDIA_PREFIX = <span style="color: #483d8b;">'/myproject/media/'</span></pre></td></tr></table></div>

<p><strong>urls.py</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">    <span style="color: black;">&#40;</span>r<span style="color: #483d8b;">'^media/(?P&lt;path&gt;.*)$'</span>, <span style="color: #483d8b;">'django.views.static.serve'</span>, <span style="color: black;">&#123;</span><span style="color: #483d8b;">'document_root'</span>: <span style="color: #483d8b;">'/your/project/folder/myproject/templates/'</span><span style="color: black;">&#125;</span><span style="color: black;">&#41;</span>,</pre></td></tr></table></div>

<p><strong>admin.py</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> django.<span style="color: black;">conf</span> <span style="color: #ff7700;font-weight:bold;">import</span> settings
...
		<span style="color: black;">js</span> = <span style="color: black;">&#40;</span>settings.<span style="color: black;">ADMIN_MEDIA_PREFIX</span> + <span style="color: #483d8b;">'js/tiny_mce/tiny_mce.js'</span>, settings.<span style="color: black;">ADMIN_MEDIA_PREFIX</span> + <span style="color: #483d8b;">'js/textareas.js'</span><span style="color: black;">&#41;</span>
...</pre></td></tr></table></div>

<p>Dessa forma, a requisição para <em>/media/js/scripts.js</em> vai entregar o arquivo <em>/your/project/folder/myproject/templates/js/scripts.js</em>, da mesma forma para <em>/media/css</em>, <em>/media/img</em>, etc.</p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "Django Python Programação";
            bb_bid  = "163998";
            bb_lang = "pt-BR";
            bb_name = "custom";bb_limit = "8";bb_format = "bbb";
          </script>
          <script type="text/javascript" src="http://widgets.boo-box.com/javascripts/embed.js"></script>
          <!-- boo-widget end -->


Compartilhe:


	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Feditor-tinymce-no-django-admin&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://delicious.com/post?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Feditor-tinymce-no-django-admin&amp;title=Editor%20TinyMCE%20no%20Django%20admin&amp;notes=Tutorial%20%28com%20v%C3%ADdeo%20-%20screencast%29%20simples%20sobre%20como%20implementar%20o%20TinyMCE%20%28editor%20WYSIWYG%29%20%20em%20textareas%20no%20Django%20admin.?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Feditor-tinymce-no-django-admin&amp;t=Editor%20TinyMCE%20no%20Django%20admin?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Feditor-tinymce-no-django-admin&amp;title=Editor%20TinyMCE%20no%20Django%20admin&amp;annotation=Tutorial%20%28com%20v%C3%ADdeo%20-%20screencast%29%20simples%20sobre%20como%20implementar%20o%20TinyMCE%20%28editor%20WYSIWYG%29%20%20em%20textareas%20no%20Django%20admin.?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Editor%20TinyMCE%20no%20Django%20admin&amp;body=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Feditor-tinymce-no-django-admin" title="email"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Feditor-tinymce-no-django-admin&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Editor%20TinyMCE%20no%20Django%20admin%20-%20http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Feditor-tinymce-no-django-admin" title="Twitter"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="javascript:AddToFavorites();" title="Add to favorites"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/addtofavorites.png" title="Add to favorites" alt="Add to favorites" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://luishenrique.org/blog/feed?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Feditor-tinymce-no-django-admin" title="Identi.ca"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://luishenrique.org/blog/posts/editor-tinymce-no-django-admin/feed</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Python: encurte URL com o migre.me</title>
		<link>http://luishenrique.org/blog/posts/python-api-migre-me</link>
		<comments>http://luishenrique.org/blog/posts/python-api-migre-me#comments</comments>
		<pubDate>Fri, 16 Oct 2009 12:44:42 +0000</pubDate>
		<dc:creator>Luís Henrique</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Rapidinhas]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[URL]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://luishenrique.org/blog/?p=212</guid>
		<description><![CDATA[Script simples em Python que, no geral, apenas trata um arquivo XML através da requisição na API do sistema de encurtamento de URL chamado <a href="migre.me" title="Migre.me">migre.me</a>. Fiz tanto para versões 2.x quando para Python 3.]]></description>
			<content:encoded><![CDATA[<p class="centro"><a href="http://migre.me"><img class="alignright size-full wp-image-230" title="Migre.me" src="http://luishenrique.org/blog/wp-content/uploads/2009/10/migreme.png" alt="Migre.me" /></a></p>
<p>Fiz esse código em Python para encurtar uma URL através da <a rel="external" href="http://migre.me/api-migreme/">API do migre.me</a>. Como não sou um <em>expert</em> (como o <a href="http://devlog.waltercruz.com">Walter Cruz</a>, o <a href="http://rafaelmartins.eng.br">Rafael Martins</a> e <a href="http://pythonologia.org">Osvaldo Santana</a>), o programa ficou simples e, claro, <del datetime="2009-10-17T05:24:42+00:00">pode</del> <strong style="color: red;">precisa ser melhorado</strong>.</p>
<p><em><strong>O <a href="http://rafaelmartins.eng.br/">Rafael Martins</a> fez um script melhor que o meu. Download: <a href="http://hg.rafaelmartins.eng.br/scripts/file/0506383cceff/python/migreme.py">migreme.py</a></strong></em></p>
<h3>Vamos lá</h3>
<p>Faça o <a href="http://labs.luishenrique.org/python/migreme.py">download do script</a> e dê a ele a permissão para ser executado:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>labs.luishenrique.org<span style="color: #000000; font-weight: bold;">/</span>python<span style="color: #000000; font-weight: bold;">/</span>migreme.py
$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> +x migreme.py</pre></div></div>

<p>Para executá-lo:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ .<span style="color: #000000; font-weight: bold;">/</span>migreme.py</pre></div></div>

<h3>Exemplo de uso:</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">lh<span style="color: #000000; font-weight: bold;">@</span>debian:~$ .<span style="color: #000000; font-weight: bold;">/</span>migreme.py http:<span style="color: #000000; font-weight: bold;">//</span>luishenrique.org<span style="color: #000000; font-weight: bold;">/</span>blog<span style="color: #000000; font-weight: bold;">/</span>posts<span style="color: #000000; font-weight: bold;">/</span>python-api-migre-me
&nbsp;
<span style="color: #000000; font-weight: bold;">&gt;</span> Shortened URL: http:<span style="color: #000000; font-weight: bold;">//</span>migre.me<span style="color: #000000; font-weight: bold;">/</span>9clv</pre></div></div>

<p><span id="more-212"></span></p>
<p>Para rodar como um programa nativo, faça um link simbólico com o superusuário (ou copie o arquivo) em alguma pasta contida na variável $PATH.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$PATH</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>bin
&nbsp;
$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #666666; font-style: italic;"># ln -s /home/pasta/do/script/migreme.py migreme</span></pre></div></div>

<p>E execute agora somente com:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ migreme</pre></div></div>

<h3>Código-fonte (<strong>Python 2</strong>) do <em>migreme.py</em>:</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#! /usr/bin/env python</span>
<span style="color: #808080; font-style: italic;">#! /usr/bin/env python</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># Simple script using the migre.me API</span>
<span style="color: #808080; font-style: italic;"># Author: Luis Henrique B. Sousa &lt;contato@luishenrique.org&gt;</span>
<span style="color: #808080; font-style: italic;"># Date: 2009-10-16</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># Usage: python migreme.py &lt;url&gt;</span>
<span style="color: #808080; font-style: italic;"># Example: ./migreme.py http://twitter.com/luish_</span>
<span style="color: #808080; font-style: italic;">#	</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">sys</span> <span style="color: #ff7700;font-weight:bold;">import</span> argv
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">urllib</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">xml</span>.<span style="color: black;">dom</span>.<span style="color: black;">minidom</span>
&nbsp;
api = <span style="color: #483d8b;">'http://migre.me/api.xml?url=%s'</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> migreme<span style="color: black;">&#40;</span>url<span style="color: black;">&#41;</span>:
	mm_url = api <span style="color: #66cc66;">%</span> url
	dom = <span style="color: #dc143c;">xml</span>.<span style="color: black;">dom</span>.<span style="color: black;">minidom</span>.<span style="color: black;">parse</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">urllib</span>.<span style="color: black;">urlopen</span><span style="color: black;">&#40;</span>mm_url<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>dom.<span style="color: black;">getElementsByTagName</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'migre'</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>.<span style="color: black;">childNodes</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>.<span style="color: black;">data</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span>args<span style="color: black;">&#41;</span>:
	<span style="color: #008000;">list</span> = args<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
	<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #008000;">list</span><span style="color: black;">&#41;</span> == <span style="color: #ff4500;">1</span>:
		<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\n</span>-&gt; Shortened URL:'</span>, migreme<span style="color: black;">&#40;</span><span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">list</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">else</span>:
		<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;&quot;&quot;
- It works only with a URL.
- Usage: ./%s &lt;url&gt;
&quot;&quot;&quot;</span> <span style="color: #66cc66;">%</span> argv<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">&quot;__main__&quot;</span>:
    main<span style="color: black;">&#40;</span>argv<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span>:<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<h3>E para <strong>Python 3</strong>:</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#! /usr/bin/env python</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">urllib</span>.<span style="color: black;">request</span>, <span style="color: #dc143c;">urllib</span>.<span style="color: black;">parse</span>, <span style="color: #dc143c;">urllib</span>.<span style="color: black;">error</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">xml</span>.<span style="color: black;">dom</span>.<span style="color: black;">minidom</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span> 
&nbsp;
api = <span style="color: #483d8b;">'http://migre.me/api.xml?url=%s'</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> migreme<span style="color: black;">&#40;</span>url<span style="color: black;">&#41;</span>:
	mm_url = api <span style="color: #66cc66;">%</span> url
	dom = <span style="color: #dc143c;">xml</span>.<span style="color: black;">dom</span>.<span style="color: black;">minidom</span>.<span style="color: black;">parse</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">urllib</span>.<span style="color: black;">request</span>.<span style="color: black;">urlopen</span><span style="color: black;">&#40;</span>mm_url<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>dom.<span style="color: black;">getElementsByTagName</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'migre'</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>.<span style="color: black;">childNodes</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>.<span style="color: black;">data</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: #66cc66;">*</span>args<span style="color: black;">&#41;</span>:
	<span style="color: #008000;">list</span> = args<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
	<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #008000;">list</span><span style="color: black;">&#41;</span> == <span style="color: #ff4500;">1</span>:
		<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Shortened url:'</span>, migreme<span style="color: black;">&#40;</span><span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #008000;">list</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">else</span>:
		<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;&quot;&quot;
- It works only with a URL.
- Usage: ./migreme.py
-- Example: ./migreme.py http://yoursite.com/articles/search/?query=linux&amp;amp;page=5&amp;amp;language=en
&quot;&quot;&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">&quot;__main__&quot;</span>:
    main<span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span>:<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p><strong>UPDATE 26/01/2009: Atualizei o script com a dica do Rafael Martins. <img src='http://luishenrique.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </strong></p>
<p>Se houver dúvida e/ou sugestão, por favor, <a href="#respond">escreva um comentário</a> ou use o <a href="http://luishenrique.org/blog/contato">formulário de contato</a>.</p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "programação python";
            bb_bid  = "163998";
            bb_lang = "pt-BR";
            bb_name = "custom";bb_limit = "8";bb_format = "bbb";
          </script>
          <script type="text/javascript" src="http://widgets.boo-box.com/javascripts/embed.js"></script>
          <!-- boo-widget end -->


Compartilhe:


	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fpython-api-migre-me&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://delicious.com/post?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fpython-api-migre-me&amp;title=Python%3A%20encurte%20URL%20com%20o%20migre.me&amp;notes=Script%20simples%20em%20Python%20que%2C%20no%20geral%2C%20apenas%20trata%20um%20arquivo%20XML%20atrav%C3%A9s%20da%20requisi%C3%A7%C3%A3o%20na%20API%20do%20sistema%20de%20encurtamento%20de%20URL%20chamado%20migre.me.%20Fiz%20tanto%20para%20vers%C3%B5es%202.x%20quando%20para%20Python%203.?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fpython-api-migre-me&amp;t=Python%3A%20encurte%20URL%20com%20o%20migre.me?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fpython-api-migre-me&amp;title=Python%3A%20encurte%20URL%20com%20o%20migre.me&amp;annotation=Script%20simples%20em%20Python%20que%2C%20no%20geral%2C%20apenas%20trata%20um%20arquivo%20XML%20atrav%C3%A9s%20da%20requisi%C3%A7%C3%A3o%20na%20API%20do%20sistema%20de%20encurtamento%20de%20URL%20chamado%20migre.me.%20Fiz%20tanto%20para%20vers%C3%B5es%202.x%20quando%20para%20Python%203.?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Python%3A%20encurte%20URL%20com%20o%20migre.me&amp;body=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fpython-api-migre-me" title="email"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fpython-api-migre-me&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Python%3A%20encurte%20URL%20com%20o%20migre.me%20-%20http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fpython-api-migre-me" title="Twitter"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="javascript:AddToFavorites();" title="Add to favorites"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/addtofavorites.png" title="Add to favorites" alt="Add to favorites" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://luishenrique.org/blog/feed?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fpython-api-migre-me" title="Identi.ca"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://luishenrique.org/blog/posts/python-api-migre-me/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Paradigmas de Programação</title>
		<link>http://luishenrique.org/blog/posts/paradigmas-de-programacao</link>
		<comments>http://luishenrique.org/blog/posts/paradigmas-de-programacao#comments</comments>
		<pubDate>Wed, 07 Oct 2009 01:47:08 +0000</pubDate>
		<dc:creator>Luís Henrique</dc:creator>
				<category><![CDATA[Programação]]></category>
		<category><![CDATA[Ciência da Computação]]></category>
		<category><![CDATA[Linguagens]]></category>
		<category><![CDATA[Orientação a objeto]]></category>
		<category><![CDATA[Paradigmas]]></category>
		<category><![CDATA[Paradigmas de Programação]]></category>

		<guid isPermaLink="false">http://luishenrique.org/blog/?p=195</guid>
		<description><![CDATA[Um paradigma se define na forma como o programador lida com um determinado problema. As linguagens surgiram em diferentes trajetórias, cada uma seguindo um determinado paradigma. Dentre esses paradigmas, vou conceituar os considerados principais: paradigma imperativo, declarativo, funcional e orientado a objetos.]]></description>
			<content:encoded><![CDATA[<h3>Introdução</h3>
<blockquote><p>Um paradigma se define na forma como o programador lida com um determinado problema.</p></blockquote>
<p>Muitos pensam que as linguagens de programação surgiram em uma escala linear, ou seja, que na primeira geração delas o homem se adaptava às máquinas e, depois de várias outras gerações, as linguagens evoluiram umas das outras e capacitaram as máquinas a fazer as necessidades humanas. Na verdade, as linguagens surgiram em diferentes trajetórias, cada uma seguindo um determinado paradigma. Além disso, não é verdadeira a proposição que diz que uma linguagem qualquer é, sem exceção, a evolução da linguagem anterior (historicamente).</p>
<p>As linguagens existentes hoje foram se adaptando a uma única forma de <a class="bbli" href="http://sledge.boo-box.com/list/page/cHJvZ3JhbWElRTclRTNvXyMjX2JveF8jI190YWdnaW5nLXRvb2wtd3BfIyNf-60">programação<img class="bbic" src="http://boo-box.com/bbli" alt="[bb]" /></a> e às linguagens inseridas no mesmo paradigma. Dentre esses paradigmas, vou conceituar quatro, que são considerados os principais: <strong>paradigma imperativo, declarativo, funcional e orientado a objetos</strong>.</p>
<h3>1. Paradigma imperativo</h3>
<blockquote><p>&#8220;Primeiro faça isso e depois faça aquilo.&#8221;</p></blockquote>
<p>A frase acima resume o paradigma imperativo, também conhecido como paradigma <em>procedural</em>. O problema é analisado até que se encontre uma solução. Basicamente, é uma sequência de comandos que o computador executará, passo-a-passo, modificando dados e variáveis a fim de chegar ao resultado esperado. Algol, Basic, C e Pascal são algumas das linguagens de programação que seguem esse paradigma.</p>
<p>Exemplo em C do algoritmo de ordenação por inserção:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">int</span> InsertionSort<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> <span style="color: #339933;">*</span>vetor<span style="color: #339933;">,</span> <span style="color: #993333;">int</span> tam<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #993333;">int</span> i<span style="color: #339933;">,</span> j<span style="color: #339933;">,</span> elemento<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #0000dd;">1</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>tam<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		elemento<span style="color: #339933;">=</span>vetor<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		j<span style="color: #339933;">=</span>i<span style="color: #339933;">-</span><span style="color: #0000dd;">1</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>j <span style="color: #339933;">&gt;=</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>vetor<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">&gt;</span> elemento<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			vetor<span style="color: #009900;">&#91;</span>j<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> vetor<span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			j<span style="color: #339933;">--;</span>
		<span style="color: #009900;">&#125;</span>
		vetor<span style="color: #009900;">&#91;</span>j<span style="color: #339933;">+</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> elemento<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>2. Paradigma declarativo</h3>
<blockquote><p>&#8220;Qual é o problema?&#8221;</p></blockquote>
<p>O paradigma declarativo caracteriza-se pelo método preciso de descrever um problema, sem se preocupar com qual algoritmo será utilizado para resolvê-lo. A idéia é criar um algoritmo “universal”, capaz de solucionar qualquer problema. O problema se adapta a esse <a class="bbli" href="http://sledge.boo-box.com/list/page/YWxnb3JpdG1vXyMjX2JveF8jI190YWdnaW5nLXRvb2wtd3BfIyNf-52">algoritmo<img class="bbic" src="http://boo-box.com/bbli" alt="[bb]" /></a>, e não o contrário. É baseado em axiomas (verdades universais) e regras de inferência. Prolog é uma linguagem lógica que ilustra essa definição.</p>
<p>Exemplo na linguagem PROLOG:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="prolog" style="font-family:monospace;">fatorial<span style="color: #009900;">&#40;</span><span style="color: #800080;">0</span><span style="color: #339933;">,</span> <span style="color: #800080;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span> 
fatorial<span style="color: #009900;">&#40;</span><span style="color: #008080;">N</span><span style="color: #339933;">,</span> <span style="color: #008080;">F</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:-</span>
      <span style="color: #008080;">N</span><span style="color: #339933;">&gt;</span><span style="color: #800080;">0</span><span style="color: #339933;">,</span>
      <span style="color: #008080;">Nmenos1</span> <span style="color: #990000;">is</span> <span style="color: #008080;">N</span><span style="color: #339933;">-</span><span style="color: #800080;">1</span><span style="color: #339933;">,</span>
      fatorial<span style="color: #009900;">&#40;</span><span style="color: #008080;">Nmenos1</span><span style="color: #339933;">,</span> <span style="color: #008080;">X</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
      <span style="color: #008080;">F</span> <span style="color: #990000;">is</span> <span style="color: #008080;">X</span> <span style="color: #339933;">*</span> <span style="color: #008080;">N</span><span style="color: #339933;">.</span></pre></td></tr></table></div>

<h3>3. Paradigma funcional</h3>
<blockquote><p>Subdividir o problema em outras funções e resolver cada uma separadamente, pois os resultados encontrados serão utilizados posteriormente.</p></blockquote>
<p>Sobre o paradigma funcional, é fácil ilustrar através de um fluxograma. Cada bloco recebe no topo uma entrada de dados e retorna, na base, os dados de saída. A solução geral é dividida em várias funções que, no final, se associam para mostrar o resultado na tela.</p>
<p>Um exemplo na linguagem Haskell:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="haskell" style="font-family:monospace;">pertence <span style="color: #339933; font-weight: bold;">::</span> <span style="color: #cccc00; font-weight: bold;">Eq</span> t <span style="color: #339933; font-weight: bold;">=&gt;</span> t <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: green;">&#91;</span>t<span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: #cccc00; font-weight: bold;">Bool</span>
pertence x <span style="color: green;">&#40;</span>c:r<span style="color: green;">&#41;</span>
    <span style="color: #339933; font-weight: bold;">|</span> x <span style="color: #339933; font-weight: bold;">==</span> c <span style="color: #339933; font-weight: bold;">=</span> True
    <span style="color: #339933; font-weight: bold;">|</span> <span style="font-weight: bold;">otherwise</span> <span style="color: #339933; font-weight: bold;">=</span> pertence x r
pertence x <span style="color: green;">&#91;</span><span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">=</span> False</pre></td></tr></table></div>

<p>Vários autores definem Programação Funcional dentro de Programação Descritiva, que é uma divisão bastante válida.</p>
<h3>4. Paradigma orientado a objetos</h3>
<blockquote><p>Um conjunto de classes faz a interação entre objetos (instâncias) e, com a troca de mensagens entre eles, forma-se o software como um todo.</p></blockquote>
<p>Praticamente tudo é objeto, cada qual com estrutura e comportamento próprios. Esses objetos são classificados em classes e comunicam entre si. Cada uma dessas representa um determinado fenômeno e seus objetos são organizados hierarquicamente. O conjunto de classes faz a interação entre objetos e a troca de mensagens entre eles forma o software como um todo.</p>
<p>Exemplo de código orientado a objetos em Java:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Caminhao <span style="color: #000000; font-weight: bold;">extends</span> Veiculo <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">double</span> capacidade<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> numEixos<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> Caminhao<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span> capacidade, <span style="color: #000066; font-weight: bold;">int</span> numEixos<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">capacidade</span> <span style="color: #339933;">=</span> capacidade<span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">numEixos</span> <span style="color: #339933;">=</span> numEixos<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">double</span> calcularIPVA<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #cc66cc;">0.05</span> <span style="color: #339933;">*</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">getValor</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Esse paradigma vem ganhando cada vez mais popularidade. Isso se dá devido ao grande número de vantagens em trabalhar com orientação a objeto, como a manutenção e flexibilidade do código quando se trabalha em sistemas de grande porte e com uma maior equipe de programadores.</p>
<h3>Referência</h3>
<p>BROOKSHEAR, J. Glenn.  Ciência da Computação: uma visão abrangente .  5. ed</p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "programação";
            bb_bid  = "163998";
            bb_lang = "pt-BR";
            bb_name = "custom";bb_limit = "8";bb_format = "bbb";
          </script>
          <script type="text/javascript" src="http://widgets.boo-box.com/javascripts/embed.js"></script>
          <!-- boo-widget end -->


Compartilhe:


	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fparadigmas-de-programacao&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://delicious.com/post?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fparadigmas-de-programacao&amp;title=Paradigmas%20de%20Programa%C3%A7%C3%A3o&amp;notes=Um%20paradigma%20se%20define%20na%20forma%20como%20o%20programador%20lida%20com%20um%20determinado%20problema.%20As%20linguagens%20surgiram%20em%20diferentes%20trajet%C3%B3rias%2C%20cada%20uma%20seguindo%20um%20determinado%20paradigma.%20Dentre%20esses%20paradigmas%2C%20vou%20conceituar%20os%20considerados%20principais%3A%20paradigma%20imperativo%2C%20declarativo%2C%20funcional%20e%20orientado%20a%20objetos.?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fparadigmas-de-programacao&amp;t=Paradigmas%20de%20Programa%C3%A7%C3%A3o?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fparadigmas-de-programacao&amp;title=Paradigmas%20de%20Programa%C3%A7%C3%A3o&amp;annotation=Um%20paradigma%20se%20define%20na%20forma%20como%20o%20programador%20lida%20com%20um%20determinado%20problema.%20As%20linguagens%20surgiram%20em%20diferentes%20trajet%C3%B3rias%2C%20cada%20uma%20seguindo%20um%20determinado%20paradigma.%20Dentre%20esses%20paradigmas%2C%20vou%20conceituar%20os%20considerados%20principais%3A%20paradigma%20imperativo%2C%20declarativo%2C%20funcional%20e%20orientado%20a%20objetos.?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Paradigmas%20de%20Programa%C3%A7%C3%A3o&amp;body=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fparadigmas-de-programacao" title="email"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fparadigmas-de-programacao&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Paradigmas%20de%20Programa%C3%A7%C3%A3o%20-%20http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fparadigmas-de-programacao" title="Twitter"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="javascript:AddToFavorites();" title="Add to favorites"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/addtofavorites.png" title="Add to favorites" alt="Add to favorites" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://luishenrique.org/blog/feed?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fparadigmas-de-programacao" title="Identi.ca"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://luishenrique.org/blog/posts/paradigmas-de-programacao/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Referência de comandos: miniman</title>
		<link>http://luishenrique.org/blog/posts/miniman</link>
		<comments>http://luishenrique.org/blog/posts/miniman#comments</comments>
		<pubDate>Sat, 12 Sep 2009 21:06:53 +0000</pubDate>
		<dc:creator>Luís Henrique</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Comandos]]></category>
		<category><![CDATA[Documentação]]></category>
		<category><![CDATA[Ebook]]></category>
		<category><![CDATA[Ferramentas]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Leitura]]></category>
		<category><![CDATA[Melhores]]></category>
		<category><![CDATA[Online]]></category>

		<guid isPermaLink="false">http://luishenrique.org/blog/?p=156</guid>
		<description><![CDATA[O Aurélio Marinho Jargas soltou mais um projeto bacana. É o <strong>miniman</strong>, que nada mais é do que uma versão resumida das man pages. Além da versão online, o autor vende o PDF, ideal para usar como guia de bolso ou colocar no <a class="bbli" href="http://sledge.boo-box.com/list/page/c21hcnRwaG9uZV8jI19ib3hfIyNfdGFnZ2luZy10b29sLXdwXyMjXw==-56">smartphone<img class="bbic" src="http://boo-box.com/bbli" alt="[bb]" /></a>.]]></description>
			<content:encoded><![CDATA[<p>O <a title="Aurélio Marinho Jargas" rel="external" href="http://aurelio.net">Aurélio</a> soltou mais um projeto bacana. É o <a title="mini man page por Aurélio.net" rel="external" href="http://aurelio.net/shell/miniman/">miniman</a>, que nada mais é do que uma versão resumida das <a title="Definição de Man Pages na Wikipédia" rel="external" href="http://pt.wikipedia.org/wiki/Man_page">man pages</a>. Estas, como o próprio Aurélio disse, <em>são chatas e confusas, contém milhares de opções e têm formatação arcaica</em>.</p>
<p><strong>Link para o miniman: <a title="mini man page por Aurélio.net" rel="external" href="http://aurelio.net/shell/miniman/">http://aurelio.net/shell/miniman/</a></strong></p>
<p>Contém os comandos básicos, como: cat, cut, diff, find, grep, sed, sort, tail e wc. Além da versão online, o autor vende o PDF por apenas R$5,00. É ideal para usar como <a class="bbli" href="http://sledge.boo-box.com/list/page/Z3VpYStkZStib2xzb18jI19ib3hfIyNfdGFnZ2luZy10b29sLXdwXyMjXw==-60">guia de bolso<img class="bbic" src="http://boo-box.com/bbli" alt="[bb]" /></a>, colocar no <a class="bbli" href="http://sledge.boo-box.com/list/page/c21hcnRwaG9uZV8jI19ib3hfIyNfdGFnZ2luZy10b29sLXdwXyMjXw==-56">smartphone<img class="bbic" src="http://boo-box.com/bbli" alt="[bb]" /></a>, <a class="bbli" href="http://sledge.boo-box.com/list/page/bmV0Ym9va18jI19ib3hfIyNfdGFnZ2luZy10b29sLXdwXyMjXw==-52">netbook<img class="bbic" src="http://boo-box.com/bbli" alt="[bb]" /></a>, etc.</p>
<p>Fica a dica! Até a próxima!</p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "linux comandos manual";
            bb_bid  = "163998";
            bb_lang = "pt-BR";
            bb_name = "custom";bb_limit = "8";bb_format = "bbb";
          </script>
          <script type="text/javascript" src="http://widgets.boo-box.com/javascripts/embed.js"></script>
          <!-- boo-widget end -->


Compartilhe:


	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fminiman&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://delicious.com/post?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fminiman&amp;title=Refer%C3%AAncia%20de%20comandos%3A%20miniman&amp;notes=O%20Aur%C3%A9lio%20Marinho%20Jargas%20soltou%20mais%20um%20projeto%20bacana.%20%C3%89%20o%20miniman%2C%20que%20nada%20mais%20%C3%A9%20do%20que%20uma%20vers%C3%A3o%20resumida%20das%20man%20pages.%20Al%C3%A9m%20da%20vers%C3%A3o%20online%2C%20o%20autor%20vende%20o%20PDF%2C%20ideal%20para%20usar%20como%20guia%20de%20bolso%20ou%20colocar%20no%20smartphone.?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fminiman&amp;t=Refer%C3%AAncia%20de%20comandos%3A%20miniman?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fminiman&amp;title=Refer%C3%AAncia%20de%20comandos%3A%20miniman&amp;annotation=O%20Aur%C3%A9lio%20Marinho%20Jargas%20soltou%20mais%20um%20projeto%20bacana.%20%C3%89%20o%20miniman%2C%20que%20nada%20mais%20%C3%A9%20do%20que%20uma%20vers%C3%A3o%20resumida%20das%20man%20pages.%20Al%C3%A9m%20da%20vers%C3%A3o%20online%2C%20o%20autor%20vende%20o%20PDF%2C%20ideal%20para%20usar%20como%20guia%20de%20bolso%20ou%20colocar%20no%20smartphone.?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Refer%C3%AAncia%20de%20comandos%3A%20miniman&amp;body=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fminiman" title="email"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fminiman&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Refer%C3%AAncia%20de%20comandos%3A%20miniman%20-%20http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fminiman" title="Twitter"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="javascript:AddToFavorites();" title="Add to favorites"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/addtofavorites.png" title="Add to favorites" alt="Add to favorites" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://luishenrique.org/blog/feed?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fminiman" title="Identi.ca"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://luishenrique.org/blog/posts/miniman/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Agora sou aluno da UFLA</title>
		<link>http://luishenrique.org/blog/posts/agora-sou-aluno-da-ufla</link>
		<comments>http://luishenrique.org/blog/posts/agora-sou-aluno-da-ufla#comments</comments>
		<pubDate>Thu, 23 Jul 2009 01:27:59 +0000</pubDate>
		<dc:creator>Luís Henrique</dc:creator>
				<category><![CDATA[Carreira]]></category>
		<category><![CDATA[Geral]]></category>
		<category><![CDATA[Pessoal]]></category>
		<category><![CDATA[UFLA]]></category>
		<category><![CDATA[Ciência da Computação]]></category>
		<category><![CDATA[Universidade]]></category>
		<category><![CDATA[Vestibular]]></category>

		<guid isPermaLink="false">http://luishenrique.org/blog/?p=142</guid>
		<description><![CDATA[Após a frustração no fim do ano passado (2008), consegui a vaga para o curso de Ciência da Computação na <a href="http://www.ufla.br/">UFLA</a>. Consegui uma boa nota na redação (85%) e segurei a 31ª das 40 vagas. Agora é preparar as coisas e estudar muito!]]></description>
			<content:encoded><![CDATA[<p>Aaaeee!!</p>
<p style="text-align:center;"><a rel="attachment wp-att-143" href="http://luishenrique.org/blog/posts/agora-sou-aluno-da-ufla/logo_ufla"><img class="alignright size-medium wp-image-143" title="UFLA" src="http://luishenrique.org/blog/wp-content/uploads/2009/07/logo_ufla-200x81.jpg" alt="UFLA" width="200" height="81" /></a></p>
<p></p>
<p>Vocês nem imaginam o quanto estou feliz por essa conquista. Após a frustração no fim do ano passado (2008), consegui a vaga para o curso de Ciência da Computação na <a href="http://www.ufla.br/">UFLA</a>. Desde quando eu comecei a me interessar por <a href="http://sledge.boo-box.com/list/page/Y29tcHV0YWRvcmVzXyMjX2JveF8jI190YWdnaW5nLXRvb2wtd3BfIyNf-56" class="bbli">computadores<img src="http://boo-box.com/bbli" alt="[bb]" class="bbic" /></a> e tecnologia (aos 12 ou 13 anos), já sonhava em estudar na Universidade Federal de Lavras.</p>
<p>Eu não estava tão confiante que seria na primeira chamada, mas consegui uma boa nota na redação (85%) e segurei a 31ª das 40 vagas. Agora é preparar os documentos e comemorar! <img src='http://luishenrique.org/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Abraços!</p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "redação computador universidade";
            bb_bid  = "163998";
            bb_lang = "pt-BR";
            bb_name = "custom";bb_limit = "8";bb_format = "bbb";
          </script>
          <script type="text/javascript" src="http://widgets.boo-box.com/javascripts/embed.js"></script>
          <!-- boo-widget end -->


Compartilhe:


	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fagora-sou-aluno-da-ufla&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://delicious.com/post?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fagora-sou-aluno-da-ufla&amp;title=Agora%20sou%20aluno%20da%20UFLA&amp;notes=Ap%C3%B3s%20a%20frustra%C3%A7%C3%A3o%20no%20fim%20do%20ano%20passado%20%282008%29%2C%20consegui%20a%20vaga%20para%20o%20curso%20de%20Ci%C3%AAncia%20da%20Computa%C3%A7%C3%A3o%20na%20UFLA.%20Consegui%20uma%20boa%20nota%20na%20reda%C3%A7%C3%A3o%20%2885%25%29%20e%20segurei%20a%2031%C2%AA%20das%2040%20vagas.%20Agora%20%C3%A9%20preparar%20as%20coisas%20e%20estudar%20muito%21?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fagora-sou-aluno-da-ufla&amp;t=Agora%20sou%20aluno%20da%20UFLA?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fagora-sou-aluno-da-ufla&amp;title=Agora%20sou%20aluno%20da%20UFLA&amp;annotation=Ap%C3%B3s%20a%20frustra%C3%A7%C3%A3o%20no%20fim%20do%20ano%20passado%20%282008%29%2C%20consegui%20a%20vaga%20para%20o%20curso%20de%20Ci%C3%AAncia%20da%20Computa%C3%A7%C3%A3o%20na%20UFLA.%20Consegui%20uma%20boa%20nota%20na%20reda%C3%A7%C3%A3o%20%2885%25%29%20e%20segurei%20a%2031%C2%AA%20das%2040%20vagas.%20Agora%20%C3%A9%20preparar%20as%20coisas%20e%20estudar%20muito%21?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Agora%20sou%20aluno%20da%20UFLA&amp;body=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fagora-sou-aluno-da-ufla" title="email"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fagora-sou-aluno-da-ufla&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Agora%20sou%20aluno%20da%20UFLA%20-%20http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fagora-sou-aluno-da-ufla" title="Twitter"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="javascript:AddToFavorites();" title="Add to favorites"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/addtofavorites.png" title="Add to favorites" alt="Add to favorites" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://luishenrique.org/blog/feed?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Fagora-sou-aluno-da-ufla" title="Identi.ca"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://luishenrique.org/blog/posts/agora-sou-aluno-da-ufla/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Livro: A Caravela dos Insensatos</title>
		<link>http://luishenrique.org/blog/posts/livro-a-caravela-dos-insensatos</link>
		<comments>http://luishenrique.org/blog/posts/livro-a-caravela-dos-insensatos#comments</comments>
		<pubDate>Sat, 16 May 2009 03:57:45 +0000</pubDate>
		<dc:creator>Luís Henrique</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Livros]]></category>
		<category><![CDATA[Resenhas]]></category>

		<guid isPermaLink="false">http://luishenrique.org/blog/?p=120</guid>
		<description><![CDATA[
Capa do livro
&#8220;A Caravela dos Insensatos&#8221; é um livro para quem gosta de história e cultura em geral. Nele, o autor Paulo Novaes explora vários acontecimentos da Renascença através das viagens de Cristóvao Colombo, Fernando Colombo e Bartolomeu Colombo &#8211; filho e irmão, respectivamente &#8211; e Frei Gorricho (o narrador do livro).
Eles viajam por toda [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.google.com.br/search?q='a+caravela+dos+insensatos'"><img class="aligncenter size-full wp-image-121" title="Livro &quot;A Caravela dos Insensatos&quot;" src="http://luishenrique.org/blog/wp-content/uploads/2009/05/livro-caravela-insensatos.jpg" alt="Livro &quot;A Caravela dos Insensatos&quot;" width="300" height="444" /></a></p>
<p><em>Capa do livro</em></p>
<p><strong>&#8220;A Caravela dos Insensatos&#8221;</strong> é um livro para quem gosta de história e cultura em geral. Nele, o autor Paulo Novaes explora vários acontecimentos da Renascença através das viagens de <a rel="external" href="http://pt.wikipedia.org/wiki/Cristóvão_Colombo">Cristóvao Colombo</a>, Fernando Colombo e Bartolomeu Colombo &#8211; filho e irmão, respectivamente &#8211; e Frei Gorricho (o narrador do livro).</p>
<p>Eles viajam por toda a <span class="bbused"><a class="bbli" href="http://sledge.boo-box.com/list/page/RXVyb3BhXyMjX2JveF8jI19ib28tYm94ZnktYXV0b18jI18=-48">Europa<img class="bbic" src="http://boo-box.com/bbli" alt="[bb]" /></a></span> em busca de uma explicação sensata a respeito do livro <strong>&#8220;Mundus Novus&#8221;</strong> e a suposta &#8220;descoberta&#8221; da América por <a rel="external" href="http://pt.wikipedia.org/wiki/Américo_Vespúcio">Américo Vespúcio</a>. Passando por Espanha, Itália, Suíça, Alemanha e França descobrem várias edições do mesmo livro e com erros geográficos e cartográficos que, segundo Cristóvão Colombo, um navegador experiente como Vespúcio não cometeria.</p>
<p style="text-align: center;"><a href="http://pt.wikipedia.org/wiki/Cristóvão_Colombo"><img class="alignright size-medium wp-image-124" title="cristovao-colombo" src="http://luishenrique.org/blog/wp-content/uploads/2009/05/cristovao-colombo-162x200.jpg" alt="cristovao-colombo" width="162" height="200" /></a><br />
<em>Retrato póstumo de Cristóvão Colombo feito por <a rel="external" href="http://pt.wikipedia.org/wiki/Ridolfo_Ghirlandaio">Ridolfo Ghirlandaio</a></em></p>
<p>Cito alguns célebres personagens do livro:</p>
<ul>
<li><a rel="external" href="http://pt.wikipedia.org/wiki/Nicolau_Maquiavel">Nicolau Maquiavel</a></li>
<li><a rel="external" href="http://pt.wikipedia.org/wiki/Sandro_Botticelli">Sandro Botticelli</a></li>
<li><a rel="external" href="http://pt.wikipedia.org/wiki/Papa_Alexandre_VI">Papa Alexandre VI</a></li>
<li><a rel="external" href="http://pt.wikipedia.org/wiki/Isabel_I_de_Castela">Isabel I</a></li>
<li><a rel="external" href="http://pt.wikipedia.org/wiki/Leonardo_da_Vinci">Leonardo da Vinci</a></li>
<li><a rel="external" href="http://pt.wikipedia.org/wiki/Ptolemeu">Cláudio Ptolomeu</a></li>
<li><a rel="external" href="http://pt.wikipedia.org/wiki/Francisco_Pizarro">Francisco Pizarro</a></li>
<li><a rel="external" href="http://pt.wikipedia.org/wiki/Michelangelo_Buonarroti">Michelangelo Buonarroti</a></li>
<li><a rel="external" href="http://pt.wikipedia.org/wiki/Catarina_de_Aragão">Catarina de Aragão</a></li>
<li><a rel="external" href="http://pt.wikipedia.org/wiki/Rafael_Sanzio">Rafael Sanzio</a></li>
</ul>
<p>Além de <a rel="external" href="http://pt.wikipedia.org/wiki/Mona_Lisa">Mona Lisa (ou La Gioconda)</a>, <a rel="external" href="http://pt.wikipedia.org/wiki/Capela_Sistina">Capela Sistina</a> e a imensa religiosidade da família Colombo. Também gostei muito da linguagem <em>mais-do-que-formal</em> empregada nos diálogos, mesmo nos momentos descontraídos.</p>
<p>Confesso que não estava tão interessado em tal obra, mas, após alguns capítulos, não quis mais parar de ler.  <img src='http://luishenrique.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Fica a dica!</p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "Resenhas";
            bb_bid  = "163998";
            bb_lang = "pt-BR";
            bb_name = "custom";bb_limit = "8";bb_format = "bbb";
          </script>
          <script type="text/javascript" src="http://widgets.boo-box.com/javascripts/embed.js"></script>
          <!-- boo-widget end -->


Compartilhe:


	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Flivro-a-caravela-dos-insensatos&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://delicious.com/post?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Flivro-a-caravela-dos-insensatos&amp;title=Livro%3A%20A%20Caravela%20dos%20Insensatos&amp;notes=%0D%0ACapa%20do%20livro%0D%0A%0D%0A%22A%20Caravela%20dos%20Insensatos%22%20%C3%A9%20um%20livro%20para%20quem%20gosta%20de%20hist%C3%B3ria%20e%20cultura%20em%20geral.%20Nele%2C%20o%20autor%20Paulo%20Novaes%20explora%20v%C3%A1rios%20acontecimentos%20da%20Renascen%C3%A7a%20atrav%C3%A9s%20das%20viagens%20de%20Crist%C3%B3vao%20Colombo%2C%20Fernando%20Colombo%20e%20Bartol?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Flivro-a-caravela-dos-insensatos&amp;t=Livro%3A%20A%20Caravela%20dos%20Insensatos?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Flivro-a-caravela-dos-insensatos&amp;title=Livro%3A%20A%20Caravela%20dos%20Insensatos&amp;annotation=%0D%0ACapa%20do%20livro%0D%0A%0D%0A%22A%20Caravela%20dos%20Insensatos%22%20%C3%A9%20um%20livro%20para%20quem%20gosta%20de%20hist%C3%B3ria%20e%20cultura%20em%20geral.%20Nele%2C%20o%20autor%20Paulo%20Novaes%20explora%20v%C3%A1rios%20acontecimentos%20da%20Renascen%C3%A7a%20atrav%C3%A9s%20das%20viagens%20de%20Crist%C3%B3vao%20Colombo%2C%20Fernando%20Colombo%20e%20Bartol?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=Livro%3A%20A%20Caravela%20dos%20Insensatos&amp;body=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Flivro-a-caravela-dos-insensatos" title="email"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Flivro-a-caravela-dos-insensatos&amp;partner=sociable?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Livro%3A%20A%20Caravela%20dos%20Insensatos%20-%20http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Flivro-a-caravela-dos-insensatos" title="Twitter"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="javascript:AddToFavorites();" title="Add to favorites"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/addtofavorites.png" title="Add to favorites" alt="Add to favorites" class="sociable-hovers" /></a>
	<a rel="nofollow" class="thickbox" href="http://luishenrique.org/blog/feed?TB_iframe=true&amp;height=500&amp;width=900"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://identi.ca/notice/new?status_textarea=http%3A%2F%2Fluishenrique.org%2Fblog%2Fposts%2Flivro-a-caravela-dos-insensatos" title="Identi.ca"><img src="http://luishenrique.org/blog/wp-content/plugins/sociable/images/identica.png" title="Identi.ca" alt="Identi.ca" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://luishenrique.org/blog/posts/livro-a-caravela-dos-insensatos/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

