Scheme syntax in eclipse

A simple and quick post. In order to have scheme syntax hilight in eclipse you can easily install the schemeway plugin.


[Script-Fu] case sensitive file-glob

Let’s talk again about script-fu. file-glob is a beautiful function that retrieve all the files within a specified directory with the specified pattern. But if you have to deal with case sensitive file system, soon or late you’ll bump in the problem that *.jpg is different from *.JPG.

In order to solve this it’s enough to think about regular expression. Yes, it seems that file-glob make use of regular expression for file pattern matching. So if you, for example, have a patter like /home/edivad/img/*.jpg and want a case insensitive matching you can use a pattern like /home/edivad/img/*.[jJ][pP][gG].

[Script-Fu] portfolio

I did it again. For the photo training I’m attempting to, I need to show at the final year test a portfolio for the reportage subject.

I have to show 30 photos paged in a portfolio. So in order to speed up the pagination work, I did a gimp script.

This will process the opened image and generate a new file with the paginated photo and a caption.

Here is the code; pdf as usual damn wordpress.

Again, I’m not proof in script-fu so if you encounter something wrong or that can be done better, use the comments 🙂

[Script-Fu] webify

Finally I entered also the Script-Fu world. For the photography school I’m attempting I had to deliver to my teacher about 350 photos. posting them i JPG full resolution would have been raving. So I though to my self, why don’t learn a bit of script-fu and do a script for Gimp that will convert a directory of JPG into others JPG of smalles size?

I know I could have searched for something already done but I wouldn’t have learned Script-Fu/scheme.

This is my first script. I surely have not followed conventions and surely it could have been done better. Maybe there will be a time when I will improve it. For now it’s it and it’s working for my tasks.

The script will take a single JPG or all JPGs in a Directory, resize it to a custom size (by long image side), default 800px, convert it to 72dpi and save it with a different name. Leave a color version or a quick conversion to grayscale. This last one is useful in order to have a look for an entire set if it looks better in color or B&W.

However here is the source code (pdf) to copy and paste into an scm file.