Happy Independence Day!

To all my friends Stateside, happy 4th of July.

To everyone else: Enjoy the extra bandwidth on WoW as Americans play outside for once.

Posted in General | Tagged , | Comments closed

John Scalzi was Right

Was taken by this quote:

And while we’re agreeing with John Scalzi, let’s also note that yes, honestly, the attitudes of the “big three” toward electronic submission really have, over the last decade, gone from “practical response to unsolved problems of electronic mail and text” to “old man yelling at clouds.”

But the rest of the post is interesting, if you’re interested in publishing or science fiction.

Posted in General, links | Tagged | Comments closed

HOWTO: configure MarsEdit or TextMate’s Blogging Bundle to work with Drupal

If you use third-party blogging software (such as MarsEdit), you may have some trouble configuring that client to work out of the box with Drupal.

See, Drupal 6.12 comes with the handy “Blog API” module: it gives your Drupal site an XML-RPC interface. In english, that means that you can post content to a Drupal-based website using client software such as TextMate and MarsEdit. This is nice.

So, assuming http://example.com/ is your drupal install, you can feed an URL of http://example.com/xmlrpc.php to MarsEdit, and happily post and edit content to Drupal. And bunnies and squirrels will dance around the meadow in joy and fling flowers in the air.

Yes.

Well.

In theory, there should be no difference between theory and practice. In practice, there will be.

HOWTO: make Drupal work with MarsEdit

MarsEdit is pretty easy to set up, but there’s one minor hiccup, caused by a bug in Drupal’s blogAPI module. Here’s a quick run through the setup process:

Let’s add your blog to MarsEdit. Select New Weblog... from the File menu. A friendly window appears: “Tell us about your weblog”. Go ahead and plug in the base URL of your drupal site. If the autodiscovery bug I mentioned has not been patched, then you will get a dialog that says, in effect, “I am a stupid computer and cannot figure this out, so you will have to do it for me”. If you don’t get this message, then the bug has been fixed. Hooray!

Otherwise click Edit Settings and you will be presented with a dialog box like the following:

Screen capture of MarsEdit dialog box

I’ve selected most of the (likely) correct options in this box, but notice the field labeled Blog ID: (helpfully highlighted above). This is where you have to check your settings in Drupal, because you have to choose the type of content you will be submitting via your client.

