<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>soledad penadés &#187; plugin</title>
	<atom:link href="http://soledadpenades.com/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://soledadpenades.com</link>
	<description>repeat 4[fd 100 rt 90]</description>
	<lastBuildDate>Wed, 25 Apr 2012 21:10:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>New SyHi version: 0.0.4</title>
		<link>http://soledadpenades.com/2010/11/18/new-syhi-version-0-0-4/</link>
		<comments>http://soledadpenades.com/2010/11/18/new-syhi-version-0-0-4/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 20:47:30 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[syhi]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=3248</guid>
		<description><![CDATA[I checked GeSHi today and saw there had been lots of updates since the last time I updated my Syntax Highlighting plug-in for WordPress, SyHi. There was even support for retrosexy languages such as 6502 and 68000 assembler, and zxbasic&#8211;which prompted me to immediately update my plug-in so that people can post code snippets for [...]]]></description>
			<content:encoded><![CDATA[<p>I checked <a href="http://qbnz.com/highlighter/">GeSHi</a> today and saw there had been lots of updates since the last time I updated my <strong>Sy</strong>ntax <strong>Hi</strong>ghlighting plug-in for WordPress, <a href="http://soledadpenades.com/projects/wordpress/syhi/">SyHi</a>. There was even support for <em>retrosexy</em> languages such as 6502 and 68000 assembler, and zxbasic&#8211;which prompted me to immediately update my plug-in so that people can post code snippets for Commodore 64, Nintendo Entertainment System, Amigaaaah or ZXSpectrum!</p>
<p>So with this new version, there&#8217;s support for the following <strong>new syntaxes</strong>, in addition to the existing ones: <em>4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, algol68, autoconf, autohotkey, awk, chaiscript, clojure, cuesheet, e, ecmascript, f1, fsharp, gambas, gdb, genie, go, gwbasic, hicest, icon, j, jquery, lb, logtalk, magiksf, mapbasic, mmix, modula2, newlisp, objeck, oxygene, oz, perl6, pf, pike, postgresql, powerbuilder, pcre, purebasic, q, rpmspec, rsplus, systemverilog, unicon, vala, xbasic,</em> and <em>zxbasic</em>.</p>
<p>The full list of supported syntaxes can be read at my <a href="http://soledadpenades.com/projects/wordpress/syhi/">SyHi</a> page.</p>
<p>You can download the plug-in from its <a href="http://wordpress.org/extend/plugins/syhi/">WordPress.org page</a> or from its <a href="https://github.com/sole/SyHi">github repository</a>. If you have already installed it, you don&#8217;t need to do anything: it will prompt you to upgrade at some point when you log into the WP admin area&#8211;the upgrade process is absolutely straightforward and you just need to press the upgrade button! :-)</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=3248&amp;md5=372bd2f698e030a1092217658be49fad" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2010/11/18/new-syhi-version-0-0-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2010%2F11%2F18%2Fnew-syhi-version-0-0-4%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=New+SyHi+version%3A+0.0.4&amp;amp;description=I+checked+GeSHi+today+and+saw+there+had+been+lots+of+updates+since+the+last+time+I+updated+my+Syntax+Highlighting+plug-in+for+WordPress%2C+SyHi.+There+was+even+support+for+retrosexy+languages+such+as+6502+and+68000+assembler%2C+and+zxbasic--which+prompted+me+to+immediately+update+my+plug-in+so+that+people+can+post+code+snippets+for+Commodore+64%2C+Nintendo+Entertainment+System%2C+Amigaaaah+or+ZXSpectrum%21%0D%0A%0D%0ASo+with+this+new+version%2C+there%27s+support+for+the+following+new+syntaxes%2C+in+addition+to+the+existing+ones%3A+4cs%2C+6502acme%2C+6502kickass%2C+6502tasm%2C+68000devpac%2C+algol68%2C+autoconf%2C+autohotkey%2C+awk%2C+chaiscript%2C+clojure%2C+cuesheet%2C+e%2C+ecmascript%2C+f1%2C+fsharp%2C+gambas%2C+gdb%2C+genie%2C+go%2C+gwbasic%2C+hicest%2C+icon%2C+j%2C+jquery%2C+lb%2C+logtalk%2C+magiksf%2C+mapbasic%2C+mmix%2C+modula2%2C+newlisp%2C+objeck%2C+oxygene%2C+oz%2C+perl6%2C+pf%2C+pike%2C+postgresql%2C+powerbuilder%2C+pcre%2C+purebasic%2C+q%2C+rpmspec%2C+rsplus%2C+systemverilog%2C+unicon%2C+vala%2C+xbasic%2C+and+zxbasic.%0D%0A%0D%0AThe+full+list+of+supported+syntaxes+can+be+read+at+my+SyHi+page.%0D%0A%0D%0AYou+can+download+the+plug-in+from+its+WordPress.org+page+or+from+its+github+repository.+If+you+have+already+installed+it%2C+you+don%27t+need+to+do+anything%3A+it+will+prompt+you+to+upgrade+at+some+point+when+you+log+into+the+WP+admin+area--the+upgrade+process+is+absolutely+straightforward+and+you+just+need+to+press+the+upgrade+button%21+%3A-%29&amp;amp;tags=plugin%2Csyhi%2Cwordpress%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Delicatessen v2</title>
		<link>http://soledadpenades.com/2009/11/17/delicatessen-v2/</link>
		<comments>http://soledadpenades.com/2009/11/17/delicatessen-v2/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 10:27:39 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[delicatessen]]></category>
		<category><![CDATA[delicious]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=1807</guid>
		<description><![CDATA[Let me introduce Delicatessen v2, the new version of my WordPress plug-in for finding out who&#8217;s bookmarked your posts in delicious.com It has taken a bit too long to produce this version, but it at last behaves like a nice netizen, and won&#8217;t spam delicious.com with too many queries in a very little time, therefore [...]]]></description>
			<content:encoded><![CDATA[<p>Let me introduce <a href="http://soledadpenades.com/projects/wordpress/delicatessen/">Delicatessen v2</a>, the new version of my WordPress plug-in for finding out who&#8217;s bookmarked your posts in delicious.com</p>
<p>It has taken a bit too long to produce this version, but it at last behaves like a nice <em>netizen</em>, and won&#8217;t spam delicious.com with too many queries in a very little time, therefore you won&#8217;t get banned ;)</p>
<p><img src="/imgs/delicatessen-screenshot-1.png" alt="Delicatessen" /></p>
<p>More info and downloads in the <a href="http://soledadpenades.com/projects/wordpress/delicatessen/">Delicatessen</a> page.</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=1807&amp;md5=629aa99f408063287e3ce9a920fbb065" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2009/11/17/delicatessen-v2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2009%2F11%2F17%2Fdelicatessen-v2%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=Delicatessen+v2&amp;amp;description=Let+me+introduce+Delicatessen+v2%2C+the+new+version+of+my+WordPress+plug-in+for+finding+out+who%27s+bookmarked+your+posts+in+delicious.com%0D%0A%0D%0AIt+has+taken+a+bit+too+long+to+produce+this+version%2C+but+it+at+last+behaves+like+a+nice+netizen%2C+and+won%27t+spam+delicious.com+with+too+many+queries+in+a+very+little+time%2C+therefore+you+won%27t+get+banned+%3B%29%0D%0A%0D%0A%0D%0A%0D%0AMore+info+and+downloads+in+the+Delicatessen+page.&amp;amp;tags=delicatessen%2Cdelicious%2Cphp%2Cplugin%2Cwordpress%2Cblog" type="text/html" />
	</item>
		<item>
		<title>SyHi: my minimalistic syntax highlighting plug-in for WordPress</title>
		<link>http://soledadpenades.com/2009/11/02/syhi-my-minimalistic-syntax-highlighting-plug-in-for-wordpress/</link>
		<comments>http://soledadpenades.com/2009/11/02/syhi-my-minimalistic-syntax-highlighting-plug-in-for-wordpress/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 12:50:43 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[syhi]]></category>
		<category><![CDATA[syntax highlighting]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=1486</guid>
		<description><![CDATA[I had been using Code Snippet for a year, or a couple of years (I can&#8217;t really remember), and was more or less happy with it. Apart from the fact that it didn&#8217;t preserve some stuff properly, like double dashes and quotes. So then I tried adding another plug-in to the mix, Preserve Code Formatting. [...]]]></description>
			<content:encoded><![CDATA[<p>I had been using <a href="http://blog.hackerforhire.org/code-snippet/">Code Snippet</a> for a year, or a couple of years (I can&#8217;t really remember), and was more or less happy with it. Apart from the fact that it didn&#8217;t preserve some stuff properly, like double dashes and quotes. So then I tried adding another plug-in to the mix, <a href="http://coffee2code.com/wp-plugins/preserve-code-formatting/">Preserve Code Formatting</a>. But both at the same time didn&#8217;t work out as I <del datetime="2009-11-02T12:04:59+00:00">expected</del> hoped. </p>
<p>The solution? </p>
<p><strong>I made a new plug-in</strong>. It&#8217;s <em>very minimalistic</em>, starting with its name: <a href="http://soledadpenades.com/projects/wordpress/syhi/">SyHi</a>.</p>
<h3>How does it work?</h3>
<p>The problem with other plug-ins is that they apply their formatting and then let WordPress continue modifying the posts&#8217; text. That&#8217;s a totally bad idea, and that&#8217;s why quotes and dashes were systematically altered. On the other hand, this little clever plug-in takes the code blocks apart, sets them aside while leaving placeholder text where they were, and when WordPress has finished with all its filtering and texturizing, SyHi replaces the placeholder texts with the preserved, syntax highlighted beatiful pieces of code that the author entered.</p>
<p>The resulting code not only is nice to look at, but can be copied and pasted into a compiler and it will work with <strong>no modifications</strong> at all. No more <q>please replace em dashes with double hyphens because WordPress modified the snippet&#8217;s output&#8230;</q>: your blog readers  can now simply copy and paste!</p>
<h3>Alphatesters needed</h3>
<p>So far I have tested SyHi with a test blog and this blog too. It looks fine, but I would be more than happy if somebody else wants to have a go at testing it. I would even add you to the <em>Thanks</em> section!</p>
<p><del datetime="2009-11-02T13:43:53+00:00">Unfortunately, the plug-in is not yet available in the wp-plugins directory; I&#8217;m waiting for them to approve my request so that you can install it from within the plugins admin page.</del></p>
<p>Plug-in page at WordPress directory: <a href="http://wordpress.org/extend/plugins/syhi/">SyHi</a>. You can also clone <a href="http://github.com/sole/SyHi">the SyHi github repository</a> or <a href="http://github.com/sole/SyHi/downloads">download the latest version</a> from there.</p>
<h3>Samples</h3>
<p>So you don&#8217;t believe me when I say this plug-in works great?</p>
<h4>Using Python</h4>
<div class="syhi_block"><code>noise_output = <span style="color: #dc143c;">wave</span>.<span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'noise.wav'</span>, <span style="color: #483d8b;">'w'</span><span style="color: black;">&#41;</span><br />
noise_output.<span style="color: black;">setparams</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">44100</span>, <span style="color: #ff4500;">0</span>, <span style="color: #483d8b;">'NONE'</span>, <span style="color: #483d8b;">'not compressed'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
<br />
<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>, SAMPLE_LEN<span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; value = <span style="color: #dc143c;">random</span>.<span style="color: black;">randint</span><span style="color: black;">&#40;</span>-<span style="color: #ff4500;">32767</span>, <span style="color: #ff4500;">32767</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; packed_value = <span style="color: #dc143c;">struct</span>.<span style="color: black;">pack</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'h'</span>, value<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; noise_output.<span style="color: black;">writeframes</span><span style="color: black;">&#40;</span>packed_value<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; noise_output.<span style="color: black;">writeframes</span><span style="color: black;">&#40;</span>packed_value<span style="color: black;">&#41;</span><br />
<br />
noise_output.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></code></div>
<h4>What about php?</h4>
<div class="syhi_block"><code><span style="color: #000000; font-weight: bold;">class</span> SyHi<br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$code_blocks</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$geshi_instance</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Execute pre and post process functions before and after each post content is processed</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$this</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'pre_process'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$this</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_process'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Same for each comment</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comment_text'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$this</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'pre_process'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comment_text'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$this</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'post_process'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Add the css stylesheet link to the &lt;head&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$this</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'add_css'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></code></div>
<h4>OK and what about C/C++?</h4>
<div class="syhi_block"><code><span style="color: #0000ff;">void</span> luisita_reportErrors<span style="color: #008000;">&#40;</span>lua_State <span style="color: #000040;">*</span>L, <span style="color: #0000ff;">int</span> st<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>st <span style="color: #000040;">!</span><span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; std<span style="color: #008080;">::</span><span style="color: #0000dd;">cerr</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;ERROR -- &quot;</span> <span style="color: #000080;">&lt;&lt;</span> lua_tostring<span style="color: #008000;">&#40;</span>L, <span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span> <span style="color: #000080;">&lt;&lt;</span> std<span style="color: #008080;">::</span><span style="color: #007788;">endl</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; lua_pop<span style="color: #008000;">&#40;</span>L, <span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// removes error message</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<span style="color: #008000;">&#125;</span></code></div>
<p>As you can see, double dashes are being respected, quotes are kept as they are, and code is nicely highlighted. And if you&#8217;re <em>still</em> feeling skeptical, keep browsing posts in this blog, since all code snippets go through SyHi.</p>
<p><strong>Update:</strong> added the link to the plug-in&#8217;s repository :)</p>
<p><strong>Update 2:</strong> let me clarify something: this plug-in can beautify snippets in pretty much every programming language you can think of, thanks to the huge language support provided by GeSHi. I have shown you only three examples as a simple demonstration, but you can even show Z80 assembler code! </p>
<p>The full list of supported languages is in the left column of <a href="http://qbnz.com/highlighter/">the GeSHi website</a>, under the <em>Supported Languages header</em>. Heck, it even has support for a language called <em>BrainFuck</em>!</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=1486&amp;md5=e08b1bd701b2690ea04078aa6803c552" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2009/11/02/syhi-my-minimalistic-syntax-highlighting-plug-in-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2009%2F11%2F02%2Fsyhi-my-minimalistic-syntax-highlighting-plug-in-for-wordpress%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=SyHi%3A+my+minimalistic+syntax+highlighting+plug-in+for+WordPress&amp;amp;description=I+had+been+using+Code+Snippet+for+a+year%2C+or+a+couple+of+years+%28I+can%27t+really+remember%29%2C+and+was+more+or+less+happy+with+it.+Apart+from+the+fact+that+it+didn%27t+preserve+some+stuff+properly%2C+like+double+dashes+and+quotes.+So+then+I+tried+adding+another+plug-in+to+the+mix%2C+Preserve+Code+Formatting.+But+both+at+the+same+time+didn%27t+work+out+as+I+expected+hoped.+%0D%0A%0D%0AThe+solution%3F+%0D%0A%0D%0AI+made+a+new+plug-in.+It%27s+very+minimalistic%2C+starting+with+its+name%3A+SyHi.%0D%0A%0D%0AHow+does+it+work%3F%0D%0A%0D%0AThe+problem+with+other+plug-ins+is+that+they+apply+their+formatting+and+then+let+WordPress+continue+modifying+the+posts%27+text.+That%27s+a+totally+bad+idea%2C+and+that%27s+why+quotes+and+dashes+were+systematically+altered.+On+the+other+hand%2C+this+little+clever+plug-in+takes+the+code+blocks+apart%2C+sets+them+aside+while+leaving+placeholder+text+where+they+were%2C+and+when+WordPress+has+finished+with+all+its+filtering+and+texturizing%2C+SyHi+replaces+the+placeholder+texts+with+the+preserved%2C+syntax+highlighted+beatiful+pieces+of+code+that+the+author+entered.%0D%0A%0D%0AThe+resulting+code+not+only+is+nice+to+look+at%2C+but+can+be+copied+and+pasted+into+a+compiler+and+it+will+work+with+no+modifications+at+all.+No+more+please+replace+em+dashes+with+double+hyphens+because+WordPress+modified+the+snippet%27s+output...%3A+your+blog+readers++can+now+simply+copy+and+paste%21%0D%0A%0D%0AAlphatesters+needed%0D%0A%0D%0ASo+far+I+have+tested+SyHi+with+a+test+blog+and+this+blog+too.+It+looks+fine%2C+but+I+would+be+more+than+happy+if+somebody+else+wants+to+have+a+go+at+testing+it.+I+would+even+add+you+to+the+Thanks+section%21%0D%0A%0D%0AUnfortunately%2C+the+plug-in+is+not+yet+available+in+the+wp-plugins+directory%3B+I%27m+waiting+for+them+to+approve+my+request+so+that+you+can+install+it+from+within+the+plugins+admin+page.%0D%0A%0D%0APlug-in+page+at+WordPress+directory%3A+SyHi.+You+can+also+clone+the+SyHi+github+repository+or+download+the+latest+version+from+there.%0D%0A%0D%0ASamples%0D%0A%0D%0ASo+you+don%27t+believe+me+when+I+say+this+plug-in+works+great%3F%0D%0A%0D%0AUsing+Python%0D%0A%0D%0A%0D%0Anoise_output+%3D+wave.open%28%27noise.wav%27%2C+%27w%27%29%0D%0Anoise_output.setparams%28%282%2C+2%2C+44100%2C+0%2C+%27NONE%27%2C+%27not+compressed%27%29%29%0D%0A%0D%0Afor+i+in+range%280%2C+SAMPLE_LEN%29%3A%0D%0A++++++++value+%3D+random.randint%28-32767%2C+32767%29%0D%0A++++++++packed_value+%3D+struct.pack%28%27h%27%2C+value%29%0D%0A++++++++noise_output.writeframes%28packed_value%29%0D%0A++++++++noise_output.writeframes%28packed_value%29%0D%0A%0D%0Anoise_output.close%28%29%0D%0A%0D%0A%0D%0AWhat+about+php%3F%0D%0A%0D%0A%0D%0Aclass+SyHi%0D%0A%7B%0D%0A%09protected+%24code_blocks%3B%0D%0A%09protected+%24geshi_instance+%3D+null%3B%0D%0A%0D%0A%09public+function+__construct%28%29%0D%0A%09%7B%0D%0A%09%09%2F%2F+Execute+pre+and+post+process+functions+before+and+after+each+post+content+is+processed%0D%0A%09%09add_filter%28%27the_content%27%2C+array%28%26%24this%2C+%27pre_process%27%29%2C+2%29%3B%0D%0A%09%09add_filter%28%27the_content%27%2C+array%28%26%24this%2C+%27post_process%27%29%2C+1000%29%3B%0D%0A%0D%0A%09%09%2F%2F+Same+for+each+comment%0D%0A%09%09add_filter%28%27comment_text%27%2C+array%28%26%24this%2C+%27pre_process%27%29%2C+2%29%3B%0D%0A%09%09add_filter%28%27comment_text%27%2C+array%28%26%24this%2C+%27post_process%27%29%2C+1000%29%3B%0D%0A%0D%0A%09%09%2F%2F+Add+the+css+stylesheet+link+to+the+%0D%0A%09%09add_action%28%27wp_head%27%2C+array%28%26%24this%2C+%27add_css%27%29%2C+1%29%3B%0D%0A%09%7D%0D%0A%7D%0D%0A%0D%0A%0D%0AOK+and+what+about+C%2FC%2B%2B%3F%0D%0A%0D%0A%0D%0Avoid+luisita_reportErrors%28lua_State+%2AL%2C+int+st%29%0D%0A%7B%0D%0A++++if+%28st+%21%3D+0%29%0D%0A++++%7B%0D%0A++++++++std%3A%3Acerr+&amp;amp;tags=open+source%2Cphp%2Cplugin%2Csyhi%2Csyntax+highlighting%2Cwordpress%2Cblog" type="text/html" />
	</item>
		<item>
		<title>&#8220;If you’re new here, you may want to subscribe to the RSS feed&#8221;</title>
		<link>http://soledadpenades.com/2009/08/18/if-you%e2%80%99re-new-here-you-may-want-to-subscribe-to-the-rss-feed/</link>
		<comments>http://soledadpenades.com/2009/08/18/if-you%e2%80%99re-new-here-you-may-want-to-subscribe-to-the-rss-feed/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 09:03:23 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Comment]]></category>
		<category><![CDATA[loyalty]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=1275</guid>
		<description><![CDATA[And I wonder&#8230; why? Why would I want to do that? I just arrived at your site from Google, looking for something which maybe is not exactly what I will find here. I am just looking for something sporadic and very specific. Do you really think your ridiculous message at the top, right where my [...]]]></description>
			<content:encoded><![CDATA[<p>And I wonder&#8230; why? Why would I want to do that? I just arrived at your site from Google, looking for something which maybe is not exactly what I will find here. I am just looking for something sporadic and very specific. Do you really think your ridiculous message at the top, right where my eyes begin scanning for the information I am looking for, is going to make <em>me</em> &#8211;a complete stranger, alien to your words and your editorial line&#8211; feel compelled to subscribe to your RSS feed to read your semi-daily musings about God knows what?</p>
<p>I&#8217;ll give you the short answer: No!</p>
<p>Most of these messages are generated thanks to the <a href="http://wordpress.org/extend/plugins/what-would-seth-godin-do/">What would Seth Godin Do</a> plugin. While I appreciate the effort of the developer and also think that welcoming newcomers is always a great idea, I am not sure you can build any kind of loyalty by using the plugin and not even changing the default text that comes with it.</p>
<p>The only way of <em>capturing</em> people who get to your blog via a search engine is to offer interesting content. If I like what I find, and the site navigation is nice and easy, without an Adsense ad in between every piece of content, I will probably have a look by myself and <em>maybe</em> I may subscribe to your feed. If, on top of that, you want to add a short <q>Hello, new visitor!</q> message explaining what your site is about, great. But please change the default text or you risk being <em>Yet another WordPress weblog</em>.</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=1275&amp;md5=baf5d8a1fc9b608d6cf1f8bcfbf99f1e" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2009/08/18/if-you%e2%80%99re-new-here-you-may-want-to-subscribe-to-the-rss-feed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2009%2F08%2F18%2Fif-you%25e2%2580%2599re-new-here-you-may-want-to-subscribe-to-the-rss-feed%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=%26%238220%3BIf+you%E2%80%99re+new+here%2C+you+may+want+to+subscribe+to+the+RSS+feed%26%238221%3B&amp;amp;description=And+I+wonder...+why%3F+Why+would+I+want+to+do+that%3F+I+just+arrived+at+your+site+from+Google%2C+looking+for+something+which+maybe+is+not+exactly+what+I+will+find+here.+I+am+just+looking+for+something+sporadic+and+very+specific.+Do+you+really+think+your+ridiculous+message+at+the+top%2C+right+where+my+eyes+begin+scanning+for+the+information+I+am+looking+for%2C+is+going+to+make+me+--a+complete+stranger%2C+alien+to+your+words+and+your+editorial+line--+feel+compelled+to+subscribe+to+your+RSS+feed+to+read+your+semi-daily+musings+about+God+knows+what%3F%0D%0A%0D%0AI%27ll+give+you+the+short+answer%3A+No%21%0D%0A%0D%0AMost+of+these+messages+are+generated+thanks+to+the+What+would+Seth+Godin+Do+plugin.+While+I+appreciate+the+effort+of+the+developer+and+also+think+that+welcoming+newcomers+is+always+a+great+idea%2C+I+am+not+sure+you+can+build+any+kind+of+loyalty+by+using+the+plugin+and+not+even+changing+the+default+text+that+comes+with+it.%0D%0A%0D%0AThe+only+way+of+capturing+people+who+get+to+your+blog+via+a+search+engine+is+to+offer+interesting+content.+If+I+like+what+I+find%2C+and+the+site+navigation+is+nice+and+easy%2C+without+an+Adsense+ad+in+between+every+piece+of+content%2C+I+will+probably+have+a+look+by+myself+and+maybe+I+may+subscribe+to+your+feed.+If%2C+on+top+of+that%2C+you+want+to+add+a+short+Hello%2C+new+visitor%21+message+explaining+what+your+site+is+about%2C+great.+But+please+change+the+default+text+or+you+risk+being+Yet+another+WordPress+weblog.&amp;amp;tags=loyalty%2Cplugin%2Cwordpress%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Generate bitmap font: a little plug-in for The Gimp</title>
		<link>http://soledadpenades.com/2009/04/20/generate-bitmap-font-a-little-plug-in-for-the-gimp/</link>
		<comments>http://soledadpenades.com/2009/04/20/generate-bitmap-font-a-little-plug-in-for-the-gimp/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 18:56:26 +0000</pubDate>
		<dc:creator>sole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[gimp]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://soledadpenades.com/?p=932</guid>
		<description><![CDATA[I made this little plug-in for the Gimp because I needed to generate a fixed-width font bitmap (what I have called a Bitmap Font) to load and use in an application of mine. I then thought that maybe someone would like to learn how to make plug-ins for the Gimp with Python, as I did, [...]]]></description>
			<content:encoded><![CDATA[<p>I made this little plug-in for the Gimp because I needed to generate a fixed-width font bitmap (what I have called a Bitmap Font) to load and use in an application of mine. I then thought that maybe someone would like to learn how to make plug-ins for the Gimp with Python, as I did, so that&#8217;s why I&#8217;m posting it here.</p>
<p>It turns out to be very simple. Your plug-ins need to be placed in your user&#8217;s directory for the Gimp. In my case, that is <em>~/.gimp-2.6/plug-ins</em>. When the program starts up, it will scan that folder, looking for any possible plug-ins there.</p>
<p>In my case, I decided I wanted to place the plug-in in the <em>File</em> menu, under Create:</p>
<p><img src="/imgs/gimp_plugin01.png" alt="File ... Create..." /></p>
<p>That is done with the register function at the end of the code, amongst other configuration settings for the window that shows up if you select my plug-in:</p>
<div class="syhi_block"><code>register<span style="color: black;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">&quot;sole_generate_bitmap_font&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">&quot;Generate bitmap font&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">&quot;Generate bitmap font&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">&quot;Soledad Penades&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">&quot;Soledad Penades&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">&quot;2009&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">&quot;&lt;Image&gt;/File/Create/_Generate Bitmap Font&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #483d8b;">&quot;&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: black;">&#91;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: black;">&#40;</span>PF_FONT, <span style="color: #483d8b;">&quot;Font&quot;</span>, <span style="color: #483d8b;">&quot;Font&quot;</span>, <span style="color: #483d8b;">&quot;04b03&quot;</span><span style="color: black;">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: black;">&#40;</span>PF_SPINNER, <span style="color: #483d8b;">&quot;Font_Size&quot;</span>, <span style="color: #483d8b;">&quot;Size&quot;</span>, <span style="color: #ff4500;">8</span>, <span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>, <span style="color: #ff4500;">1000</span>, <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: black;">&#40;</span>PF_RADIO, <span style="color: #483d8b;">&quot;orientation&quot;</span>, <span style="color: #483d8b;">&quot;Orientation&quot;</span>, <span style="color: #483d8b;">&quot;horizontal&quot;</span>, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: black;">&#40;</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;_horizontal&quot;</span>, <span style="color: #483d8b;">&quot;horizontal&quot;</span><span style="color: black;">&#41;</span>, <span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;_vertical&quot;</span>, <span style="color: #483d8b;">&quot;vertical&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: black;">&#93;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; sole_generate_bitmap_font<span style="color: black;">&#41;</span></code></div>
<p><img src="/imgs/gimp_plugin02.png" alt="Generate bitmap font" /></p>
<p>The plug-in, as it is, offers only few configuration options but if you want more, they can be added very easily. There&#8217;s a but: the only thing I couldn&#8217;t manage to do is to remove the <em>&#8220;Input image&#8221;</em> and <em>&#8220;Input drawable&#8221;</em> options (note they aren&#8217;t specified in my code either, it seems they are added automatically).</p>
<p>Once you press &#8216;OK&#8217;, it will create a new document with the selected font. This is an example:<br />
<img src="/imgs/gimp_plugin03.png" alt="Example bitmap font" /></p>
<p>Now, that isn&#8217;t a fixed width font. When this texture is used for writing texts, it produces text that can be read but feels <em>weird</em>, because that font has not been designed to be used with fixed widths. Anyway, you get the idea. I&#8217;m still looking for a fixed width font that I like and find easy to read, so that&#8217;s why I&#8217;m using this one for the example. It is the classic 04b_03 by <a href="http://www.04.jp.org/">04</a>.</p>
<p>You can take a look at the <a href="http://github.com/sole/snippets/blob/master/gimp/generate_bitmap_font/sole_generate_bitmap_font.py">full source code here</a>. Enjoy it!</p>
 <p><a href="http://soledadpenades.com/?flattrss_redirect&amp;id=932&amp;md5=6e94dcb0c7d7a8c200151c5c3b605a43" title="Flattr" target="_blank"><img src="http://soledadpenades.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://soledadpenades.com/2009/04/20/generate-bitmap-font-a-little-plug-in-for-the-gimp/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=8399&amp;amp;url=http%3A%2F%2Fsoledadpenades.com%2F2009%2F04%2F20%2Fgenerate-bitmap-font-a-little-plug-in-for-the-gimp%2F&amp;amp;language=en_GB&amp;amp;category=text&amp;amp;title=Generate+bitmap+font%3A+a+little+plug-in+for+The+Gimp&amp;amp;description=I+made+this+little+plug-in+for+the+Gimp+because+I+needed+to+generate+a+fixed-width+font+bitmap+%28what+I+have+called+a+Bitmap+Font%29+to+load+and+use+in+an+application+of+mine.+I+then+thought+that+maybe+someone+would+like+to+learn+how+to+make+plug-ins+for+the+Gimp+with+Python%2C+as+I+did%2C+so+that%27s+why+I%27m+posting+it+here.%0D%0A%0D%0AIt+turns+out+to+be+very+simple.+Your+plug-ins+need+to+be+placed+in+your+user%27s+directory+for+the+Gimp.+In+my+case%2C+that+is+%7E%2F.gimp-2.6%2Fplug-ins.+When+the+program+starts+up%2C+it+will+scan+that+folder%2C+looking+for+any+possible+plug-ins+there.%0D%0A%0D%0AIn+my+case%2C+I+decided+I+wanted+to+place+the+plug-in+in+the+File+menu%2C+under+Create%3A%0D%0A%0D%0A%0D%0A%0D%0AThat+is+done+with+the+register+function+at+the+end+of+the+code%2C+amongst+other+configuration+settings+for+the+window+that+shows+up+if+you+select+my+plug-in%3A%0D%0A%0D%0A%0D%0Aregister%28%0D%0A%09%22sole_generate_bitmap_font%22%2C%0D%0A%09%22Generate+bitmap+font%22%2C%0D%0A%09%22Generate+bitmap+font%22%2C%0D%0A%09%22Soledad+Penades%22%2C%0D%0A%09%22Soledad+Penades%22%2C%0D%0A%09%222009%22%2C%0D%0A%09%22%2FFile%2FCreate%2F_Generate+Bitmap+Font%22%2C%0D%0A%09%22%22%2C%0D%0A%09%5B%0D%0A%09%09%28PF_FONT%2C+%22Font%22%2C+%22Font%22%2C+%2204b03%22%29%2C%0D%0A%09%09%28PF_SPINNER%2C+%22Font_Size%22%2C+%22Size%22%2C+8%2C+%280%2C+1000%2C+1%29%29%2C%0D%0A%09%09%28PF_RADIO%2C+%22orientation%22%2C+%22Orientation%22%2C+%22horizontal%22%2C+%0D%0A%09%09%09%28%28%22_horizontal%22%2C+%22horizontal%22%29%2C+%28%22_vertical%22%2C+%22vertical%22%29%29%0D%0A%09%09%29%0D%0A%09%5D%2C%0D%0A%09%5B%5D%2C%0D%0A%09sole_generate_bitmap_font%29%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AThe+plug-in%2C+as+it+is%2C+offers+only+few+configuration+options+but+if+you+want+more%2C+they+can+be+added+very+easily.+There%27s+a+but%3A+the+only+thing+I+couldn%27t+manage+to+do+is+to+remove+the+%22Input+image%22+and+%22Input+drawable%22+options+%28note+they+aren%27t+specified+in+my+code+either%2C+it+seems+they+are+added+automatically%29.%0D%0A%0D%0AOnce+you+press+%27OK%27%2C+it+will+create+a+new+document+with+the+selected+font.+This+is+an+example%3A%0D%0A%0D%0A%0D%0ANow%2C+that+isn%27t+a+fixed+width+font.+When+this+texture+is+used+for+writing+texts%2C+it+produces+text+that+can+be+read+but+feels+weird%2C+because+that+font+has+not+been+designed+to+be+used+with+fixed+widths.+Anyway%2C+you+get+the+idea.+I%27m+still+looking+for+a+fixed+width+font+that+I+like+and+find+easy+to+read%2C+so+that%27s+why+I%27m+using+this+one+for+the+example.+It+is+the+classic+04b_03+by+04.%0D%0A%0D%0AYou+can+take+a+look+at+the+full+source+code+here.+Enjoy+it%21&amp;amp;tags=gimp%2Copen+source%2Cplugin%2Cpython%2Cubuntu%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>

