February 2006 Archives

Pretend to be a clean perl installation.

| No Comments | No TrackBacks
The following code snippet could be used in the script to pretend a clean-installed environment. (Oops, MacOSX built-in perl only)
no lib qw(/Library/Perl/5.8.6
          /Library/Perl
          /Library/Perl/5.8.1
          /Network/Library/Perl/5.8.6
          /Network/Library/Perl
          /Network/Library/Perl/5.8.6
          /System/Library/Perl/Extras/5.8.6
          /System/Library/Perl/Extras/
        );

rename-to-ascii.p6

| No Comments | No TrackBacks
Another script rename-to-ascii.p6 to do me a little flavor. It helps to rename a file using only alphanumeric ascii characters. Similar to what Blogger.com does on article URI.

The intension of this is that I am a Chinese speaker but I do not or cannot input Chinese in some circumstance, under which I can only rename the file first.

Besides, it's a perl6 script, you need to install pugs to run it. No particular powerful perl6 operator is used, perl5 regex are used alot on the other hand.

Released under Artistic License.

bulk-upload-to-typo.pl

| No Comments | No TrackBacks

This script bulk-upload-to-typo.pl could help you upload many files to a typo server. It uses CPAN Module WWW::Mechanize. Usage is documented in the script, please use perldoc program or simply read it in an editor.

<@fxxxx> 邪惡的gugod

Translate: evil gugod

Since it's commentted to be evil, I'm going to calim: USERS OF THIS PROGREAM USE IT AT HIS/HER OWN RISK. I HAVE NO RESPONSIBILITY OF ANY POSSIBLE OUTCOME.

In fact, if you just grab and run the script without even reading it. I have to say that you have the guts. :-p

Released under Artistic License

b5unzip.pl

| No Comments | No TrackBacks

Occasionally I received zip files containing big5 encoded filenames, and Finder totally failed to extracts it correctly:

Screenshot of Messy Filename

This is how it looks like after using Finder to extract a zip file containing big5 encoded filenames.

And I write a script to solve this issue: b5unzip.pl. It is a single-purpose script that only converts big5 filenames to utf8, and then extract it. It is under Artistic License

One more blog.

| No Comments | No TrackBacks
Nex

Powered by Typo, a blog system build on rails.