weblogger.el Enhanced !

September 20, 2007

Hooray !

After a few hours struggling with parenthesises, I finally managed to patch weblogger.el and xml-rpc.el to have those critical missing functionalities.

Now the default is to post as “Draft” when i use C-c C-n or C-c C-p so i can just prepare some text and save it for later. Changing publish state should be done explicitly with C-x C-s which calls the weblogger-publish-entry function, for not changing it C-c C-c.
Note that i said changing the published state, because at least on WordPress it switches from Draft to Published but also from Published to Draft with C-x C-s … i am unsure about the behaviour of other APIs.

I will have to do some work on this latter this week end …

Most importantly is the support for categories. It now display the categories in the header as “Keywords:” which you can set to one or many as a “, ” separated list. For example this post is “Keywords: Emacs, intarweb”.
The only thing i don’t see how to implement right now is auto-completion for the category names. Perhaps an emacs guru could have a look …

Another *minor* issue is that the API doesn’t provide any way to create new categories, which means that i *will* have to go on that slow web interface just for that. But how often do i need to change my categories anyway ?

Finally, on the would-be-nice list are clickable links in the header that open the preview page or post page. The URL is there, it just lack some hook in Emacs. Then attachment processing … the API seems to support it.

I also thought of markup support, but i guess it should just be installed in the blog site, processing “markup X” to HTML to “markup X” seems to be the perfect way to invoke Cthulhu bugs. So i would rather have mmm-mode support and use Emacs HTML capabilities.
I found that i almost don’t need HTML, at least on WordPress and for “just text” posts, because it formats paragraphs nicely without P tags.

This time the files are uploaded in my Emacs Hacks page.

Happy blogging !


KBlogger and Emacs weblogger

September 14, 2007

Last week I found that even WordPress was difficult to access from my home, especially the web interface … so I decided to start looking for a blog software.

Being a KDE user I naturally went to kde-apps and found KBlogger. This application is a Kicker applet which appears as a big “Blog” button.
Setting it up was not too difficult but I had to find out that the URL of the blog is not enough, it needs to be pointed to xmlrpc.php.

In term of features it offers:

  • fetching categories
  • fetching your post for edit or deletion
  • posting as draft or published

Unfortunately I couldn’t stand with:

  • the “Blog” button takes too much room in my task-bar
  • have to right click to have the list of posts .. then wait will it downloads from the server
  • there is no caching
  • if I press ESC in a dialog it cannot re-open any dialog, I have to remove and add the applet again
  • no spell checking (Qt spell checking is said to mess with the output)

Also since I just started to get along with Emacs, finally, I decided I would give at chance too. So I downloaded weblogger from savannah and applied to patches from emacswiki.

Unlike other Emacs features, this one was very easy to setup. The documentation on Emacs Wiki gives you the one or two commands you need and in 2 minutes I had all my entries fetched in Emacs.
So compared to KBlogger, it is very fast because it caches the posts and it supports Emacs spell checking. Since I am always in Emacs anyway writing a Blog post is just a shortcut away. It also makes posting code snippets or writing as you are coding very easy.

Unfortunately it doesn’t support categories yet, and attachments didn’t work …

Also the version I had didn’t work with WordPress very well, it could not upload the edited posts. I tracked down the issue to the format of the post date. Looks like WordPress is expecting a dateTime.iso8601 but receiving a string, a quick hack later and everything works as expected.

If I have time, I might just look into the category feature. It should not be too difficult anyway.

PS: I’ve attached the patched files. They include the patches from EmacsWiki that were needed, plus my own: dateTime format, and i escape strings in CDATA rather than url encoding (at first I thought the problem came from url encoding).

patched xml-rpc.el

patched weblogger.el


The Great Firewall of China

September 13, 2007

Coincidentally there was an article today on Science Blog about the Great Firewall. So yes like I said yesterday their Firewall is not really effective. But is that surprising considering the amount of resources that would be needed for a reliable censorship ?First a quick reminder on how it is supposed to work:

China takes a different approach by filtering Web content for specific keywords and selectively blocking Web pages [...] when the Chinese system detects a banned word in data traveling across the network, it sends a series of three “reset” commands to both the source and the destination.

And this works in a protocol agnostic way, so it may reset your DNS request, HTTP session, etc …

Because it filters ideas rather than specific Web sites, keyword filtering stops people from using proxy servers or “mirror” Web sites to evade censorship.

Encrypted content can’t be filtered, that’s why I previously mentioned Tor which has been “omitted” from the blacklist. Now it would not be that hard to filter the Tor network and web site, but just like Google Reader, they are missing the obvious.

But because it is not completely effective all the time, it probably acts partly by encouraging self-censorship, Barr said. When users within China see that certain words, ideas and concepts are blocked most of the time, they might assume that they should avoid those topics.

I suppose the average Chinese will use a Chinese search engine anyway (Baidu is very famous here) which will have its own politically correct “filters”, and even Google is complying with Chinese censorship … or trying.

In fact the networks in China so reliable that I guess the Chinese hitting a “banned” word would just assume that something went wrong with its connection. Getting a “timeout” error is quiet common, and it is not like they redirect you to a page with flashing warnings.

Overall the Great Firewall is just a source of frustration and lost time. Especially when it get overzealous on blocking content you want to access on a daily basis (like developer blogs for example). It is like having a 5cm wall on your way to work, you may trip on it if you don’t pay attention, but it is barely preventing you to do anything. (another analogy would be the lake wall in the Simpson movie, but i can’t get a pic right now).


Hello ze Intarweb!

September 12, 2007

I finally found the motivation to open a blog so I can share my rants with the world. And this first post is actually a good place to start ranting about … blogs … and China.

I’ve chosen WordPress not because I think it is superior to other blog platforms, but simply because i know it will be accessible from “inside” China without having to use Tor …

I would have chosen Google Blogger since i already use many Google applications, but blogs hosted on blogspot.com are Firewalled® (but not the site http://www.blogspot.com).

Ironically Google Reader makes my life a lot easier by fetching the RSS Feeds of all those dissident web sites (a lot of KDE developers do not suspect they are political threats) from behind the “Great Firewall of China”©.

Or maybe those who hacked the Pentagon cannot implement a proper censorship…


Follow

Get every new post delivered to your Inbox.