<?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>Elitist</title>
	<atom:link href="http://decodecode.net/elitist/feed/" rel="self" type="application/rss+xml" />
	<link>http://decodecode.net/elitist</link>
	<description>Ruminations of a Web weaver…</description>
	<lastBuildDate>Wed, 01 Feb 2012 12:58:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Disabling pagination in Arras archives</title>
		<link>http://decodecode.net/elitist/2012/01/disabling-pagination-in-arras-archives/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disabling-pagination-in-arras-archives</link>
		<comments>http://decodecode.net/elitist/2012/01/disabling-pagination-in-arras-archives/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 17:41:35 +0000</pubDate>
		<dc:creator>Ilan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://decodecode.net/elitist/?p=131</guid>
		<description><![CDATA[Removing the pagination links (next/prev) from archive.php:27 was trivial: &#60;div id="archive-posts"&#62;     &#60;?php arras_render_posts( null, arras_get_option('archive_display') ) ?&#62;          &#60;?php if(function_exists('wp_pagenavi')) wp_pagenavi(); else { ?&#62;         &#60;div&#62;             &#60;div&#62;&#60;?php next_posts_link( __('Older Entries', 'arras') ) ?&#62;&#60;/div&#62;    &#8230; <a href="http://decodecode.net/elitist/2012/01/disabling-pagination-in-arras-archives/">Continued <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<ol>
<li>Removing the pagination links (next/prev) from archive.php:27 was trivial:
<pre>&lt;div id="archive-posts"&gt;
    &lt;?php arras_render_posts( null, arras_get_option('archive_display') ) ?&gt;     

    &lt;?php if(function_exists('wp_pagenavi')) wp_pagenavi(); else { ?&gt;
        &lt;div&gt;
            &lt;div&gt;&lt;?php next_posts_link( __('Older Entries', 'arras') ) ?&gt;&lt;/div&gt;
            &lt;div&gt;&lt;?php previous_posts_link( __('Newer Entries', 'arras') ) ?&gt;&lt;/div&gt;
        &lt;/div&gt;
    &lt;?php } ?&gt;
    &lt;/div&gt;&lt;!-- #archive-posts --&gt;</pre>
</li>
<li>arras_render_posts() (library/template.php:157) uses the WP&#8217;s loop query, which has posts_per_page set to 10 globally, and it seems by the time Arras&#8217;s archive.php is invoked it&#8217;s too late — the query was already processed and cannot be modified?
<pre>function arras_render_posts( $args = null, /*...*/ ) {
    /*...*/
    if ( ! $args ) {  
        $query = $wp_query;
    } else {
        $query = new WP_Query( $args );
    }</pre>
</li>
<li>A workaround would be to pass a new query instead of null. But how to keep the WP query&#8217;s other parameters, and modify just posts_per_page (or posts_per_archive_page)? And, for efficiency, how to avoid running another query by modifying WP&#8217;s?</li>
<li>Or, an ugly hack around this, was to run another query, thus replacing the global $wp_query:
<pre>query_posts($query_string . '&amp;posts_per_archive_page=-1');  
arras_render_posts( null, /*...*/);</pre>
</li>
<li>But really, this is definitely <em>not</em> the place to hardcode this option.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://decodecode.net/elitist/2012/01/disabling-pagination-in-arras-archives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding placeholders to Contact Forms 7</title>
		<link>http://decodecode.net/elitist/2011/12/adding-placeholders-to-contact-forms-7/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=adding-placeholders-to-contact-forms-7</link>
		<comments>http://decodecode.net/elitist/2011/12/adding-placeholders-to-contact-forms-7/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 06:19:11 +0000</pubDate>
		<dc:creator>Ilan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://decodecode.net/elitist/?p=120</guid>
		<description><![CDATA[HTML5 provides a placeholder attribute. How to get CF7 to use it? How to workaround stupid IE with jQuery? Effect we want: show a placeholder in unmodified inputs, hide (delete) it when field gains focus, and restore it on blur &#8230; <a href="http://decodecode.net/elitist/2011/12/adding-placeholders-to-contact-forms-7/">Continued <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>HTML5 provides a placeholder attribute. How to get CF7 to use it? How to <a href="http://bavotasan.com/2011/html5-placeholder-jquery-fix/">workaround stupid IE with jQuery</a>?</p>
<p>Effect we want: show a placeholder in unmodified inputs, hide (delete) it when field gains focus, and restore it on blur if left empty. Preferably, don&#8217;t submit it.</p>
<p>Before HTML5 this trick was popular:</p>
<pre>&lt;input type="text" onfocus="if(this.value=='Message')this.value='';" onblur="if(this.value=='')this.value='Message';" name="foo"&gt;</pre>
<h2>Context</h2>
<ol>
<li>In Contact Forms 7 (CF7), form fields are defined using shortcodes, not HTML, so can&#8217;t add the onfocus/onblur attributes. Unless we <a href="http://wordpress.org/support/topic/plugin-contact-form-7-erase-fields-onfocus-1">mess with CF7&#8242;s code</a>, of course:
<pre>$html = '&lt;input type="text" name="'.$name.'" value="'.esc_attr($value).'" '.$atts.' onblur="if(this.value==\'\')this.value=\''.esc_attr($value).'\';" onfocus="if(this.value==\''.esc_attr($value).'\')this.value=\'\';"&gt;';</pre>
<p>And correspondingly for textarea, mutatis mutandis. But this is, obviously, unmaintainable.</li>
<li>Unobtrusive JavaScript? Anyway, it would be more efficient (think many fields) to have jQuery do it instead.</li>
<li>Using input&#8217;s default value as a placeholder doesn&#8217;t seem semantically correct.</li>
<li>WAI?</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://decodecode.net/elitist/2011/12/adding-placeholders-to-contact-forms-7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixing layout bug in hacked Arras</title>
		<link>http://decodecode.net/elitist/2011/12/fixing-layout-bug-in-hacked-arras/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fixing-layout-bug-in-hacked-arras</link>
		<comments>http://decodecode.net/elitist/2011/12/fixing-layout-bug-in-hacked-arras/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 17:04:09 +0000</pubDate>
		<dc:creator>Ilan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://decodecode.net/elitist/?p=111</guid>
		<description><![CDATA[Problem is sidebar &#8220;drops&#8221; in subsequent pages of the home page. Investigating… Using Arras 1.5.1.2, with a few tweaks, so at first suspected hacked templates. Specific difficulty is common with CSS layouts using floats, but… Weird, this only happens when &#8230; <a href="http://decodecode.net/elitist/2011/12/fixing-layout-bug-in-hacked-arras/">Continued <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Problem is sidebar &#8220;drops&#8221; in subsequent pages of the home page.</p>
<h2>Investigating…</h2>
<ol>
<li>Using <a href="http://www.arrastheme.com/">Arras</a> 1.5.1.2, with a few tweaks, so at first suspected hacked templates.</li>
<li>Specific difficulty is common with CSS layouts using floats, but…</li>
<li>Weird, this only happens when &#8220;paged&#8221;… no, actually, only on the second page!?</li>
<li>Let&#8217;s look at the DOM. The CSS path to the &#8220;Older Entries&#8221; link is <code>html body.rtl div#wrapper div#main.clearfix div#container.clearfix div#content.section div.navigation div.floatleft a</code>, in all but the second page, where instead it&#8217;s <code>html body.rtl div#wrapper div#main.clearfix div#container.clearfix div.navigation div.floatleft a</code>, outside #content.</li>
<li>That&#8217;s it then: all three divs #container, #primary, and #secondary should have been inside #main, but on this page the last two aren&#8217;t, thus breaking the layout.</li>
<li>… Found it: a spurious &lt;/div&gt;, right before an embedded video iframe, in post 39: <code>html body.rtl div#wrapper div#main.clearfix div#container.clearfix div#content.section div#archive-posts div.traditional div.post-39 div.entry-content p iframe</code>. That last p should&#8217;ve been inside an additional <code>div[dir=rtl]</code>. (Divitis! And what&#8217;s with the redundant dir attribute?)</li>
<li>Can&#8217;t see it in TinyMCE, only in Firebug, but anyway the editor inserts an img into the post, which is later converted into an iframe, presumably.</li>
<li>Anyway, un-publishing that post fixes the layout.</li>
<li>Who&#8217;s fault? [Ultimate] TinyMCE? Or the user inserted it manually? No, removed it, and this post&#8217;s layout is still broken, only now a closing &lt;/div&gt; seems missing, somewhere before &lt;a name=&#8221;comments&#8221;&gt;.</li>
<li>Tracing the execution to find which PHP templates rendered this mess is so painful!</li>
<li>The correct DOM of a &#8220;single&#8221; view (in <a href="http://en.wikipedia.org/wiki/Haml">HAML</a>-like notation ;o):
<pre>#main
   #container
      #content-top
      #content
         #post-156
            h3.entry-title
            .entry-content
            .about-author
            .written-by
         a[name="comments"]
      #content-bottom
   #primary</pre>
</li>
<li>The broken DOM implicates the WYSIWYG editor:
<pre>#post-39
   h3.entry-title
   .entry-content
      div[data-mce-style]
      .about-author
      .written-by
   a[name="comments"]</pre>
</li>
<li>Paragraphs in the correct .entry-content are (needlessly) wrapped in div[style="direction:rtl"], whereas the broken entry uses semantic p elements (and tables for embedded images). Nu. Anyway, the last p contains an <code>img.mceItemIframe</code>, and I&#8217;m guessing is right (near?) where things went south.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://decodecode.net/elitist/2011/12/fixing-layout-bug-in-hacked-arras/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accordion menu for WordPress</title>
		<link>http://decodecode.net/elitist/2011/11/accordion-menu-for-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=accordion-menu-for-wordpress</link>
		<comments>http://decodecode.net/elitist/2011/11/accordion-menu-for-wordpress/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 17:06:39 +0000</pubDate>
		<dc:creator>Ilan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://decodecode.net/elitist/?p=99</guid>
		<description><![CDATA[The navigation menu in our theme Lavender is in the sidebar, and in order to keep it above the fold, at least initially, we want to collapse the nested levels using an accordion effect. Requirements Hierarchical menu Only leaves are &#8230; <a href="http://decodecode.net/elitist/2011/11/accordion-menu-for-wordpress/">Continued <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The navigation menu in our theme Lavender is in the sidebar, and in order to keep it <a href="http://en.wikipedia.org/wiki/Above_the_fold">above the fold</a>, at least initially, we want to collapse the nested levels using an accordion effect.</p>
<h2>Requirements</h2>
<ol>
<li>Hierarchical menu</li>
<li>Only leaves are links</li>
<li>Link to pages, categories, or anything?</li>
<li>jQuery (WP&#8217;s?)</li>
</ol>
<h2>Searching for a WP plugin…</h2>
<ol>
<li>Super Slider: MooTools based.</li>
<li><a href="http://www.byscripts.info/scripts/javascript-dynamic-accordion-menu">BySlideMenu</a>:  MooTools, horizontal, images.</li>
<li><a href="http://wordpress.org/extend/plugins/accordion-image-menu/">Accordion Image Menu</a>: MooTools, images, with &#8220;lightbox&#8221; effect.</li>
<li><a href="http://wordpress.org/extend/plugins/tabbed-widgets/">Tabbed Widgets</a>: jQuery UI. Messed with it for quite a while — unintuitive. Makes &#8220;tabs&#8221; of other widgets in the widget area, but…</li>
</ol>
<h2>… Nevermind</h2>
<p>Can&#8217;t find a simple, usable plugin.I mean, there&#8217;s Accordion Menu, which only works with the Pages widget (hardcoded to li.widget_pages), limited to three levels, and the code looks convoluted. Foo?</p>
<p>But this ought to be trivial to hack with jQuery:</p>
<ol>
<li>Add a listener on clicks to list items;</li>
<li>Collapse everything initially (ie, on document ready);</li>
<li>Toggle visibility when clicked;</li>
<li>Use WP&#8217;s jQuery; make sure it&#8217;s inserted when the menu is rendered.</li>
</ol>
<h2>Implementation</h2>
<p>The DOM we expect:</p>
<pre>li#nav_menu-3.widget_nav_menu
   .menu-navigation-container
      ul#menu-navigation.menu
         li#menu-item-14.menu-item
            a "Foo"
            ul.sub-menu
               li#menu-item-10.menu-item
                  a "Bar"</pre>
<p>Algorithm for the event handler is now apparent: if the clicked anchor is followed by an unordered list sibling, toggle that UL&#8217;s visibility:</p>
<pre>function() {
	var sub = jQuery(this).next("ul");
	if (!sub.length)
		return true; //??? Is it necessary?
	if (sub.is(":hidden"))
		sub.slideDown();
	else
		sub.slideUp();
	return false;
}</pre>
<p>Now apply this handler to anchors in the menu:</p>
<pre>jQuery('ul#menu-navigation &gt; li.menu-item &gt; a').click(…);</pre>
<p>and run all this on document ready.</p>
<p>Oh, and collapse them initially:</p>
<pre>jQuery('ul#menu-navigation &gt; li.menu-item &gt; ul.sub-menu').hide();</pre>
]]></content:encoded>
			<wfw:commentRss>http://decodecode.net/elitist/2011/11/accordion-menu-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>URL rewriting in WP</title>
		<link>http://decodecode.net/elitist/2011/09/url-rewriting-in-wp/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=url-rewriting-in-wp</link>
		<comments>http://decodecode.net/elitist/2011/09/url-rewriting-in-wp/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 18:49:54 +0000</pubDate>
		<dc:creator>Ilan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://decodecode.net/elitist/?p=82</guid>
		<description><![CDATA[I hate Apache&#8217;s mod_rewrite! Trying to set up a dynamic page in WordPress. Need to capture requests of the form /dir/foo/bar/baz, where {foo,bar,baz} are optional. &#8220;dir&#8221; would be the slug of a page whose template generates dynamic content based on &#8230; <a href="http://decodecode.net/elitist/2011/09/url-rewriting-in-wp/">Continued <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I hate Apache&#8217;s <a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html">mod_rewrite</a>!</p>
<p>Trying to set up a dynamic page in WordPress. Need to capture requests of the form /dir/foo/bar/baz, where {foo,bar,baz} are optional. &#8220;dir&#8221; would be the slug of a page whose template generates dynamic content based on the… URI? Or query string?</p>
<p><span id="more-82"></span></p>
<p>Intuition didn&#8217;t seem to work, so debugging with phpinfo() (or Python&#8217;s cgi.test):</p>
<pre>RewriteEngine On
RewriteBase /tests/
RewriteRule ^dir/(.*)$ echo.php?$1 [QSA,L]
RewriteRule . echo.php [L]</pre>
<p>And echo.php:</p>
<pre>&lt;?
phpinfo(INFO_VARIABLES);</pre>
<p>results in:</p>
<ol>
<li>_SERVER["REQUEST_URI"]: /tests/foo?bar</li>
<li>_SERVER["REQUEST_URI"]: /tests/dir/foo/bar</li>
<ol>
<li>_SERVER["QUERY_STRING"]: foo/bar</li>
<li>_GET["foo/bar"]: no value</li>
</ol>
<li>_SERVER["REQUEST_URI"]: /tests/dir/foo/bar?may=be</li>
<ol>
<li>_SERVER["QUERY_STRING"]: foo/bar&amp;may=be</li>
<li>_GET["foo/bar"]: no value</li>
<li>_GET["may"]: be</li>
</ol>
</ol>
<p>And</p>
<pre>RewriteRule ^dir/(.*)$ echo.php?p=$1 [QSA,L]</pre>
<p>makes it easier to extract the path, ie: $_GET["p"] =&gt; &#8220;foo/bar&#8221;.</p>
<h2>But, WordPress?</h2>
<p>Letting it fall-through with</p>
<pre>RewriteRule ^dir/(.*)$ dir/?p=$1 [QSA]</pre>
<p>or rewriting to index.php, still gives &#8220;/tests/dir/foo/bar&#8221;, which I guess confuses WP.</p>
<p>Bah. Been going at it wrong: WP now has a <a href="http://codex.wordpress.org/Rewrite_API">built-in mechanism</a> for URL rewriting. Inserting:</p>
<pre>add_rewrite_rule("^dir/(.*)/$", "index.php?p=123&amp;bar=$matches[1]", "top");</pre>
<p>into theme&#8217;s functions.php does the trick. Except…</p>
<h2>Issues</h2>
<ol>
<li>Page&#8217;s ID, or slug?</li>
<li>Parse query string myself, or with WP&#8217;s &#8220;<a href="http://codex.wordpress.org/Rewrite_API/add_rewrite_tag">rewrite tags</a>&#8220;?</li>
<li>URL prefix hardcoded. Would be nice if WP could manage it, ie, redirect if page&#8217;s slug changed.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://decodecode.net/elitist/2011/09/url-rewriting-in-wp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>corpusifier.py</title>
		<link>http://decodecode.net/elitist/2011/09/corpusifier/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=corpusifier</link>
		<comments>http://decodecode.net/elitist/2011/09/corpusifier/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 21:22:48 +0000</pubDate>
		<dc:creator>Ilan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[J14]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://decodecode.net/elitist/?p=72</guid>
		<description><![CDATA[A script I&#8217;m writing to extract text from emails in a Gmail mailbox into a single plain text file. Python, IMAP… We&#8217;ll use it to record a corpus (hence the ugly name) for the 1,000 Tables event (1KT). Issues Extract &#8230; <a href="http://decodecode.net/elitist/2011/09/corpusifier/">Continued <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A script I&#8217;m writing to extract text from emails in a Gmail mailbox into a single plain text file. Python, <a href="http://blogs.oracle.com/chienr/entry/gmail_supports_imap_idle">IMAP</a>…</p>
<p>We&#8217;ll use it to record a corpus (hence the ugly name) for the <a href="http://facebook.com/1000tables">1,000 Tables</a> event (1KT).</p>
<h2>Issues</h2>
<ol>
<li>Extract how? IMAP, for efficiency, because we&#8217;ll want to scrape the mailbox repeatedly as 1KT unfolds. IMAP lets us download just the index and track which emails we&#8217;ve already read. <em>Many</em> will be accessing that mailbox, so can&#8217;t delete processed emails nor rely on Gmail&#8217;s POP3, I guess?</li>
<li>Avoid polling? To improve efficiency and reduce latency, we can use <a href="http://www.faqs.org/rfcs/rfc2177.html">IMAP IDLE</a>.</li>
</ol>
<p><span id="more-72"></span></p>
<h2>Resources</h2>
<p><a href="https://encrypted.google.com/search?q=gmail+imap+idle+python">Googling</a> produces lots:</p>
<ol>
<li>Bruno Renié wrote an excellent <a href="http://bruno.im/2010/jul/29/europython-talk-python-and-imap-protocol/">tutorial</a>.</li>
<li>Piers Lauder&#8217;s<a href="http://sydney.edu.au/engineering/it/%7Epiers/python/imaplib.html"> imaplib2</a> (<a href="http://rp-www.it.usyd.edu.au/%7Epiers/python/imaplib2">src</a>) encapsulates a threaded connection. Mostly compatible with Python&#8217;s standard library imaplib. Many methods optionally accept callbacks so can be non-blocking. The implementations below use this library.</li>
<li>Tim posted an <a href="http://blog.timstoop.nl/2009/03/11/python-imap-idle-with-imaplib2/">example script</a> using threading based on <a href="https://github.com/nicolas33/offlineimap">offlineimap</a>&#8216;s code. Chris Kirkham&#8217;s <a href="http://hmmtheresanidea.blogspot.com/2009/09/imap-push-gmail-python-script-for-mac.html">IMAPPush.py</a> is a  more complete client.</li>
<li><a href="http://pypi.python.org/pypi/IMAPClient/">IMAPClient</a>&#8216;s API is so much nicer than imaplib&#8217;s. Its idle_check method blocks (with a timeout)! No threading headaches.</li>
<li>
<div id="header">
<div id="headertitle">Michael Goerz explains how <a href="http://michaelgoerz.net/blog/2009/11/accessing-gmail-through-python/">Gmail uses labels</a>. What a mess.</div>
</div>
</li>
<li><em>Lots</em> more. I&#8217;ll add links later…</li>
</ol>
<h2>Solutions</h2>
<ol>
<li>Extract stuff (plain text, headers, etc) going over entire local mailbox, and outputting to single text file and CSV. Scrub the data while at it. Run this periodically, or ad lib.</li>
<li>Listen to new messages using IMAP IDLE. (Cheap and keeps us up-to-date.)</li>
<li>Clone Gmail mailbox in Maildir format, I guess, assuming this&#8217;ll avoid concurrency problems? (Expensive, so run once.) goerz-gmailbkp isn&#8217;t std Maildir. drewbuschhorn-gmail_imap and ProcImap all seem usable. Ended up using Ryan Tucker&#8217;s <a href="https://blog.hoopycat.com/2009/07/imap2maildir-a-tool-for-mirroring-imap">imap2maildir</a> v1.10.2 r20101018 (<a href="https://github.com/rtucker/imap2maildir">GitHub</a>): seems ready-to-use; uses Sqlite?</li>
</ol>
<h2><a href="http://docs.python.org/library/mailbox.html">mailbox</a> module</h2>
<ol>
<li>Testing imap2maildir: edited example config file and saved as imap2maildir.conf to local directory.</li>
<li>First attempt:
<pre>$ ./imap2maildir --verbose
...
imap2maildir: error: Directory '/home/head/Desktop/J14/1,000 Tables/tmp/rtucker-imap2maildir-02a0c05/test-maildir' exists, but it isn't a maildir.</pre>
<p>because sub-directories new, cur, and tmp didn&#8217;t exist, and needed to distinguish from an mbox (lines 418, 248).</li>
<li>And merging another mailbox into the same directory? Works. How?</li>
</ol>
<h2>Gmail quirks?</h2>
<ol>
<li>OK, rmdir, and again:
<pre>$ ./imap2maildir --verbose --create
...
Exception: folder [Gmail]/All Mail: [NONEXISTENT] Unknown Mailbox: [Gmail]/All Mail (Failure)</pre>
</li>
<li>Foo? Again:
<pre>$ ./imap2maildir --verbose --create --remote-folder="[Google Mail]/All Mail"
...
 NEW: {'uid': 1, 'envfrom': 'gmail-noreply@google.com', 'msgid': '&lt;6a78310c0978541290ffb9673b@mail.gmail.com&gt;', 'envdate': 'Sun, 6 Mar 2005 08:59:18 -0800', 'date': '06-Mar-2005 16:59:18 +0000', 'size': 4303}
...</pre>
</li>
</ol>
<h2>Incremental scraping</h2>
<ol>
<li>imap2maildir&#8217;s README says &#8220;incremental&#8221;, possibly because defaults to using SEARCH SEEN. So I guess I don&#8217;t need an IDLE script? At least not urgently?</li>
</ol>
<h2>Completeness</h2>
<p>Gmail says some 4,000 messages in mailbox, but downloaded only about 1,800? Ah, imap2maildir defaults to using <code>SEARCH SEEN</code> (by whom? check RFC); use <code>--search=all</code> instead.</p>
<h2>Scrubbing data</h2>
<p>…</p>
]]></content:encoded>
			<wfw:commentRss>http://decodecode.net/elitist/2011/09/corpusifier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: &#8220;Error saving media attachment&#8221;</title>
		<link>http://decodecode.net/elitist/2011/02/wordpress-error-saving-media-attachment/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-error-saving-media-attachment</link>
		<comments>http://decodecode.net/elitist/2011/02/wordpress-error-saving-media-attachment/#comments</comments>
		<pubDate>Sun, 20 Feb 2011 15:42:34 +0000</pubDate>
		<dc:creator>Ilan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://decodecode.net/elitist/?p=62</guid>
		<description><![CDATA[Stupid (useless) error message, ugly (complicated, inconsistent) code, horrible (noisy, and worse) programming language, and… why does it take forever to fix this silly problem? Countless threads, frustrated users, over years. Why? How does this happen? What should be done &#8230; <a href="http://decodecode.net/elitist/2011/02/wordpress-error-saving-media-attachment/">Continued <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Stupid (useless) error message, ugly (complicated, inconsistent) code, horrible (noisy, and worse) programming language, and… why does it take forever to fix this silly problem? Countless threads, frustrated users, over years. Why? How does this happen? What should be done to prevent/improve this?</p>
<p><a href="http://decodecode.net/nop/wordpress-error-saving-media-attachment">Notes towards…</a></p>
]]></content:encoded>
			<wfw:commentRss>http://decodecode.net/elitist/2011/02/wordpress-error-saving-media-attachment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile Web unconference</title>
		<link>http://decodecode.net/elitist/2011/01/mobile-web-unconference/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mobile-web-unconference</link>
		<comments>http://decodecode.net/elitist/2011/01/mobile-web-unconference/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 00:37:52 +0000</pubDate>
		<dc:creator>Ilan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FLOSS-IL]]></category>
		<category><![CDATA[mobile Web]]></category>

		<guid isPermaLink="false">http://decodecode.net/elitist/?p=46</guid>
		<description><![CDATA[Monday 2011-01-03 saw some 60 (mostly new) faces gather at The Hub Tel-Aviv for a Mobile Web unconference [also FB] orchestrated by Eyal. After his superb presentation on best practices we hacked on code and discussed project ideas in smaller &#8230; <a href="http://decodecode.net/elitist/2011/01/mobile-web-unconference/">Continued <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Monday 2011-01-03 saw some 60 (mostly new) faces gather at <a href="http://the-hub.co.il/">The Hub Tel-Aviv</a> for a <a href="http://www.w3c.org.il/event/מפגש-פיתוח-אפליקציות-ווב-למכשירים-ניידים">Mobile Web unconference</a> [also <a href="http://www.facebook.com/event.php?eid=170265806342938">FB</a>] orchestrated by Eyal. After his superb <a href="http://www.w3c.org.il/מצגת-שיטות-לפיתוח-אפליקציות-ווב-למכשירים-ניידים-על-פי-mobile-web-application-best-practices">presentation on best practices</a> we hacked on code and discussed project ideas in smaller groups. Was great! (Even <a href="http://frontend.co.il/notes-from-w3c-mobile-web-apps-meeting/">Ronny says</a>. ;o)</p>
<p>One group wrote a <a href="https://github.com/RonnyO/Really-Good-Jokes">funny</a> mobile Web app from scratch, complete with CSS3 animations, JavaScript, using interesting Web development and collaboration tools&#8230; all that jazz, and deployed it publicly!</p>
<p>My group (Nir, Oz, Uzi, Dima, Itay, Uri&#8230;) planned a study of jQuery related topics. Fascinating discussions, about everything, and, as usual, lots of buzzwords: <a href="http://www.jqtouch.com/">jQTouch</a>, <a href="http://zeptojs.com/">Zepto.js</a>, <a href="http://xuijs.com/">XUI</a>&#8230;</p>
<p><span id="more-46"></span></p>
<h2>Tasks</h2>
<p>Now, how do we proceed?</p>
<ol>
<li>Community development</li>
<li>Study projects</li>
</ol>
<h2>Resources</h2>
<ol>
<li>Event
<ol>
<li><a href="http://www.w3c.org.il/news/182">Conference conclusion</a></li>
<li><a href="http://j.mp/awesomemobile">Conference organization &#8220;Wiki&#8221; on Google Docs</a></li>
</ol>
</li>
<li>jQuery &amp; mobile Web
<ol>
<li><a href="http://www.delicious.com/search?p=jquery+mobile">Search for Delicious bookmarks</a>: ~2,500 results.</li>
</ol>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://decodecode.net/elitist/2011/01/mobile-web-unconference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tel-Aviv Perl Mongers tag soup</title>
		<link>http://decodecode.net/elitist/2010/12/tel-aviv-perl-mongers-tag-soup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tel-aviv-perl-mongers-tag-soup</link>
		<comments>http://decodecode.net/elitist/2010/12/tel-aviv-perl-mongers-tag-soup/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 00:57:39 +0000</pubDate>
		<dc:creator>Ilan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FLOSS-IL]]></category>

		<guid isPermaLink="false">http://decodecode.net/elitist/?p=40</guid>
		<description><![CDATA[Tel Aviv Perl Mongers today was even worse (than PyWeb): a bunch of geniuses, mind blowing, I don&#8217;t dare repeat the soup of abstract concepts, design patterns, and black humor&#8230; Way too much fun. I&#8217;ve a hunch these guys can &#8230; <a href="http://decodecode.net/elitist/2010/12/tel-aviv-perl-mongers-tag-soup/">Continued <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://telaviv.pm.org/">Tel Aviv Perl Mongers</a> today was even worse (than PyWeb): a bunch of geniuses, mind blowing, I don&#8217;t dare repeat the soup of abstract concepts, design patterns, and black humor&#8230; Way too much fun.</p>
<p>I&#8217;ve a hunch these guys can maybe answer, at last, questions that are haunting me about evolution and adoption of software technologies &#8212; the human and especially social factors. I promised a presentation about Web frameworks for next month&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://decodecode.net/elitist/2010/12/tel-aviv-perl-mongers-tag-soup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PyWeb-IL #22 tag cloud</title>
		<link>http://decodecode.net/elitist/2010/12/pyweb-il-22-tag-cloud/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pyweb-il-22-tag-cloud</link>
		<comments>http://decodecode.net/elitist/2010/12/pyweb-il-22-tag-cloud/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 17:25:19 +0000</pubDate>
		<dc:creator>Ilan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FLOSS-IL]]></category>

		<guid isPermaLink="false">http://decodecode.net/elitist/?p=35</guid>
		<description><![CDATA[PyWeb-IL today was, as usual, exhilarating. Stormy arguments about a mind boggling torrent of buzzwords: eco-systems, Django, WordPress, migrations, South, Flask, Dancer, Rails, Ruby, DSLs, Pylons, concurrency, Twisted, Node.js, ExtJS, jQuery, DOM manipulation vs UI platform, (py)bidi, mobile, canvas, Bespin, &#8230; <a href="http://decodecode.net/elitist/2010/12/pyweb-il-22-tag-cloud/">Continued <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://groups.google.com/group/pyweb-il/">PyWeb-IL</a> today was, as usual, exhilarating.</p>
<p>Stormy arguments about a mind boggling torrent of buzzwords: eco-systems, Django, <a href="http://www.testking.com/techking/infographics/the-power-of-wordpress-infographic/">WordPress</a>, migrations, South, Flask, Dancer, Rails, Ruby, DSLs, Pylons, concurrency, Twisted, Node.js, ExtJS, jQuery, DOM manipulation vs UI platform, (py)bidi, mobile, canvas, Bespin, Wave, Haskell vs PHP, phpBB, PostNuke, git, Fabric, Buildout, deployment, provisioning, WebFaction, VPS, Open Wonderland, semantic Web, HAML vs client-side templating, nonrel vs SQL, MongoDB, CouchDB, persistence, stored procedures, Delphi.., Sencha Touch. </p>
<p>My latest obsession: how come <a href="http://wordpress.org/support/topic/what-should-2011-hold-for-wordpress">WordPress</a> is so insanely successful and based on such a rotten foundation?</p>
]]></content:encoded>
			<wfw:commentRss>http://decodecode.net/elitist/2010/12/pyweb-il-22-tag-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

