Re: Breaking changes in file layout
Johannes Zarl-Zierl <[email protected]> Tue, 07 Apr 2020 23:25:11 +0200
| Newsgroups | gmane.comp.kde.kimdaba |
|---|---|
| Message-ID | <1823982.nHmrohZYhG@mani> |
Am Dienstag, 7. April 2020, 10:25:55 CEST schrieb Tobias Leupold: > How about a completely different approach? > > What about giving the collection a name? When it's created, a name is added > (and stored in index.xml), the default one is the directory name in which > index.xml resides. And we refer to the collection using this name, which > then has be unique. We can keep a list of used collections in ~/.whatever. This seems like an interesting approach. I think I'll have to think this through for potential ramifications. > Why don't we create something like an uuid, place it into index.xml and > refer to the data using it? For scripting, it's clear where the data > points, and one can extract the id before querying something. And it would > be robust considering path changes. I guess the default value for the collectionId seems like an implementation detail. So from an implementation point of view there really is no difference between a unique name and a uuid. I concur, though: uuid are better as default value in this proposal. > Let's simply have a new block called "<metadata>" or such and add > "<collectionId>whatever</collectionId>". Or maybe better "<meta > name='collectionId' value='whatever'/>". Or such. For such an integral value, this should really be in the root node: <KPhotoAlbum version="8" compressed="1" collectionId="05461613- f3ff-4d03-953a-718b7347b749"> or: <KPhotoAlbum version="8" compressed="1" collectionId="Pictures"> > Another proposal: If we do breaking changes to all this, maybe we should > move all files we create in one subdirectory of the collection. I > personally would create a directory called "KPhotoAlbumData" or such, and > let everything happen inside. This way, it's clear for the user that > everything inside this directory is KPA-generated and everything outside is > not. > > What do you think? Apart from the camel-case name I see no reason not to do this. I'd call it ".kphotoalbum-data". My initial thought right now was "but index.xml should remain at the current location", but the more I think about it the less sure I am. Thoughts? Johannes