You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You chose to Pascalize meta key names. The documentation doesn't require it. It just happens to be the case (ahah) for currently defined ones but as stated there, it's extendable. @kelson42 ?
related, it seems that get_metadata only returns those predefined keys while ZimCreator allows setting any. Confusing.
Yes it's correct, maybe we can put there only the mandatory metadata. Any metadata can be accessed getting an article by url
Yes, let's harmonize to only manage official ones this way and have the article mechanism for the rest ; if @kelson42 and @mgautierfr agrees.
A user can put whatever metadata it needs in zim file.
However, we've defined a set of metadata to put in the zim file to be fully compliant (and metadata a zim reader can assume to be present). (https://www.openzim.org/wiki/Metadata)
The wrapper may check that the mandatory metadata are provided and warn (error?) the user if somes are missing.
But it should not limit the metadata to the ones defined.
Any metadata can be accessed getting an article by url
Technically yes. However I would prefer to have a specific function for that :
@mgautierfr your answer clarifies from the read side. Now from the write side, since now we require article implementations should I left that to the user ? To implement their own metadata article to be added ?
I would do a specific API also on the writer side. The (not so long) plan it to totally hide the namespace from the user perspective.
So the creator could have a specific set of function to define the metadata.
The mandatory can have a specific method: (set_name(), set_title(), ...) and have a generic method add_metadata(name, value) for other metadata.
Activity
jdcaballerov commentedon Apr 10, 2020
Currently get_metadata will only return mandatory_metadata with pascalized keys
Commit:
9cb954b
mgautierfr commentedon Apr 14, 2020
A user can put whatever metadata it needs in zim file.
However, we've defined a set of metadata to put in the zim file to be fully compliant (and metadata a zim reader can assume to be present). (https://www.openzim.org/wiki/Metadata)
The wrapper may check that the mandatory metadata are provided and warn (error?) the user if somes are missing.
But it should not limit the metadata to the ones defined.
Technically yes. However I would prefer to have a specific function for that :
We plan to do something like that in libzim and disallow the user to get the metadata as a simple article.
jdcaballerov commentedon Apr 17, 2020
@mgautierfr your answer clarifies from the read side. Now from the write side, since now we require article implementations should I left that to the user ? To implement their own metadata article to be added ?
Warn the user when ?
mgautierfr commentedon Apr 17, 2020
I would do a specific API also on the writer side. The (not so long) plan it to totally hide the namespace from the user perspective.
So the creator could have a specific set of function to define the metadata.
The mandatory can have a specific method: (
set_name(),set_title(), ...) and have a generic methodadd_metadata(name, value)for other metadata.jdcaballerov commentedon Apr 25, 2020
Mandatory metadata is checked and returned.