[Bins] number in filenames

Jérôme SAUTRET jerome at sautret.org
Sat Mar 1 22:03:14 GMT 2003


On Sun, Feb 23, 2003 at 05:53:50PM +0000, Chris Croome wrote:
> > >   http://album.sautret.org/300_lieux/500_Paris/IMG_4175_Pt.jpg.1.html
> > >                                                                ^
> > >                                                                |
> > > What is this digit for? ---------------------------------------/
> > 
> > Can anybody find a usage for this number ? :-)
> 
> If not I'd like to see it removed, I think it would be neater
> without it...  

Testing the cleanupgallery.pl script, I think I've found a case where
it can be useful :

Think of when, you have two different images with the same name but
different types in the source directory, like img.jpg and img.tiff. In
this case, the second one will be converted to img.jpg and they will
both have the same name in th dest dir. In this case, this famous
number is useful.

But for this to work, the number must be added to the dest image
filename too. But adding a number on all images filenames to handle
only this case is perhaps not elegant. I can also specifically test
for this case (i.e. look for homonym in the current source dir) when
creating the dest image name, but this is longer to code and the first
solution is really simple and works in all cases...

Does anybody see a solution simple _and_ elegant ? ;-)

-- 
Jérôme SAUTRET (Jerome at SAUTRET.org)           http://SAUTRET.org
Key 0x95D463F3 fingerprint 3B69 3B60 4D32 B8DF 2BF3 8035 5036 D41A 95D4 63F3



More information about the Bins mailing list