December 31, 2007

html2pml

I was tired of converting all my HTML ebooks to rtf, then to pdb using Palm Doc Converter only to lose all the nice touches like bold, italics and headings. Since there didn't seem to be a HTML to PML converter for OS X, I wrote one to get more practice in python.

html2pml.py will convert basic HTML file to a PML file suitable for use with DropBook to be converted into a proper Palm ebook. I must stress the basic part - it only does stylistic conversions at the moment. I have no need for tables or links, so I didn't write them in. It does however do what I want - preserve bold and italic attributes, headings, and also translates some non-ascii characters into PML Extended Character Set, and to plain ascii where not possible.

This small python script is released under GPLv2, license is attached. If you find it useful, need more features, or have comments/suggestions, let me know!

Cheers,

Steve

December 30, 2007

Hugin Preview Tip

When setting the field of view in Hugin via the preview window, the restitch and remap of the images takes a fair bit of time when the panorama consists of many high resolution images. This can make the process of finding an acceptable FOV frustrating. One way to speed up this process is to disable all images except for those at the boundary. This way each update involves relatively few images and you get more responsive feedback.

For example, if the panorama is a long strip, then you only need to enable the image at the start and the end of the strip.

Cheers,

Steve

December 28, 2007

ars technica reports that the Rudd Government is going to scrap Human Services Access Card, the national ID card in disguise.

Voting for Rudd was definitly the right choice.

Cheers,

Steve

December 24, 2007

Fitting A Round Peg Into A Square Hole

The Australian Government is busy fitting an outdated concept into the modern world - they want to censor the Internet the same way TV and movies are censored. The Communications Legislation Amendment (Content Service) Act 2007 (Content Service Act) was passed on 20th of July 2007. This Act inserts a new schedule for regulating all content services delivered via carriage services. This includes:

4. Providers of hosting services, live content services, link services and commercial content services to have in place access restrictions if providing R18+ and commercial MA15+ content;

5. ‘take down’, ‘service cessation’ and ‘link deletion’ notices to remove content or access to content that is the subject of a complaint; and

6. A co-regulatory approach that provides for the development of industry codes to address issues including the classification of content, procedures for handling complaints about content and increasing awareness of potential safety issues associated with the use of content services.

I would like to draw attention to point 4, which suffers a severe departure from reality and shows that the legislators behind this Act is out of touch with the modern world.

Firstly, in order for Internet Service Providers (ISP) to determine of R18+ or MA15+ content is being accessed via their network, they would need to monitor in real time the activities of its customers, which is a severe violation of customer privacy.

Secondly, ISPs would need a system which can classify terabytes of information, in a hundred different formats and languages in real time. There are two major problems:

1. To create such a system would require breakthroughs in image processing, computer linguistics, voice recognition, expert systems, communication and many other fields. It is not to say it can’t be done - it certainly can be done, but at great expense and almost certainly not in the immediate future.

2. Such a system would be rendered impotent by encryption.

Encryption is Achilles’ heel of this and similar legislations. Encryption allows two parties to securely exchange information i.e. between a website and a web browser. Against encryption even the most sophisticated monitoring systems will fail because they can not access the information being exchanged. There is no way for an ISP to know if the encrypted information they are carrying is R18+ or G rated.

Sure one can block communication based on its point of origin, but there is at the last count more than 108 million websites. The cost of setting up a new website in terms of cost and time is minimal - web hosting and domain name registration costs less than 10usd per month, in others words peanuts. I sincerely hope the futility of doing this is evident. Further the origin of information is no guarantee as to its content. Such a blacklist will inevitably render many innocent websites inaccessible.

Before any one points to the Great Firewall of China as a triumphant example of Internet censorship done right, please consider for a moment the kind of country China is. There is a reason China is one of the two lowest ranking countries in Privacy International’s 2006 International Privacy Ranking, and amongst the Top 20 offenders in The Observer’s Human Right Index 2000.

The Australian Government needs realise that the Internet is a vastly differently beast compared to traditional media. It is the preverbal square hole to the round peg of censorship. Traditional media can be censored relatively easily because its distribution is bounded by location - that is to say the points of distribution, i.e. cinemas, stores, and radio towers, are all on Australian soil and operated by Australian companies. This makes it easy to enforce Australian law and to censor material. New media on the other hand is delivered over the Internet, and has no such limitations. Anyone, either an individual or an organisation, can distribute any material they wish to anyone in the world over the Internet encrypted if needed. In short, Australian law can not be applied to distributors of new media outside Australia, and there is no way determine the nature of encrypted content in order to censor it.

There are of course more problems with this new legislation. One is the requirement to restrict access to contents based on a person’s age. The Government seem not to have learnt from its failure to enforce such restrictions on traditional media. How exactly they hope to achieve it with new media has not been made public - they have only made it known they want it to be so. Perhaps they will require you to present 100 points of ID to a Government representative to purchase a Government approved computer with which to access the Internet, then get council approval of your new “Internet Room” which is shielded from electromagnetic and audio eavesdropping, locked to your fingerprint and retina. It is to protect the children you see.

All in all, the new legislation and the Australian Communication and Media Authority’s new rules are a nothing more than unrealistic wish lists. Wishing for something however doesn’t make it true.

Am I worried about the Government’s attempt at censoring the Internet? No at all. I am quietly confident that it will fail. I am worried what this will cost the Australian people, and whether its inevitable failure will be used as justification to pass more draconian laws all in the name of “protecting the children”.

Cheers,

Steve

December 13, 2007

Computing Oddities

Two strange and weird things happened to me recently. One is my /dev/null disappearing from leopard!

A large number of programs, both Cocoa and *nix relies on /dev/null being present. As you can see I could not gain root privileges, and thus could not recreate /dev/null (character device, 3,2). I had to in the end reboot and /dev/null was recreated.

Second strange thing is when I created a self-signed certificate for use with apache2 (for anonshare). I created it with openssl specifying 36500 for -days. The result is an certificate with expiration date in the past!

I am not aware of any X.509 specification regarding the number of days a certificate can be valid for, so I wonder - is this a bug in openssl?

Cheers,

Steve

December 10, 2007

Note Taking with Palm TX

I have a palm TX which is my indispensable companion. It handily beats my old ipaq4150 for reliability, battery life, utility and style. One thing which I have found to be difficult in using boths palms and pocketpcs, is note taking naturally by treating the stylus and pda as pen and paper.

I have tried diddlebug, the builtin note pad, and a variety of the other programs. None of which really worked well. Primarily these are limited by the lack of screen estate, which meant you either write in tiny script (hard on a pda), or quickly run out of horizontal space. Even with the new landscape mode of the TX there still wasn't enough horizontal space

Today I came up on pennovate notes. It allows you to treat your pda's screen as if it is a small window onto a large piece of paper. That is when you "write" towards the right past a certain point, and lift your stylus up, its intelliscroll feature kicks in and automagically scroll to the right for you, so you can keep writing! The result is a note taking style as close to real pen and paper as I have yet experienced. It is in a word, brilliant.

Best yet, they have a lite edition, which is perfect for a poor student like myself.

Cheers,

Steve

Enough said, no?

Cheers,

Steve