From: Jeff D. <da...@da...> - 2000-07-14 22:38:32
|
In message <Pin...@bo...>,Steve Wa instead writes: >On Fri, 14 Jul 2000, Arno Hollosi wrote: > >> Hm, I don't think using special fields within the ZIP is a good idea. >> That way, if someone should touch the ZIP for whatever reason, that >> data will be lost. I suggest using an extra file, or a meta-file for every >> page-file. > >I didn't catch this before, but now I do, and I agree with Arno.. the less >we rely on proprietary solutions the better. I'd rather hack a loader to >read two files per page that suffer Jeff with mucking with Zip files too >much. It hides the information from the user as well (a separate metadata >file can be edited in a text editor, can be cat'd, grep'd and so on). >Putting it in the Zip file means it's almost human-inaccessible. Yes, I see your point --- however php-serialized() meta-data is basically human-inaccessible anyway. I don't see much point in making the meta-data more easily accessible unless it's in some human-friendly format. So, I think we'd need to come up with some sort of metadata file format (XML comes to mind, but as lots of PHP's don't have XML support compiled in, something simpler is probably called for.) An Internet-messageish format might work well, for example: ---Snip--- Author: 12.34.56.78 Version: 23 Flags: 0 Lastmodified: 2000-07-14T21:39:08Z Created: 2000-07-02T12:01:22Z !!!Sample Page Here's the page contents, with a WikiLink. ---Snip--- (If we're devising our own metadata format, I see no reason to separate the metadata and file content into two separate files.) Is this a good idea? Is it worth the effort? (Actually it's probably not that much effort...) Also, what's the thinking about whether we should include all the archived versions of a page (rather than just the most recent) in the ZIP? I.e.: do we want to be able to: 1) Make a snapshot of the complete state of the database (all versions of all pages)? 2) Make a snapshot of the current state of the Wiki (most recent version of all pages)? 3) Have the option to do either 1 or 2? If you chose 2 or 3, a secondary question is: what are the semantics of "restoring" from a type 2 snapshot? Some choices: A) Wipe the entire wiki, reinitialize from the snapshot. o Archived pages are lost. B) Essentially edit each page in the wiki so that it coincides with the page in the snapshot: o Resulting page version number won't necessarily agree with snapshot. o Lastmodified date should probably be set to time of restore, rather than the time in the snapshot. o Current (pre-restore) version of the page gets archived? Jeff PS In other news: the bug bit me, so I've started working on a modularized, OOPified version of wiki_transform and GeneratePage() (a la Arno's suggestions). When I get it to where I'm happy with it I'll post it here for comments before CVSing it. |