Difference between revisions of "Metadata"

From openZIM
Jump to navigation Jump to search
(+ add mandatory/optional)
Line 5: Line 5:
== Keys ==
== Keys ==
{|{{Prettytable}}
{|{{Prettytable}}
! Key         !! Description !! Example
! Key     !! Mandatory    !! Description !! Example
|-
|-
! Title
! Title
| yes
| title of zim file
| title of zim file
| ''English Wikipedia''
| ''English Wikipedia''
|-
|-
! Creator
! Creator
| yes
| creator of the ZIM file
| creator of the ZIM file
| ''English speaking Wikipedia contributors''
| ''English speaking Wikipedia contributors''
|-
|-
! Date
! Date
| yes
| create date (ISO - YYYY-MM-DD)
| create date (ISO - YYYY-MM-DD)
| ''2009-11-21''
| ''2009-11-21''
|-
|-
! Description  
! Description  
| yes
| description of content
| description of content
| ''This ZIM file contains all articles (without images) from the english Wikipedia by 2009-11-10.''
| ''This ZIM file contains all articles (without images) from the english Wikipedia by 2009-11-10.''
|-
|-
! Language
! Language
| yes
| [http://www.sil.org/iso639-3/codes.asp ISO639-3 language identifier]
| [http://www.sil.org/iso639-3/codes.asp ISO639-3 language identifier]
| ''eng''
| ''eng''
|-
|-
! Relation
! Relation
| no
| URI of external related ressources
| URI of external related ressources
|  
|  
|-
|-
! Source
! Source
| no
| URI of the original source
| URI of the original source
| ''http://en.wikipedia.org/''
| ''http://en.wikipedia.org/''
|}
|}


see also [http://dublincore.org/documents/dces/]
== Favicon ==
 
A favicon (48x48) is also mandatory and should be located at /-/favicon
 
== See also ==
* [http://dublincore.org/documents/dces/ Dublin Core]

Revision as of 11:17, 7 July 2011

In order to provide a description to each ZIM file that can be easily extracted we defined a special namespace M and a standardized set of keywords that should be used.

Every key is defined like an article, the key name is used as the article name, the key value is put into the article text. This way also metadata is compressed, but extendable. Further keys could be used in a ZIM file without breaking the standard but please be aware that maybe the openZIM project will define additional keys in the future. Any ZIM library reading this metadata should ignore missing keys / values and just return NULL values in such cases.

Keys

Key Mandatory Description Example
Title yes title of zim file English Wikipedia
Creator yes creator of the ZIM file English speaking Wikipedia contributors
Date yes create date (ISO - YYYY-MM-DD) 2009-11-21
Description yes description of content This ZIM file contains all articles (without images) from the english Wikipedia by 2009-11-10.
Language yes ISO639-3 language identifier eng
Relation no URI of external related ressources
Source no URI of the original source http://en.wikipedia.org/

Favicon

A favicon (48x48) is also mandatory and should be located at /-/favicon

See also