Julian's posterous

« Back to blog

Testing Writerous

Buttercuppedfield_thumb1

Scott Lovegrove (@scottisafool on Twitter) is a Windows Live Writer fan and he's been working on a plug-in for it called Writerous that will publish a blog post to Posterous. He's got it ready for beta, and since I also am a Live Writer fan and have a blog on Posterous, I begged him for a spot on his beta team. Several used fivers changed hands, and I'm in. Since Posterous requires you to email a post to get it published, I'm interested to see how Writerous gets around it.

This is my first post using this new plug-in, and so I'd better check a few things...

First, a gratuitous photo of fields in Muker, North Yorkshire, this June:

And now some gratuitous C# code using my own personal code plug-in for WLW. This'll make the whole system sweat:

private void AddCalendarBody(StringBuilder sb) {
      sb.AppendLine("<tbody>");

      // a month calendar has a maximum of 6 rows, 42 cells
      string[] days = new string[42];

      int firstEntry = (int)new DateTime(year, month, 1).DayOfWeek;
      int lastDay = DateTime.DaysInMonth(year, month);
      int day = 1;
      for (int i = firstEntry; i < firstEntry + lastDay; i++) {
        string dayLink = OnGenerateDayLink(day);
        if (string.IsNullOrEmpty(dayLink))
          dayLink = DayNumbers[day];
        days[i] = dayLink;
        day++;
      }

      // there will always be at least 4 rows
      int cdn = 0;
      for (int i = 0; i < 4; i++) {
        cdn = AddCalendarRow(sb, days, cdn);
      }
      // rows 5 and 6 may or may not be there
      if (!string.IsNullOrEmpty(days[cdn])) {
        cdn = AddCalendarRow(sb, days, cdn);
        if (!string.IsNullOrEmpty(days[cdn])) {
          cdn = AddCalendarRow(sb, days, cdn);
        }
      }

      sb.AppendLine("</tbody>");
    }

I shall also add a category (posterous) and a couple of tags (writerous, plug-in). We'll see what happens to them. OK, ready? Here goes... <clicks Publish>

Album cover for OutsideNow playing:
Bowie, David - Wishful Beginnings
(from Outside)