Difference between revisions of "Tags"

From openZIM
Jump to navigation Jump to search
(→‎Private Tags: + service workers)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Tags are text slugs stored in the <code>Tags</code> Article of the [[Metadata]] namespace of a ZIM file.
Tags are text slugs stored in the <code>Tags</code> Article of the [[Metadata|"M" namespace]] of a ZIM file.


A ZIM file can have zero, one or many Tags.
A ZIM file can have zero, one or many Tags.
Line 24: Line 24:
Common private tags used by [https://github.com/kiwix/kiwix-lib/ kiwix] Publishers:
Common private tags used by [https://github.com/kiwix/kiwix-lib/ kiwix] Publishers:


* <code>_ftindex:<no|yes></code>: indicates that the ZIM file includes a full-text index.
* <code>_sw:<no|yes></code>: indicates wheter the ZIM file relies on Service Workers.
* <code>_ftindex:<no|yes></code>: indicates wheter the ZIM file includes a full-text index.
* <code>_pictures:<no|yes></code>: indicates whether the ZIM file includes pictures.
* <code>_pictures:<no|yes></code>: indicates whether the ZIM file includes pictures.
* <code>_videos:<no|yes></code>: indicates whether the ZIM file includes videos.
* <code>_videos:<no|yes></code>: indicates whether the ZIM file includes videos.
* <code>_details:<no|yes></code>: indicates whether the ZIM file includes detailed content.
* <code>_details:<no|yes></code>: indicates whether the ZIM file includes detailed content.
* <code>_category:<xxx></code>: indicates that the ZIM file could be categorized as <code>xxx</code>. ZIM readers don't have to follow this convention. Kiwix readers don't even use the <code>_category</code> Tag in readers but uses it to inform its separate filtering mechanism.
* <code>_category:<xxx></code>: indicates that the ZIM file could be categorized as <code>xxx</code>. ZIM readers don't have to follow this convention. Kiwix readers don't even use the <code>_category</code> Tag in readers but uses it to inform its separate filtering mechanism.

Latest revision as of 07:54, 20 August 2020

Tags are text slugs stored in the Tags Article of the "M" namespace of a ZIM file.

A ZIM file can have zero, one or many Tags. Should there be more than one, those are separated by the ; character.

Goal

Tags are used by publishers to classify ZIM files.

Setting Tags

Tags should help represent, classify or identify a ZIM. ZIM readers are responsible for making use of Tags or not.

Tags are commonly displayed to reader users at ZIM-selection stage and not when using a ZIM file.

Tags are free text and can thus contain any UTF-8 character except for the ; separator. It is common to restrict Tags to single or two-words combination. Concision is important for users to remember and identify content.

Private Tags

Any Tag starting with the _ (underscore) character is considered a private tag. Private tagging is a convention and nor par of the specification.

Private tags are usually hidden by readers and used as flexible metadata.

Common private tags used by kiwix Publishers:

  • _sw:<no|yes>: indicates wheter the ZIM file relies on Service Workers.
  • _ftindex:<no|yes>: indicates wheter the ZIM file includes a full-text index.
  • _pictures:<no|yes>: indicates whether the ZIM file includes pictures.
  • _videos:<no|yes>: indicates whether the ZIM file includes videos.
  • _details:<no|yes>: indicates whether the ZIM file includes detailed content.
  • _category:<xxx>: indicates that the ZIM file could be categorized as xxx. ZIM readers don't have to follow this convention. Kiwix readers don't even use the _category Tag in readers but uses it to inform its separate filtering mechanism.