On 23/01/2012 19:44, Christian Pühringer wrote:
I am not sure whether I fully understand your proposal: Is your idea to save the information on mime-type level instead of on namespace level?
Yes, because we have not namespaces for all type of content, we can not offer this garanty, and maybe apps needs to get this information on mime-type level and not on namespace level.
(Redirects have a special mime-type, therefore - as desired - they would not be included in the numbers). Is there a potential issue for mime-type based, that non-article entries may have the same mime-type as article entries? (e.g. can image text be html?)
Everything can happen, if the ZIM editor/software is not well coded. With my script, I decide on my own which mime-type has each content (article, image, ...).
I do not see any issue, the only point is that if you want to get the number of all images articles (for example), you will need to code somewhere the code which know that make a sum of image/jpeg ; image/gif ; image/png are all image mime-type... ans so one. I think this could be done in the zimlib.
If this is not a real issue, storing mime-type fine for me, but it would be also fine if count is stored on namespace level (that is, entries in one namespace which are not redirects).
Benefit of storing on metadata-level is that articles which are not text or image can be handled, disadvantage is that it is more complex for the application. (Therefore I'd prefer if it is implemented in zimlib)
Yes.
Where do you want to store the mime-type count information? As metadata or something else?
I would propose a new Metadata entry called for example "Counter" http://openzim.org/Metadata
The value would be a string looking like that: image/jpeg=5;image/gif=3;image/png=2...
Emmanuel