lj2mail

With this script I will terrorize my friends from today onwards. What it does is get all the recent posts from some LiveJournal blog and email them as separate messages to a list of recepients. Subject of the blog entry is used as a subject of the email. Body of the message contains of text and the permalink.

In order to use, first configure few simple variables at the beginning of the script, providing LJ credentials, list of recepients, address to use in the From: field and a file to keep the timestamp of the last syncronization.

Changes: in this version I have fixed encoding fo the body and subject. Body can now be recoded with Text::Iconv module to any encoding from the default UTF-8. Subjects are additionally fixed to be base64-encoded.

lj2mail.pl

Continue reading lj2mail

Open Text Summarizer

I stumbled upon an interesting tool – Open Text Summarizer. It is a small utility which reads provided text, analyzes it, decides what is important and gives it out either in text, or in HTML as highlighted text. Surprisingly, it works pretty well. I have tried it on a couple of blog items and articles. And good news are that this tool is a part of Fedora distribution. Check it out.

Run it as /usr/bin/ots somefile.txt. If you don’t have it installed, than apt-get install ots.

In fact, it is so good that I might incorporate it into my email client for all incoming English languaged messages. Leaving just 5% of the original message, highlights just a single sentence with all the essence of the letter. /usr/bin/ots -r 5 email.txt for that.

timestamp_image

This is yet another script to deal with images from digital cameras. It will scale (resize preserving the width to height ratio) down the image to the size you’ve specified and annotate (write on top of the image) it with date time taken from EXIF header of the image. Font face, size and color are configurable. Modified images will be saved with different name (as specified by the prefix variable inside the script).

This script is written in perl. It works with Image::Magick module and jhead program (since Image:EXIF failed to compile on my machine).

timestamp_image.pl

dump_photos

I am using dump_photos.pl script to copy (or move) images from my Canon EOS 300D to my computer. Canon’s in-camera filesystem is not very convenient to copy files manually, because images are distributed across a number of folders (100 images per folder thing). Canon original software is for Windows only and is way too complicated and slow for such an easy task.

My script uses standard Perl modules (Getopt::Long, File::Copy, and POSIX) to copy or move files to specified or default (date-based) directory. It also mounts the Compact Flash before processing images, and umounts it after everything is done. It also uses jhead to optionally rotate images based on the information in EXIF header.

Run “dump_photos.pl –help” for a list of options. Although it was tested only with my Digital Rebel, I think it should work fine with most of Canon cameras.

dump_photos.pl