Jetpack subscribers: Terribly sorry about the test posts! Disabling, please use Feedburner to subscribe instead

As it turns out, Jetpack Comments does not pay close attention to what domain the updates are coming from or to the jetpack_is_post_mailable filter that it’s supposed to be paying attention to.

Sorry for the flood of test posts. I guess this is my embarrassing blog mistake for the year. Gotta have one.

Anyway, we’re going to go back to using Feedburner for e-mail notifications of new blog posts. Since the Jetpack subscriptions list includes a bucketload of spam followers and a handful of e-mail addresses that look like they belong to real people, I probably shouldn’t just resubscribe everyone. You will need to manually subscribe to http://feeds.sachachua.com/sachac . Here is the e-mail subscription form for your convenience:

Enter your email address: Delivered by FeedBurner

That is, if you can find it in your heart (and mailbox) to forgive me.

Thanks to Raymond Zeitler for tactfully pointing out the problem, although I still feel terrible about it.

Also, if you prefer weekly or monthly updates, we can do that too. So at least that’s something.

Sketchnotes from WordCamp Developers Toronto 2012 Day 2 #wcto

From Wireframe to WordPress Theme in 10 Minutes – Sam Xu

20121104 WordCamp Toronto Developers - From Wireframe to WordPress Theme in 10 Minutes - Sam Xu

WordPress for a Large Site – Brandon Hill

20121104 WordCamp Toronto Developers - WordPress for a Large Site - Brandon Hill

Mobile Apps in WordPress Version 2.0 – Trevor Mills

20121104 WordCamp Toronto Developers - Mobile Apps in WordPress Version 2.0 - Trevor Mills

If you like this, check out the sketchnotes from Day 1 of WordCamp Developers Toronto 2012, or see my other sketchnotes! Search Twitter for #wcto to see what people have been saying about WordCamp Toronto, or check out the conference site for more updates and slide decks.

Sketchnotes: WordCamp Developers Toronto 2012 Day 1 (#wcto)

UPDATE 2012-12-10: Now with links to slides!

Quick notes from WordCamp Developers Toronto 2012 Day 1. Enjoy! Click on the images to view a larger version. Please feel free to share them! © 2012 Sacha Chua, Creative Commons Attribution Licence

Creating Your First Plugin the Easy Way, Christopher Ross

20121103 wordcamp toronto1

Slides

Intro to the Template Hierarchy, Al Davis

20121103 wordcamp toronto2

Slides

User Centricity in WordPress Design, Taylor Dewey

20121103 wordcamp toronto3

Slides

Panel: Building a WordPress Development Business – Shannon Smith, Tom Auger, Brent Kobayashi, Dale Mugford, Trevor Mills, Marko Heijnen

20121103 wordcamp toronto4

Unconference: Women in WordPress – Hosted by Shannon Smith

20121103 wordcamp toronto unconference women in wordpress

WP Theme Frameworks: Speed Up Your Development Process, Chad Mohr

20121103 wordcamp toronto5

If you like these, check out:

Sketchnotes: WordCamp Toronto 2012 (End users) – Day 1

Summarizing my WordPress posts using XSLT; 2008 as a PDF

It’s the time of the year for annual updates. I was thinking of reviewing all the blog posts I’d written this year. My weekly and monthly posts are incomplete, though, and I want to make sure I cover everything. I also know a few people who are slowly working their way through my archives. So I thought I’d export all of my posts from 2008 into something that people can read with fewer clicks.

If you want to skip past all the geek details, you can get the files here: 2008 blog (4.6 MB, 307 pages(!)), 2008 mostly nongeek entries (3.8 MB, 195 pages).

After some tinkering around with wptex and other modules that are supposed to make this easier, I gave up and decided to do it myself. I toyed with the idea of writing a short Ruby program that either parsed the XML or read the database, but I eventually ended up taking it as an excuse to learn XSLT, a language for transforming XML. WordPress can export posts and comments as XML. After I scrubbed my WordPress of spam and raised my PHP execution times, I downloaded the XML file and started figuring out how to get it into the form I wanted: a document organized by month, with a table of contents listing all the posts.

Here’s the main stylesheet I used:

 <xsl:stylesheet version="1.0"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:content="http://purl.org/rss/1.0/modules/content/"
                 xmlns:wp="http://wordpress.org/export/1.0/">
   <xsl:output method="html"/>
   <xsl:template match="/">
     <html><body>
       <h0>January 2008</h0>
       <xsl:apply-templates select="/rss/channel/item[contains(pubDate, 'Jan 2008') and wp:status='publish']"/>
       <h0>February 2008</h0>
       <xsl:apply-templates select="/rss/channel/item[contains(pubDate, 'Feb 2008') and wp:status='publish']"/>
       <h0>March 2008</h0>
       <xsl:apply-templates select="/rss/channel/item[contains(pubDate, 'Mar 2008') and wp:status='publish']"/>
       <h0>April 2008</h0>
       <xsl:apply-templates select="/rss/channel/item[contains(pubDate, 'Apr 2008') and wp:status='publish']"/>
       <h0>May 2008</h0>
       <xsl:apply-templates select="/rss/channel/item[contains(pubDate, 'May 2008') and wp:status='publish']"/>
       <h0>June 2008</h0>
       <xsl:apply-templates select="/rss/channel/item[contains(pubDate, 'Jun 2008') and wp:status='publish']"/>
       <h0>July 2008</h0>
       <xsl:apply-templates select="/rss/channel/item[contains(pubDate, 'Jul 2008') and wp:status='publish']"/>
       <h0>August 2008</h0>
       <xsl:apply-templates select="/rss/channel/item[contains(pubDate, 'Aug 2008') and wp:status='publish']"/>
       <h0>September 2008</h0>
       <xsl:apply-templates select="/rss/channel/item[contains(pubDate, 'Sep 2008') and wp:status='publish']"/>
       <h0>October 2008</h0>
       <xsl:apply-templates select="/rss/channel/item[contains(pubDate, 'Oct 2008') and wp:status='publish']"/>
       <h0>November 2008</h0>
       <xsl:apply-templates select="/rss/channel/item[contains(pubDate, 'Nov 2008') and wp:status='publish']"/>
       <h0>December 2008</h0>
       <xsl:apply-templates select="/rss/channel/item[contains(pubDate, 'Dec 2008') and wp:status='publish']"/>
   </body></html>
   </xsl:template>
   <xsl:template match="//item">
     <h1><a>
       <xsl:attribute name="href">
         <xsl:value-of select="link"/>
       </xsl:attribute>
       <xsl:value-of select="title"/></a></h1>
     <div class="link"><xsl:value-of select="link"/></div>
     <div class="date"><xsl:value-of select="pubDate"/></div>
     <div class="content">
       <xsl:value-of select="content:encoded" disable-output-escaping="yes" />
     </div>
   </xsl:template>
 </xsl:stylesheet>

For the non-geek version, I replaced the template with:

   <xsl:template match="//item">
     <xsl:if test="not(category[@nicename='emacs']) and not(category[@nicename='drupal']) and not(category[@nicename='geek'])">
     <h1><a>
       <xsl:attribute name="href">
         <xsl:value-of select="link"/>
       </xsl:attribute>
       <xsl:value-of select="title"/></a></h1>
     <div class="link"><xsl:value-of select="link"/></div>
     <div class="date"><xsl:value-of select="pubDate"/></div>
     <div class="content">
       <xsl:value-of select="content:encoded" disable-output-escaping="yes" />
     </div>
     </xsl:if>
   </xsl:template>

I didn’t want to figure out how to demote all the headings in my blog posts (I have a few), so I used <h0> as my root element. I used xsltproc to transform the XML file I got from WordPress. Then I adjusted all the headings with the following bit of Emacs Lisp:

 (defun sacha/demote-all-headings ()
  (interactive)
   (while (re-search-forward "</?h\\([1-7]\\)>" nil t)
    (replace-match (number-to-string (1+ (string-to-number (match-string 1)))) nil t nil 1)))

It’s all held together with bubblegum and string, really.

2008 blog (4.6 MB, 307 pages(!)), 2008 mostly nongeek entries (3.8 MB, 195 pages)

I haven’t looked at these files much yet – I just scrolled through them quickly. No, don’t worry, I’m not going to send my 2008 update as 307 pages in the mail. ;) But it’s there so that we can flip through it or you borrow the code, and someday I’ll even figure out how to format the output neatly and everything.

