[Clipart] Namespace conflicts on the filenames.

Bryce Harrington bryce at bryceharrington.com
Sun Jan 2 10:36:29 PST 2005

On Sun, 2 Jan 2005, Nicu Buculei wrote:
> Jonadab the Unsightly One wrote:
> > Compare:
> > http://openclipart.org/clipart/education/books/open_book_01.svg
> > http://openclipart.org/incoming/open_book_01.svg
> > 
> > These are clearly NOT the same image.
> > 
> > When I wrote the upload script, I attempted to forestall this by doing
> > a filetest to see if the name has been used and, if so, incrementing
> > the number on the end of the name.  However, this only works as long
> > as the files are still in incoming -- with the previous files being
> > moved out of incoming (or incoming being moved and a new one created)
> > each release, this precaution is no longer effective.
> another way to receive unwanted duplicates is inside tarballs - this 
> make harder to compare filenames
> > How can we track what filenames have been used, across releases?
> > A special directory of zero-size files perhaps?  Some other way?
> how about generating *unique* file names? for example adding to the 
> initial file names some letters from author name and some random (or not 
> random, say incremental) string.
> example: my snowman.svg become nb_snowman_1024579.svg. it may be enough 
> to title the file 1024579_snowman.svg

Oh, cool.  This is one function that dms does already now.  Each
incoming image is given a unique id number.

Even though a lot of functionality for dms is still tbd, it *does* at
least do this.  :-)  I can set up a copy of dms on the site within the
next week or so, that'll do this.  I can also give the perl code to
perform the id generation function by checking in the file.  

For now you can ignore the fact that it checks in the file itself too,
and only use the generated unique ID for now.  This will be a good first
step for integrating dms into the existing scripts; I've been wondering
how we'd start doing that.


More information about the clipart mailing list