Drupal allows the definition and creation of different content types. You get to them via the administrative menu, under Administer > Content management > Content types. (This should have the path of http://example.com/admin/content/types in your browser address bar.)

For example, you can see that my site currently has two content types: blog and page:

Screen capture of drupal config showing the blog and page content types

You’ll notice that the blog type has the Name Blog Entry, and the Type blog.

The type is your Blog ID for MarsEdit.

If you want to create pages of that type with MarsEdit, you want to put blog in to the field marked Blog ID. If you created a custom content type named Wiki Notes with the type wiki, and you want to post those notes using MarsEdit, you want to enter wiki in that field.

And that should work.

Hooray.

HOWTO: make Drupal work with TextMate

The TextMate Blogging Bundle provides a sparse (but pleasant to use) interface for the creation and editing of blog entries directly inside the text editor. I’m using it right now to compose this post.

Sadly, when I tried to access the drupal blogAPI from it, Drupal threw an error: Blog API module is not configured to support the 0 content type

Hmm.

Okay, so content type is basically the blog_id in XML-RPC terms. So I guessed that TextMate wasn’t specifying the blog ID, and was passing the default value (which I know from past, painful experience is 0). So I had to configure TextMate to specify that blog ID value somewhere. But where?

The TextMate Blogging Bundle invokes a ruby script, [$TM_BUNDLE_PATH]/lib/blogging.rb, which parses a file called com.macromates.textmate.blogging.txt. Here, with URLs obfuscated, is mine:

  # List of Blogs
  #
  # Enter a blog name followed by the endpoint URL
  #
  # Blog Name         URL
  Paper Bits          http://some_path_to_wordpress_stuff
  Drupal Blog         http://www.example.com/xmlrpc.php#blog

See that bit on the end of the Drupal Blog line? The #blog? That’s where the magic lives.

Translation: To get TextMate working with Drupal’s blogAPI module, put a #typename at the end of the XML-RPC URL.

If your content type is wiki, then you want http://www.example.com/xmlrpc.php#wiki under URL.

And that’s it.

What’s happening here?

In case you care, I found this by digging into the [$TM_BUNDLE_PATH]/lib/metaweblog.rb and [$TM_BUNDLE_PATH]/lib/blogging.rb scripts.

In metaweblog.rb the methods all require a blog_id to be passed along with the method call. An example:

  def get_recent_posts(blog_id, username, password, number)
    call("metaWeblog.getRecentPosts", "#{blog_id}", "#{username}", "#{password}", number)
  end

Okay, so, let’s do a search in blogging.rb for the variable blog_id. We find a method called parse_endpoint which features the following:

  def parse_endpoint
    # we have an endpoint that looks like a URL
    [...]
    # guess the mode based on the endpoint path
    [...]

    if @endpoint =~ /#(.+)/
      @blog_id = $1
    else
      @blog_id = "0"
    end
  end

Aha. That’s a regular expression. It’s looking for #something at the end of the URL, and setting that as blog_id. And if it doesn’t? It sets “0″. Which is the offending element from my rogue error message.

So, I made a guess, and it worked.

Hot damn.

Moral of the story

This post began as a plea for help to the lazyweb. I had solved the MarsEdit problem (it was a simple matter of a single Google search), but couldn’t manage to get TextMate running.

In order to write this post, I had to explain my problem with TextMate in a clear and concise manner to an educated but unfamiliar audience. Which meant thinking along lines like, “well, they’re probably going to ask me if I looked to see if TextMate submits a blog ID like MarsEdit. I wonder where that would be kept?”

Eventually, I solved my own problem.

I hope that the next time someone else has the same problem, the great Google technical support repository pops this article up for them, and saves them some time and pain. If that’s you, then excellent.

If you’re still having trouble, try writing an email to the smartest person you know. You might end up solving it yourself.

Good luck.

Posted in General | Tagged , , , , | Comments closed

Matt Jones - The New Negroponte Switch

The new Negroponte switch

[T]he technologies of rapid fabrication and pervasive networks are allowing the tangible and intangible to switch places and mingle.

The above quote is from this slide deck from Matt Jones, which you will read now.

Really. Go:

Posted in Photo Cards | Tagged , , , | Comments closed

Stuff on my desk…


Stuff on my desk…, originally uploaded by jazzmasterson.

Playing with automatic post-to-blog from my camera.

The eye-fi is just a bit clumsy when it comes to posting here…

Posted in General | Comments closed

Woodchucks need not apply

I just unearthed a digest from the Internet Oracle while digging through some old text files. Turns out, the oracle still exists. Who knew?

From the digest:

Date: Fri, 24 Jan 97 16:59:10 -0500  
From: Internet Oracle <oracle-vote@cs.indiana.edu>  
Subject: Internet Oracularity #881-09  

Selected-By: Scott Forbes <trans@lucent.com>

The Internet Oracle has pondered your question deeply.
Your question was:

> Oracle, knower or all, master of the internet, please elucidate:
>  
> What is the best way to catch microfiche?

And in response, thus spake the Oracle:

} In a neural net.  
}  
} You owe the Oracle some sea monkeys.

(drumsting)

Warning: Rose-colored glasses may be required to view this content properly.

Posted in General | Tagged | Comments closed

Quote: Richard W. Pew, 10/05/2005

“Design is the successive application of constraints until only a unique product is left.”

From The Design of Everyday Things, by Don Norman.

I’m pulling my notebook out of storage, so that I can store it in a way that’s easier to access.

Without access to large walls with homosote mounted on them, the card notebook is moving into a library card catalog tray. And it’s going online, as well.

For now, I’m going to be uploading the photos here to Flickr using the Eye-Fi chip in my camera, and blogging some of them to this blog.

More interesting things may follow, but for now, I’m spending a lot of time looking back through a massive sketchbook that’s been shuffled into chaos. So that’s where I am, if anyone wonders.

Posted in General | Comments closed

Who Watches the Watchman?

Christopher Fahey:

From a behavioral perspective, I find the watchclock fascinating not simply because it’s a kind of steampunk GPS, a wind-up mechanical location-awareness technology. I’m further fascinated at how this holistic system of watchclocks, keys, guards, and supervisors succeeded so completely in creating a method of behavioral control such that a human being’s movements can be precisely planned and executed, hour after hour and night after night, with such a high degree of reliability that almost a century goes by before anyone thinks of ways of improving the system as originally conceived. The watchclock is a primitive form of technology-mediated interaction design and narrowly-focused social engineering: The “interface” is the whole system: The watchclock, keys, and paper records.

Posted in links | Tagged , | Comments closed

Rands In Repose: Keynote Kung-fu Two

Rands:

The rule is: if you’re starting a presentation by endlessly fussing with your presentation design, you probably don’t have anything to say.

Also see: Keynote Kung-Fu.

Posted in links | Tagged , | Comments closed

Hivelogic - ExpressionEngine: The Details

Dan Benjamin:

The Path is not difficult for those who have no preferences.

Letting go of how you believe things should be is the hardest part of learning.

Posted in links | Tagged , , , | Comments closed
  • Flickr photostream

    Rorschach

    Rorschach

    Rorschach

    The new Negroponte switch

    Stuff on my desk…