The Accidental Rubyist

invalid byte sequence in UTF-8

Automatic hyperlinking to wikipedia and others using ecto scripting

leave a comment »

Ecto is a feature-rich desktop blogging client for Mac OS X and Windows, supporting a wide range of weblog systems, such as Drupal. It allows me to plug-in my own scripts writing in programming languages such as ruby, perl, Bash and i suppose python also.

This feature allows for some nifty stuff such as filtering the blog contents.

Lets link to a google search for our favorite blogging client now

The above text was hyperlinked using the script “inter” (source) based on how the interwiki module of drupal works. The input text was as follows:

[[w:ecto|Ecto]] is a feature-rich desktop blogging client for [[w:Mac OS X]] and Windows, supporting a wide range of weblog systems, such as [[http:drupal.org|Drupal]]. It allows me to plug-in my own scripts writing in [[w:programming languages]] such as [[w:ruby]], [[w:perl]], [[w:bash|Bash]] and i suppose [[w:python]] also.

This feature allows for some [[dict:nifty]] stuff such as filtering the blog contents.

[[w:ecto|Ecto]] inserts a hyperlink to wikipedia with ecto as the parameter, and Ecto as the display text of the hyperlink. On the other hand, [[w:ecto]] would use “ecto” both as parameter and display text.

Other current options are:

g: for google search

dict: for a m-w.com dictionary search

th: thesaurus.reference.com

http: a link

One can add more to the ruby script which does this replacement.

I shall try to post the ruby script in the next post. But cannot guarantee since blogsome is messing up code.

Advertisements

Written by totalrecall

February 28, 2007 at 10:34 pm

Posted in ecto, Mac OS X, ruby

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: