Hi,

On Thu, 2008-01-17 at 20:52 +0200, Aurimas Juška wrote:

> I don't see any disaster. Here is one possible solution: store some
> sort of checksum (let's say, MD5) together with filename in the
> database.

MD5 checksums are a nice idea. I think I will incorporate that for the
implementation of tagged resources.

My current favorite approach is to put the tags into files in the
~/.gimp-2.x directory, one file per resource type. So there would be a
brushrc, gradientrc, patternrc and so on. These files will contain
metadata from the actual resource files. At some point they will have
enough metadata to actually skip loading the resource file until it is
actually used. That way we can avoid the need to load all resource files
at startup.

As a first step the implementation will concentrate on tags. So for now
all that goes into the file per resource is

 - filename, either absolute or relative to ${gimp_dir}
 - MD5 sum for recovery
 - list of tags

If a resource file with tags is lost (i.e. it doesn't exist under the
filename any longer), the filename will be removed but the MD5 sum and
tags will be kept. When the user adds new resource files, their MD5 sums
are compared to the checksums of the entries without filename and tags
are recovered from there. This is not perfect, but it should work quite
well. The only drawback is that if you remove files, their tags will be
kept around forever. But I guess we can live with that. The lost entries
can be kept at the bottom of the tags file so they can be easily
discarded manually. At some point we might even add a user interface for
this.

Does this make sense or did I forget something important?


Sven


_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Reply via email to