Blog clients

September 11, 2006

I’ve been spending some of this afternoon looking for a blogging client for WordPress. Some of the ones I’ve looked at: –

  • jblogclient. Doesn’t have a build.xml, pom.xml, make file or a README.html in the source root. Not encouraging. Found something else that works whilst mucking around trying to work out how to build it.
  • BloGTK! (Author’s emphasis). What can I say about this software? Nothing – it doesn’t even load up in Debian etch. Wouldn’t be a solution for the whole group anyway, being GNOME specific.
  • Drivel. This might possibly work – it does at least load up. Doesn’t give poor idiots like myself much help in working out the correct URL for posting to wordpress. Also not a strong candidate for a group standard package because of linux dependency.
  • Performancing. OK, so why didn’t I go for the firefox plugin first? It works, hurrah! Also gives you some help with setting up new accounts. Time to put it through it’s paces with some formatted code…

Here’s some Java (from jblogeditor): –

public static String removeOuterDiv(String content) {
//Use the dirty way. Remove all possible divs.
String start = "";
String end = "";
String newContent = content;

while (true) {
newContent = newContent.trim();

if (newContent.startsWith(start) && newContent.endsWith(end)) {
newContent = newContent.substring(start.length());
newContent = newContent.substring(0, newContent.length() - end.length());
}
else {
break;
}
}

return newContent;
}

OK, not bad, no spurious line breaks inserted. [Update – it didn’t get this right – some line breaks were lost. Could have been a problem with my cut-paste though. More experimentation required]. To really break things, some unescaped xml: –

org.hsqldb.jdbcDriver
jdbc:hsqldb:hsql://localhost
sa

3
org.hibernate.dialect.HSQLDialect
thread
org.hibernate.cache.NoCacheProvider
true
create

Yes, I think value-of is probably about as good as I expected there. Ho hum, perhaps we could write an add-on that does nice things with xml fragments? Come to think of it, some java colouring would be pretty sweet as well.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: