[Clipart] storing hashes

Greg Steffensen greg.steffensen at gmail.com
Wed Aug 17 10:42:15 PDT 2005


I'm working on the OCAL interface for Inkscape, and am wondering if a 
specific addition to the DMS api would be possible to accomodate it. When I 
proposed implementing this thing, multiple people suggested that I make it 
easy for the interface to access clipart repositories other than OCAL 
proper, including some kind of shared system repository at 
/usr/share/clipart (on Linux). In brief, I implemented this by having the 
interface search a given list of repositories in sequence, and if a 
particular image is available from more than one repository, its retrieved 
only from the first repository on the list (this is supposed to be vaguely 
analagous to the multi-tiered caching systems processors use to access 
memory). 

This requires some way to identify images uniquely though, so that 
duplicates can be detected, and for lack of a better alternative, I'm using 
the md5 hash of the svg xml contents. I have this working correctly for a 
local repository as described above, but would like to know if the eventual 
SOAP (or whatever) api intended for programmatic access could return, in 
addition to a list of image ids of some sort, their hashes. I've made this 
optional in the interface... if a repository doesn't return hashes, then 
whatever images it finds are just retrieved. Of course, I could calculate 
the md5 hashes dynamically after retrieval to prevent duplicates from being 
displayed, but that would still waste OCAL's bandwidth and the user's time. 
So I'm wondering if this scheme seems reasonable, and whether OCAL could 
support it. Any ideas?

Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/clipart/attachments/20050817/070af7ed/attachment.html>


More information about the clipart mailing list