Next step: I need to read all of that and highlight a couple of things that made my year.

(307 pages! Wow.)

WordPress and lifestreaming – check out my draft firehose interface

Inspired by WordCamp Toronto (and the Flutter plugin in particular), I decided to spend some time figuring out if I could use WordPress as a tumblelog/lifestream without overwhelming people and while still making my regular blog posts easy to find. I also wanted to bring in some of the weekly and daily planning that I do. Here’s what I have so far:

Draft firehose interface

It’s currently running off categories of posts that are excluded from the default RSS feed and from index.php. I’m half-tempted to make it run off files instead, because I can very easily rsync those from my computer… and that will probably end up involving Emacs. ;) That would be pretty sweet, wouldn’t it?

… or a blosxom instance that feeds RSS into WordPress…

… or an Org/Planner export that feeds RSS into WordPress…

Oh, the possibilities.

What do you think? I’m planning to offer several interfaces to my blog. Firehose might become the default interface (there’ll be a mainpost-summary version for people who like scanning and a main-post full version for people who hate clicking). There could be a traditional reverse-chronological everything view and an almost-everything view (excludes tidbits). There could also be an explore view full of random posts and “On This Day” goodness. And maybe another view for people coming in from search engines…

What do you think? What would make it easier for you to browse?

Web 2.0 @ Work: Creating a professional profile

Do you have a professional website, or do you just leave your professional profile up to random Internet search results or sparse corporate directory listings?

Although we have a terrific centralized corporate directory at IBM, I’ve found it very useful to also have a simple professional profile with a short biography, my contact information, and links to the other services I use on the intranet and on the Internet. Having one site that brings all of these things together makes it easier for me to help people get to know who I am, what I’m passionate about, and where they can find out more about me. I include this URL in my e-mail signature and in my presentations so that people can find me easily.

I use WordPress as a content management system so that I can quickly add links and pages without editing HTML. On my internal site, I use the Blueprint theme for WordPress. It’s clean and easy to read, and it fits with Big Blue’s color scheme. The front page explains who I am, what I do, and what my team does. It also links to places where people can check out my bookmarks, download my latest presentations, and so on.

To set up something like it:

  1. Download and install WordPress.
  2. Download and unpack the Blueprint theme to your wp-content/themes/ directory.
  3. Choose the Blueprint theme from the WordPress administration interface.
  4. Create a page called “About”. Fill it in with details about yourself.
  5. Set the About page as your site’s front page in the Settings – Reading menu.
  6. Create links to your profiles on other services and other related websites.