<?xml version="1.0" encoding="utf-8"?>
<!-- generator="wordpress/2.2.2" -->
<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/"
	>

<channel>
	<title>trent mick's blog</title>
	<link>http://trentm.com/blog</link>
	<description></description>
	<pubDate>Fri, 25 Jul 2008 03:45:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>
	<language>en</language>
			<item>
		<title>ActiveState Code: lauched!</title>
		<link>http://trentm.com/blog/archives/2008/07/24/activestate-code-lauched/</link>
		<comments>http://trentm.com/blog/archives/2008/07/24/activestate-code-lauched/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 03:45:36 +0000</pubDate>
		<dc:creator>trentm</dc:creator>
		
		<category><![CDATA[code.activestate.com]]></category>

		<category><![CDATA[activestate]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://trentm.com/blog/archives/2008/07/24/activestate-code-lauched/</guid>
		<description><![CDATA[We launched ActiveState Code today, and there was much rejoicing.  Yaaaah!

ActiveState Code is a site for sharing code recipes. It is the replacement for the popular ASPN Cookbooks (especially the Python Cookbook, which was a collaboration with O&#8217;Reilly and Associates that resulted in two print cookbooks using recipes from the site). The new site [...]]]></description>
			<content:encoded><![CDATA[<p>We launched <a href="http://code.activestate.com/">ActiveState Code</a> today, <a title="You have seen Monty Python's Holy Grail, right?" href="http://www.urbandictionary.com/define.php?term=And+There+was+Much+Rejoicing">and there was much rejoicing.</a>  Yaaaah!</p>

<p>ActiveState Code is a site for sharing code recipes. It is the replacement for the popular ASPN Cookbooks (especially the Python Cookbook, which was a collaboration with O&#8217;Reilly and Associates that resulted in two print cookbooks using recipes from the site). The new site adds things like <a href="http://code.activestate.com/recipes/tags/">tagging</a>, the ability to <a href="http://code.activestate.com/recipes/add/">add recipes</a> in a number of other <a href="http://code.activestate.com/recipes/langs/">languages</a>, and a fresher and hopefully more usable site. </p>

<p>Migration should be easy. All recipes from the Python, Tcl and PHP Cookbooks have been carried over. Redirects maintain all old aspn.activestate.com/ASPN/Cookbooks links. Recipe id and author ids have been maintained. The ASPN Cookbook categories have been translated into tags in the new system &#8212; <a href="http://code.activestate.com/aspnredir/categories/">full details here</a>.</p>

<p>I welcome any <a href="http://code.activestate.com/help/feedback/">feedback</a> on the site.</p>
]]></content:encoded>
			<wfw:commentRss>http://trentm.com/blog/archives/2008/07/24/activestate-code-lauched/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Switching from ASPN Cookbooks to ActiveState Code today</title>
		<link>http://trentm.com/blog/archives/2008/07/24/switching-from-aspn-cookbooks-to-activestate-code-today/</link>
		<comments>http://trentm.com/blog/archives/2008/07/24/switching-from-aspn-cookbooks-to-activestate-code-today/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 16:30:30 +0000</pubDate>
		<dc:creator>trentm</dc:creator>
		
		<category><![CDATA[code.activestate.com]]></category>

		<category><![CDATA[activestate]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://trentm.com/blog/archives/2008/07/24/switching-from-aspn-cookbooks-to-activestate-code-today/</guid>
		<description><![CDATA[We hope to be switching over from the ASPN Cookbooks to the new ActiveState Code site today. Please be patient if the site is down for a short while. We expect the process to take about an hour or two late this afternoon (PST).

I&#8217;ve had lots of good feedback from the Python community (Apologies if [...]]]></description>
			<content:encoded><![CDATA[<p>We hope to be switching over from the <a href="http://aspn.activestate.com/ASPN/Cookbook">ASPN Cookbooks</a> to the new <a href="http://code.activestate.com/">ActiveState Code</a> site today. Please be patient if the site is down for a short while. We expect the process to take about an hour or two late this afternoon (<a href="http://www.timeanddate.com/worldclock/fullscreen.html?n=256">PST</a>).</p>

<p>I&#8217;ve had lots of good feedback from the Python community (Apologies if I haven&#8217;t gotten back to you yet. I will.) and have made a number of changes based on that feedback. I&#8217;ll post more details once the site has been switched over.</p>
]]></content:encoded>
			<wfw:commentRss>http://trentm.com/blog/archives/2008/07/24/switching-from-aspn-cookbooks-to-activestate-code-today/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Translating Komodo on babelzilla.org</title>
		<link>http://trentm.com/blog/archives/2008/07/11/translating-komodo-on-babelzillaorg/</link>
		<comments>http://trentm.com/blog/archives/2008/07/11/translating-komodo-on-babelzillaorg/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 22:34:30 +0000</pubDate>
		<dc:creator>trentm</dc:creator>
		
		<category><![CDATA[l10n]]></category>

		<category><![CDATA[activestate]]></category>

		<category><![CDATA[komodo]]></category>

		<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://trentm.com/blog/archives/2008/07/11/translating-komodo-on-babelzillaorg/</guid>
		<description><![CDATA[At the prompting of dafi (one of Komodo&#8217;s more active users) and with goofy&#8217;s help I&#8217;ve uploaded a Komodo Language Pack with Komodo&#8217;s current en-US localization to BabelZilla.

We get requests for localizations of Komodo every so often, but lack the resources to do this ourselves. Given a number of good translations here, I can start [...]]]></description>
			<content:encoded><![CDATA[<p>At the <a href="http://community.activestate.com/forum-topic/localizing-komodo-using-babelzilla-dream-team">prompting</a> of <a href="http://dafizilla.sourceforge.net/">dafi</a> (one of Komodo&#8217;s more active users) and with <em>goofy</em>&#8217;s help I&#8217;ve uploaded a <a href="http://www.babelzilla.org/index.php?option=com_wts&amp;Itemid=88&amp;type=lang&amp;extension=3868">Komodo Language Pack</a> with Komodo&#8217;s current <code>en-US</code> localization to <a href="http://www.babelzilla.org/">BabelZilla</a>.</p>

<p>We get requests for localizations of Komodo every so often, but lack the resources to do this ourselves. Given a number of good translations here, I can start providing language pack extensions to <a href="http://community.activestate.com/addons">Komodo&#8217;s add-ons site</a>.</p>

<p>This is a trial balloon that I really hope turns out well. I remember having a great chat with Michal Berman about Mozilla&#8217;s l10n infrastructure at FSSOS 2007 waaay back in October last year. I dropped that ball following up after that discussion. I&#8217;d also like to take a look at <a href="https://translations.launchpad.net/">Launchpad Translations</a> to see if that would work well.</p>

<p>If you are interested in helping out with translating Komodo to your language, please take a look at <a href="http://community.activestate.com/forum-topic/localizing-komodo-using-babelzilla-dream-team">this forum thread</a> and/or let me know (trentm at activestate dot com).</p>
]]></content:encoded>
			<wfw:commentRss>http://trentm.com/blog/archives/2008/07/11/translating-komodo-on-babelzillaorg/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ActiveState Code: the new ASPN Cookbooks</title>
		<link>http://trentm.com/blog/archives/2008/07/08/activestate-code-the-new-aspn-cookbooks/</link>
		<comments>http://trentm.com/blog/archives/2008/07/08/activestate-code-the-new-aspn-cookbooks/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 22:32:39 +0000</pubDate>
		<dc:creator>trentm</dc:creator>
		
		<category><![CDATA[code.activestate.com]]></category>

		<category><![CDATA[activestate]]></category>

		<guid isPermaLink="false">http://trentm.com/blog/archives/2008/07/08/activestate-code-the-new-aspn-cookbooks/</guid>
		<description><![CDATA[ActiveState Code has been launched (in beta)! ActiveState Code is a new site that will be the eventual replacement of the venerable ASPN Cookbooks &#8212; in particular the popular Python Cookbook.

What this site offers over the ASPN Cookbooks:


a complete visual refresh (long overdue)
full tagging support of recipes
support for many many more languages (the ASPN Cookbooks [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.activestate.com/">ActiveState Code</a> has been launched (in beta)! ActiveState Code is a new site that will be the eventual replacement of the venerable <a href="http://aspn.activestate.com/ASPN/Cookbook">ASPN Cookbooks</a> &#8212; in particular the popular <a href="http://aspn.activestate.com/ASPN/Cookbook/Python">Python Cookbook</a>.</p>

<p>What this site offers over the ASPN Cookbooks:</p>

<ul>
<li>a complete visual refresh (long overdue)</li>
<li>full tagging support of recipes</li>
<li>support for many many more languages (the ASPN Cookbooks were restricted to Python, PHP, Tcl and XSLT recipes)</li>
</ul>

<p>In addition, the new site provides a sound foundation for other improvements &#8212; so <strong><a href="http://code.activestate.com/help/feedback/?type=general">tell us what you think!</a></strong>. What is missing? What doesn&#8217;t work? What would make the site more useful for you? for your community?</p>

<p>While the site is in beta, new recipes, comments and votes are <em>not saved</em> &#8212; instead the site&#8217;s data will be sync&#8217;d from the ASPN Cookbooks most nights. The plan is to fully move to this new site in two weeks, shutting down the old ASPN Cookbooks (redirects will preserve all old links).</p>
]]></content:encoded>
			<wfw:commentRss>http://trentm.com/blog/archives/2008/07/08/activestate-code-the-new-aspn-cookbooks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ActivePython 2.5.2.2 and 2.4.5.14 released</title>
		<link>http://trentm.com/blog/archives/2008/04/09/activepython-2522-and-24514-released/</link>
		<comments>http://trentm.com/blog/archives/2008/04/09/activepython-2522-and-24514-released/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 21:58:16 +0000</pubDate>
		<dc:creator>trentm</dc:creator>
		
		<category><![CDATA[activestate]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://trentm.com/blog/archives/2008/04/09/activepython-2522-and-24514-released/</guid>
		<description><![CDATA[Get it here: http://www.activestate.com/products/activepython/

After a hiatus while I worked hard on the Komodo 4.3 release with the Komodo crew here, I&#8217;ve finally had the chance to update ActivePython 2.5 and 2.4 to the latest.

Full details in the ActivePython release notes. These releases update the core to Python 2.5.2 and 2.4.5.

Enjoy.
]]></description>
			<content:encoded><![CDATA[<p>Get it here: <a href="http://www.activestate.com/products/activepython/">http://www.activestate.com/products/activepython/</a></p>

<p>After a hiatus while I worked hard on the <a href="http://www.activestate.com/products/komodo/">Komodo 4.3</a> release with the Komodo crew here, I&#8217;ve finally had the chance to update ActivePython 2.5 and 2.4 to the latest.</p>

<p>Full details in the <a href="http://aspn.activestate.com/ASPN/docs/ActivePython/relnotes.html">ActivePython release notes</a>. These releases update the core to Python <a href="http://www.python.org/download/releases/2.5.2/NEWS.txt">2.5.2</a> and <a href="http://www.python.org/download/releases/2.4.5/NEWS.txt">2.4.5</a>.</p>

<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://trentm.com/blog/archives/2008/04/09/activepython-2522-and-24514-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>nightly updates for Komodo Edit (and the Komodo AUS)</title>
		<link>http://trentm.com/blog/archives/2008/03/03/komodo-aus/</link>
		<comments>http://trentm.com/blog/archives/2008/03/03/komodo-aus/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 21:00:49 +0000</pubDate>
		<dc:creator>trentm</dc:creator>
		
		<category><![CDATA[activestate]]></category>

		<category><![CDATA[komodo]]></category>

		<category><![CDATA[mozilla]]></category>

		<category><![CDATA[install]]></category>

		<guid isPermaLink="false">http://trentm.com/blog/archives/2008/03/03/komodo-aus/</guid>
		<description><![CDATA[I and others here have been hard at work on Komodo 4.3 (due to go final
this week) so it has been a while since I&#8217;ve posted. One thing I&#8217;ve wanted to post about for quite a while is the Komodo auto-update system. I alluded to
it waaay back
when working on adding auto-update support to Komodo 4.2 [...]]]></description>
			<content:encoded><![CDATA[<p>I and others here have been hard at work on Komodo 4.3 (due to go final
this week) so it has been a while since I&#8217;ve posted. One thing I&#8217;ve wanted to post about for quite a while is the Komodo auto-update system. I <a href="http://trentm.com/blog/archives/2007/05/29/wix-and-msp/">alluded to
it</a> waaay back
when working on adding auto-update support to Komodo 4.2 but haven&#8217;t
written anything about it since.</p>

<p>Last Friday gives me good reason to post about it: <strong>We now have a
&#8220;nightly&#8221; channel for Komodo Edit!</strong></p>

<h2>Komodo Auto-update channels</h2>

<p>There are three Komodo auto-update &#8220;channels&#8221;:</p>

<ol>
<li><p>&#8220;release&#8221;: This is the typical (and default) channel for installations
of a final release of Komodo (e.g. 4.2.0, 4.2.1, 4.3.0). On this channel,
Komodo will only update itself to the latest <em>final</em> Komodo release.</p></li>
<li><p>&#8220;beta&#8221;: This is the typical (and default) channel for Komodo alpha/beta
builds. On this channel, Komodo will update itself to the final or
pre-release (i.e. alphas and betas).</p></li>
<li><p>&#8220;nightly&#8221;: This is a channel that I finally got working on the
server-side on Friday. Since the announcement of
<a href="http://www.openkomodo.com/">OpenKomodo</a> and open sourcing of Komodo Edit
we&#8217;ve been doing &#8220;nightly&#8221; builds of Komodo Edit (built on <em>most</em> nights
:). These are publicly available here: <a href="http://downloads.openkomodo.com/komodoedit/nightly/">http://downloads.openkomodo.com/komodoedit/nightly/</a></p></li>
</ol>

<p><strong>As of last Friday, if you are on the nightly update channel Komodo Edit
will update to the latest nightly build.</strong> These are quite a bit more
burning-edge that the &#8220;beta&#8221; channel. Often the only criteria for putting
up a nightly is that the build worked for all platforms. So, occasionally
some features are broken &#8212; though I think we do pretty well.</p>

<p>This channel is quite new for us though, so there may be some growing
pains in the first couple of weeks. Please <a href="http://bugs.activestate.com/enter_bug.cgi?product=Komodo&amp;component=Update">let me
know</a>
if you have any problems with it. I think it will be pretty cool to easily
always be running the very latest Komodo Edit.</p>

<p>At this time we aren&#8217;t yet doing public nightlies of Komodo IDE.</p>

<h2>Setting the update channel for your Komodo installation</h2>

<p>Currently there isn&#8217;t a prefs panel in Komodo to tweak auto-update
settings &#8212; such as the channel you are one. There should be. I hope to
get one in sometime after 4.3.0.</p>

<p>To set your Komodo channel edit &#8220;channel-prefs.js&#8221; in your Komodo
installation as appropriate. On Windows and Linux this file is here:</p>

<pre><code>INSTALLDIR/lib/mozilla/defaults/pref/channel-prefs.js
</code></pre>

<p>and on Mac OS X here:</p>

<pre><code>INSTALLDIR/Contents/MacOS/defaults/pref/channel-prefs.js
</code></pre>

<p>It is a very simple file that looks like this:</p>

<pre><code>// Valid values are "release", "beta" and "nightly" (internal-only).
pref("app.update.channel", "beta");
</code></pre>

<p>Happily that &#8220;internal-only&#8221; is no longer correct for Komodo Edit.</p>

<h2>Other Komodo AUS Stuff</h2>

<p>Komodo&#8217;s auto-update system, on the client side (i.e. the app), pretty
much just uses the excellent Mozilla auto-update system. On the
server-side we have our own (very simple)
<a href="http://www.djangoproject.com/">Django</a>-based update server. On the
build-side, we have our own Python scripts
(<a href="http://grok.openkomodo.com/source/xref/openkomodo/trunk/util/mozupdate.py">mozupdate.py</a>
et al) for building all relevant partial and complete update packages as
part of full builds.</p>

<p>I hope to post more about our AUS server and about our build tools. I
think I could fairly easily package up our tools to provide a possible answer
to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=415181">Mozilla Bug 415181</a>
(Package the MAR generation tools for easy external usage).</p>

<p>There used to be an open bug (found it: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=375752">Mozilla Bug
375752</a>) to convert
some of the Bash shell scripts for Mozilla update package building to
Python scripts. I see (by way of <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=410806">Mozilla Bug
410806</a>) that that
has at least partially happened with <code>make_incremental_updates.py</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://trentm.com/blog/archives/2008/03/03/komodo-aus/feed/</wfw:commentRss>
		</item>
		<item>
		<title>markdown2.py</title>
		<link>http://trentm.com/blog/archives/2007/11/07/markdown2py/</link>
		<comments>http://trentm.com/blog/archives/2007/11/07/markdown2py/#comments</comments>
		<pubDate>Thu, 08 Nov 2007 02:15:12 +0000</pubDate>
		<dc:creator>trentm</dc:creator>
		
		<category><![CDATA[markdown]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://trentm.com/blog/archives/2007/11/07/markdown2py/</guid>
		<description><![CDATA[I&#8217;ve started a python-markdown2 project: this is another Python implementation of Markdown:


  Markdown is a text-to-HTML conversion tool for web writers. Markdown allows 
  you to write using an easy-to-read, easy-to-write plain text format, then 
  convert it to structurally valid XHTML (or HTML).


No release package yet (setup.py, setuptools, easyinstall, ezsetup? &#8212; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started a <a href="http://code.google.com/p/python-markdown2/">python-markdown2</a> project: this is another Python implementation of <a href="http://daringfireball.net/projects/markdown/">Markdown</a>:</p>

<blockquote>
  <p>Markdown is a text-to-HTML conversion tool for web writers. Markdown allows 
  you to write using an easy-to-read, easy-to-write plain text format, then 
  convert it to structurally valid XHTML (or HTML).</p>
</blockquote>

<p>No release package yet (setup.py, setuptools, easy<em>install, ez</em>setup? &#8212; my head is spinning), but you can get the file directly from SVN: <a href="http://python-markdown2.googlecode.com/svn/trunk/markdown2.py">markdown2.py</a>.</p>

<p>This is the first project for which I am really using <a href="http://code.google.com/hosting/">Google Code project hosting</a>. I&#8217;m really digging it. Nice bug tracker, nice enough wiki (<em>all</em> wikis should use a source control system as their backend), svn. Goodbye sourceforge.</p>
]]></content:encoded>
			<wfw:commentRss>http://trentm.com/blog/archives/2007/11/07/markdown2py/feed/</wfw:commentRss>
		</item>
		<item>
		<title>open komodo is out</title>
		<link>http://trentm.com/blog/archives/2007/11/02/open-komodo-is-out/</link>
		<comments>http://trentm.com/blog/archives/2007/11/02/open-komodo-is-out/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 23:22:12 +0000</pubDate>
		<dc:creator>trentm</dc:creator>
		
		<category><![CDATA[komodo]]></category>

		<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://trentm.com/blog/archives/2007/11/02/open-komodo-is-out/</guid>
		<description><![CDATA[The wraps are finally off Open Komodo!


source: http://svn.openkomodo.com/openkomodo/browse/openkomodo/trunk
grok (an alternative to lxr): http://grok.openkomodo.com/source/search?q=koDirs
wiki: http://wiki.openkomodo.com/index.php/Main_Page
mailing lists: http://lists.openkomodo.com/mailman/listinfo
irc: irc.mozilla.org #komodo


Check it out.

Quick build notes:

# Get the source
svn co http://svn.openkomodo.com/repos/openkomodo/trunk openkomodo
# Build Mozilla
cd openkomodo/mozilla
python build.py configure -k 1.0 --moz-src=cvs:1.8 --release \
    --no-strip --shared --tools
python build.py distclean all
cd ..
# Build Komodo
export PATH=`pwd`/util/black:$PATH   # Komodo's [...]]]></description>
			<content:encoded><![CDATA[<p>The wraps are finally off <a href="http://www.openkomodo.com/">Open Komodo</a>!</p>

<ul>
<li>source: <a href="http://svn.openkomodo.com/openkomodo/browse/openkomodo/trunk">http://svn.openkomodo.com/openkomodo/browse/openkomodo/trunk</a></li>
<li>grok (an alternative to lxr): <a href="http://grok.openkomodo.com/source/search?q=koDirs">http://grok.openkomodo.com/source/search?q=koDirs</a></li>
<li>wiki: <a href="http://wiki.openkomodo.com/index.php/Main_Page">http://wiki.openkomodo.com/index.php/Main_Page</a></li>
<li>mailing lists: <a href="http://lists.openkomodo.com/mailman/listinfo">http://lists.openkomodo.com/mailman/listinfo</a></li>
<li>irc: irc.mozilla.org #komodo</li>
</ul>

<p><strong>Check it out.</strong></p>

<p>Quick build notes:</p>

<pre><code># Get the source
svn co http://svn.openkomodo.com/repos/openkomodo/trunk openkomodo
# Build Mozilla
cd openkomodo/mozilla
python build.py configure -k 1.0 --moz-src=cvs:1.8 --release \
    --no-strip --shared --tools
python build.py distclean all
cd ..
# Build Komodo
export PATH=`pwd`/util/black:$PATH   # Komodo's "bk" build tool
bk configure
bk build
# Run Komodo
bk run
</code></pre>

<p>If you have the <a href="http://svn.openkomodo.com/openkomodo/view/openkomodo/trunk/README.txt">build prerequisites</a> setup, you should be able to cut &#8216;n paste the above. (Windows users, use the Windows-specific quick build steps in the README.txt.)</p>

<p>I have some (longer term) <a href="http://svn.openkomodo.com/openkomodo/browse/mk/trunk">plans</a> to reduce those build steps to:</p>

<pre><code>./configure.py
mk
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://trentm.com/blog/archives/2007/11/02/open-komodo-is-out/feed/</wfw:commentRss>
		</item>
		<item>
		<title>off to FSOSS</title>
		<link>http://trentm.com/blog/archives/2007/10/24/off-to-fsoss/</link>
		<comments>http://trentm.com/blog/archives/2007/10/24/off-to-fsoss/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 23:02:02 +0000</pubDate>
		<dc:creator>trentm</dc:creator>
		
		<category><![CDATA[komodo]]></category>

		<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://trentm.com/blog/archives/2007/10/24/off-to-fsoss/</guid>
		<description><![CDATA[I&#8217;m off to FSSOS in a few hours.  We&#8217;ll be opening up the Komodo sources next Wednesday, so Shane and I will be there to start the discussion about what Open Komodo and Snapdragon should focus on to best improve the tool story for open web development. (Currently the Open Komodo sources are available [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m off to <a href="http://fsoss.senecac.on.ca/2007/">FSSOS</a> in a few hours.  <a href="http://www.activestate.com/">We&#8217;ll</a> be opening up the Komodo sources next Wednesday, so <a href="http://blogs.activestate.com/shanec/">Shane</a> and I will be there to start the discussion about what <a href="http://www.activestate.com/openkomodo/">Open Komodo</a> and <a href="http://www.activestate.com/openkomodo/details.plex">Snapdragon</a> should focus on to best improve the tool story for open web development. (Currently the Open Komodo sources are available to a small group of mozillians. If you have some ideas and would like to take a peek, let me know and I&#8217;ll hook you up!)</p>

<p>I&#8217;m hoping to meet a few of the Mozilla folks that will be there: <a href="http://benjamin.smedbergs.us/blog/2007-10-03/fsoss-2007/">Benjamin</a> to ask about breakpad (I want to get breakpad running for Open Komodo and <a href="http://www.activestate.com/komodoide/">Komodo</a> builds), looking forward to <a href="http://fsoss.senecac.on.ca/2007/presentationDetails.php?presentationID=29">Mike Beltzner&#8217;s talk on UE design at Mozilla</a>, <a href="http://www.bitstampede.com/2007/10/03/dont-forget-to-fsoss/">Eric Shephed</a> to ask about how mozilla handles localization of their docs.</p>

<p>As well, if any of the mozilla folks involved in the <a href="http://wiki.mozilla.org/AUS">AUS</a> will be there, I&#8217;d love to talk with you to compare notes with Komodo&#8217;s auto-update system.</p>
]]></content:encoded>
			<wfw:commentRss>http://trentm.com/blog/archives/2007/10/24/off-to-fsoss/feed/</wfw:commentRss>
		</item>
		<item>
		<title>html5lib rocks (and a patch to preserve attribute order)</title>
		<link>http://trentm.com/blog/archives/2007/10/18/html5lib-rocks-and-a-patch-to-preserve-attribute-order/</link>
		<comments>http://trentm.com/blog/archives/2007/10/18/html5lib-rocks-and-a-patch-to-preserve-attribute-order/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 23:08:10 +0000</pubDate>
		<dc:creator>trentm</dc:creator>
		
		<category><![CDATA[komodo]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://trentm.com/blog/archives/2007/10/18/html5lib-rocks-and-a-patch-to-preserve-attribute-order/</guid>
		<description><![CDATA[I&#8217;ve been playing with the Python html5lib package &#8212; having come across it reading Sam Ruby&#8217;s blog. What a fantastically useful library!

Originally my interest in it was with the discussion surrounding santization, and I expect to use it for that later, but today I&#8217;ve been playing with some general parse/filter/serialize code to support some preprocessing [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing with the Python <a href="http://code.google.com/p/html5lib/">html5lib package</a> &#8212; having come across it reading <a href="http://intertwingly.net/blog/">Sam Ruby&#8217;s blog</a>. What a fantastically useful library!</p>

<p>Originally my interest in it was with the discussion surrounding <a href="http://wiki.whatwg.org/wiki/Sanitization_rules">santization</a>, and I expect to use it for that later, but today I&#8217;ve been playing with some general parse/filter/serialize code to support some preprocessing of HTML documentation for <a href="http://www.activestate.com/openkomodo/">Open Komodo</a>.</p>

<p>My code looks like this:</p>

<pre><code>import sys
from html5lib import treebuilders, treewalkers
from html5lib.serializer.xhtmlserializer import XHTMLSerializer

def filter_play(path):
    p = html5lib.XHTMLParser(tree=treebuilders.getTreeBuilder("simpletree"))
    f = open(path)
    dom = p.parse(f)

    walker = treewalkers.getTreeWalker("simpletree")
    stream = walker(dom)
    #stream = MyPreprocessingFilter()

    s = XHTMLSerializer()
    outputter = s.serialize(stream)

    for item in outputter:
        sys.stdout.write(item)

filter_play(sys.argv[1])
</code></pre>

<p>One thing that bugged me a little with the output generated with this is that attributes on HTML elements get sorted, i.e. their order is not preserved. While totally cool for correctness, this reduces the utility of using <code>diff</code> or similar for comparing input with output. As well, I work on the <a href="http://www.activestate.com/Products/komodo_ide/">Komodo</a> IDE/editor and would like to consider using <code>html5lib</code> for an HTML reflow/beautifier feature at some point. Preserving attribute order for this will be important.</p>

<p>To that end, here is <a href="http://trentm.com/patches/html5lib_preserve_attr_order.patch">a small patch that adds the ability to preserve attribute order</a> in serialized output.  To use it:</p>

<ol>
<li>You need <a href="http://pypi.python.org/pypi/Ordered%20Dictionary/">odict.py</a>.</li>
<li><p>You need to change the above code to:</p>

<pre><code>...
s = XHTMLSerializer(preserve_attr_order=True)
...
</code></pre></li>
</ol>

<p>Obviously this isn&#8217;t something that would be ready to check-in to <code>html5lib</code>. Reasons why:</p>

<ul>
<li>It only works for the &#8220;simpletree&#8221; treebuilder/treewalker. I&#8217;m not sure if it is feasible/practical to get it to work with some of the others (e.g. dom).</li>
<li>It unconditionally requires an external non-standard module (<code>odict.py</code>).</li>
<li>It should be optional on the parser because (a) using <code>OrderedDict</code> instead of <code>dict</code> would presumably have an undesired perf impact and (b) the attribute order normalization could be <em>desirable</em> for many users.</li>
</ul>

<p>Maybe a better solution would be a custom &#8220;roundtriptree&#8221; tree type? Anyway, just throwing this up here to perhaps come back to later. I have to dig into the <code>html5lib</code> discussion list to see if this has come up before.</p>
]]></content:encoded>
			<wfw:commentRss>http://trentm.com/blog/archives/2007/10/18/html5lib-rocks-and-a-patch-to-preserve-attribute-order/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
