Archive for the ‘Script Day’ Category

Script day – manually find a thumbnail for a video

In a vain effort to fuel my blog with some content ( 😉 ) I’ll try to get into the habit of posting some throw-away scripts I’m writing for my personal use (at work and at home). Hopefully some people would find them interesting, or maybe – god forbid – useful.

Today we have a script that will help you pick out a nice thumbnail for a movie file – this is useful when setting up movie galleries and stuff. Of course it can be done automatically (most gallery software that support video files has automatic thumbnail extraction) but they rarely choose the best shot. The script here below would extract 100 frames from the first 30 seconds of a movie file and display them using an image browser. The script would also open a file browser window – the user will then pick the desired thumbnail image and drop it into the file browser, and then close the image browser. The script would then complete the process by naming the selected thumbnail image to be the same name as the original movie (with a different extension of course).

(more…)

JavaScript Date Format

I took the time to implement some sorely missed functionality in the JavaScript core objects – Date is missing simple date formatting to text string. While the Date object can parse arbitrary textual descriptions of dates and times as input, it can only output textual description with a fixed “locale” template.

I’ve looked up on the web and there are some utilities that achieve this simple operation, but most of them are overly complex and some people even have the nerve to charge for this very simple code !
(more…)

My first ruby script is coming along nicely

Among other things, thanks to the nice folks at #ruby-lang.

Ruby has some really nice schticks. A few of the things I currently love about ruby:
(more…)