I'm happy to announce the v1.0 of the
MetronInfo schema
has been finalized and is now ready to be used by developers and consumers. So, I'll start off by answering some
questions (most of this will be from the projects README).
What is it?
MetronInfo is a new xml document type that fixes some deficiencies that exist in the current de facto xml
file, ComicInfo.xml, to store metadata for a comic. Some of our
improvements include:
- Addition elements to track information that are not included with the current standard.
- Better handling of data types. For instance, instead of using delimited strings we use arrays of elements.
- Elements to track where the data was obtained from.
id
attributes for resources (Characters, Creators, etc.), so items with different names can be associated correctly.
Is the schema only for the Metron Database?
No, the schema only has Metron in the name since almost every other format has Comic in the name, and the
originating author hates naming projects, so he went with the simplest choice. 馃槃 It was designed to be used for any of
the comic resources (Comic Vine, AniList, etc.)
Where can I find the schemas?
Version 1.0 of the schema is located in schema
directory
Is there documentation for it?
Yes, there is documentation describing the elements usage
and also a Matrix to help with age rating mapping.
How can I validate my XML?
It's recommended that any software that writes the XML make use of the schema to validate, so consumers of the XML
document can be sure of its data. The schema use XSD 1.1, so you need to make sure your validation code uses that
instead of XSD 1.0.
For example to validate the XML in python:
from pathlib import Path
from xmlschema import XMLSchema11, XMLSchemaValidationError
xsd = Path("/home/user/MetronInfo.xsd")
xml = Path("/home/user/MetronInfo.xml")
schema = XMLSchema11(xsd)
try:
schema.validate(xml)
except XMLSchemaValidationError as e:
print(f"Failed to validate XML: {e!r}")
exit(1)
# Code to write / read the xml file
What software currently supports it?
Currently, the following software does:
- Metron-Tagger - Commandline tool to tag comic with metadata (
MetronInfo or ComicInfo) from Metron Comic Book Database.
If you are a developer that has added support for MetronInfo.xml to your software, please create a PR to update the
README
or contact me.
Future
One of the goals of the project was to be responsive to the needs of the community, so if you have suggestion for
improvements to the schema please file a
feature request,
bug report,
or start a discussion.
Thanks
I'd like to thank everyone that has contributed to the schema, and in
particular AJ, Buried-In-Code,
and Joe who have helped out a lot in the last few months.