Re: filename under thumbnail

Carlos Puchol <[email protected]> Fri, 15 Nov 2002 03:31:32 -0800
Newsgroups gmane.comp.web.cthumb.devel
Message-ID <[email protected]>
Uri Elias <[email protected]> wrote:
> I think it would be useful possibilty to generate automatically
> the filename as the text under each thumbnail.  For example, the
> negatives are numbered 01, ..., 36,  the files are 01.tiff, etc
> and I would like this to be the text, for later identification.
> 
> Or is this possible now, and I missed it?

hi, this is a good idea.

it is possible now. somewhat.  if you have a bunch of pictures,
say, 01.tiff, 02.tiff, ... 27.tiff, if you do this:

	cthumb -c *.tiff > my-album.cthumb
	cthumb my-album.cthum

the new album will contain the names of the files as the cations.
however, it will include the .tiff also, which is not pretty.
what i do is use vi or emacs and a few keystrokes later i am
all set.

what i wanted to do was to allow some way to configure it.

the first step, before that, would be to make the code
remove, say anything following a dot until the end of the
name, i.e. /(.*)\.[^.]*$/ and then pick $1 instead of the whole name.

also, something that would be a big time saver would be to convert
underlines (i.e. '_') to spaces), so that:

	My_Beautiful_Home.jpg

would become

	My Beautiful Home

i know it would save a lot of time for me, because my brother sends me
a lot of pictures with the underscores. also, they come numerated some
times, like:

	01-My_Beautiful_Home.jpg

so, basically we would have some pattern to match and also some function
to apply to the file name.


-c


-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html