libzim icon indicating copy to clipboard operation
libzim copied to clipboard

Feature request: Add metadata support

Open dnohales opened this issue 5 years ago • 3 comments

The idea is that each article could have a metadata associated with it in the form of key-value pairs or simply a JSON file.

Our use case for this includes:

  • Get information about a video, audio or image, like dimensions, bitrate, codec, etc.
  • Specify a license for each article.
  • Specify a synopsis for each article (some text we can show when listing the articles).
  • The title and mimetype can also be here for example, falling back to Article::getTitle() and Article::getMimeType().
  • Have a structured representation of the table of content of an article, so we can show it in a specific UI outside the webview rendering the article.
  • Specify a URL with the thumbnail of the article.

More use cases could come up in the future for me and other users, that's the reason I believe we should save this in a flexible way like a JSON-like format or maybe we could think of some standardized metadata keys and leave the rest extensible.

dnohales avatar Apr 10 '20 18:04 dnohales

@mgautierfr Would you agree on the principle to defining a new namespace for article for articles metadata? Do you think storing things in json is good? Would not be better to have something at an other level which would allow searching/filtering?

kelson42 avatar Apr 13 '20 07:04 kelson42

Two proposals:

  • add article_created (UNIX time)
  • add article_modified (UNIX time)

E.g., this will allow to check articles for updates and update them incrementally (especially for Wikimedia's dictionaries/pages).

data-man avatar Nov 15 '20 07:11 data-man

@mgautierfr Could/should we use such a system to store as well the necessary http headers from warc?

kelson42 avatar May 28 '23 15:05 kelson42