ecto
desktop blogging
endo
total aggregation
1001
flickr accessory

Welcome

Mon, 2008-03-31

The x-blogpost: URL scheme

 

Starting with ecto version 3b41 you can refer to drafts with an URL scheme, which looks like, for example:

x-blogpost://6449f44a102fde848669bdd9eb6b76fa@ff4d5bd026cb03f18a557ba2b651722b

The URL has two components separated by an '@' sign. The first one is the MD5 of the draft's identifier and the second is the MD5 of the account this draft belongs to. You can use either 'x-blogpost:' or 'x-blogpost://', although the latter works better with Safari.

To create a URL reference to a draft, the easiest way is to drag and drop an item from the main window's list of drafts into an editing area. This works in TextEdit as well, for example. Clicking a x-blogpost: URL will open the corresponding draft in ecto.

UPDATE: After discussion with ecto users and Daniel Jalkut from Red Sweater, the plan is to use x-blogpost: (instead of my original draft:) to avoid possible collisions and to allow for use by other blog clients as an unofficial standard.

You can get the URL via AppleScript as well. Example:

tell application "ecto"
  set account_list to accounts whose name is "foo.com"
  set a to first item of account_list
  properties of a
  set blogs_list to blogs of a
  set b to first item of blogs_list
  properties of b
  tell b
    set entry_list to entries of b
    set e to first item of entry_list
    tell e
      get href
    end tell
  end tell
end tell
Sat, 2008-01-19

Fun with AppleScript

 

If you have Assistive Devices turned on in System Preferences, you can do this silly thing in AppleScript:

activate application "ecto"
tell application "System Events"
  tell process "ecto"
    tell menu bar 1
      tell menu bar item 2
        tell menu 1
          tell menu item 3
            tell menu 1
              tell menu item 3
                click
              end tell
            end tell
          end tell
        end tell
      end tell
    end tell
  end tell
end tell
Mon, 2008-01-14

Time-travelling

 

You're a blogger and you're hanging out in Tokyo. You have 3 blogs, each in the US. All your blogs are set to GMT-7, but your Mac is in GMT+8. What is the best way to configure ecto?

It all depends on what systems powers your blogs. I've written before about how desktop blog clients talk to blog systems. It's all about sending text formatted as XML over simple HTTP. There's a specific way to format dates so both blog system and blog client can read it, the ISO8601 format. For example, 2008-01-12T13:09Z gives date and time (separated by a 'T'). The 'Z' suffix means that the date is in GMT.

The Atom publishing protocol gets this right. It requires that dates sent and received specify the timezone. There's no need to configure ecto as it knows Atom is a good boy. The problem is with XML-RPC. It does not have that requirement, and each blog system interprets dates differently.

The cheap way out for a blog client to talk to a blog system using XML-RPC is not to specify a date so that the blog system will use the current date and time. That does not always work. When sending an edit of an already published blog post the date will reset to current. In addition, sometimes the user may want to specify a different date for a post. In those cases, the lack of timezone information in the XML transferred can lead to unwanted time offsets.

Some blog systems, like MovableType, parse ISO8601 dates with the Z suffix correctly, but still return dates without a timezone specification. In those cases, ecto needs to be told what timezone the blog is in. WordPress, on the other hand, has a custom field for GMT dates, so does not need special handling.

I ran into trouble with TextPattern, though, and have not been able to work around it elegantly. I looked in the xmlrpc.php file of TextPattern and it not only ignores the timezone suffix of the received date (in this case, 'Z'), it also adjusts the date by the offset of the blog's timezone from GMT. If the server hosting TextPattern is set to a different timezone, that offset is also included. The only work-around is to send dates without a GMT specification and ignore any errors ecto pops up about mismatched dates. It's an issue for TextPattern to fix.