Feature request: Add metadata support
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()andArticle::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.
@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?
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).
@mgautierfr Could/should we use such a system to store as well the necessary http headers from warc?