Skip to main content

MetronInfo V1.0

ยท 3 min read
Brian Pepple
Founder of the Metron Project / Code Monkey

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.

October 2024 Update

ยท 2 min read
Brian Pepple
Founder of the Metron Project / Code Monkey

Ok, been fairly busy the last couple of months so naturally blogging has taken a back-burner. So, here's a summary of what's been going on the last few months.

Monthly Statisticsโ€‹

During August the Metron Project added the following to its database:

  • Users: 41
  • Issues: 1,377
  • Creators: 147
  • Characters: 346

During September the following was added:

  • Users: 100
  • Issues: 1,330
  • Creators: 124
  • Characters: 379

During October the following was added:

  • Users: 51
  • Issues: 1,996
  • Creators: 122
  • Characters: 740

Comic Vine Outageโ€‹

Comic Vine went down at the end of September for about 6 days, so we saw an influx of new users which necessitated in increasing our server's capacity. One thing this episode brought to light out was the need for the project to accept donations for future infrastructure costs (since I'm currently covering the server costs).

To help us set this up it would be greatly appreciated if you could star the repository since one of the requirements to set up an account on Open Collective is to have 100 stars.

Server OS Upgradeโ€‹

I had planned to upgrade the server in August, but y'know... life. Anyway, I'm tentatively planning to upgrade Metron's operating system on November 16th, so there might be some downtime (most likely a few hours) when I do that. I'll post a notification on the site for the week leading to the upgrade.

MetronInfo.xmlโ€‹

The last couple of months there has been a bunch of work done on finalizing the MetronInfo.xsd by Joe, AJ, Buried-In-Code and myself, and I believe there are just a couple of outstanding items that need a resolution. Once that is done, I'll write up a announcement blog post.

Anyway, that's all I've got for this month. Take care!

Publisher Imprint Support

ยท One min read
Brian Pepple
Founder of the Metron Project / Code Monkey

Spent the weekend working on finally adding support for Publisher's imprints. Before this, Metron simply lumped Publishers and Imprint together under the Publisher views which was not ideal, but this change will allow them to be separated.

New views, filters, and API endpoints have been added for this feature, so if you see anything missing or behaving not as expected, please open a bug report.

Series detail for Afterlife with Archie. Show new imprint information.

In addition, I've released new version of Darkseid, Mokarri, and Metron-Tagger that add support for imprints. And as always, if you discover any bugs, it would be appreciated if you opened a report in the appropriate git repository.

Anyway, that's all I got for now. Take care!

July 2024 Update

ยท 2 min read
Brian Pepple
Founder of the Metron Project / Code Monkey

Monthly Statisticsโ€‹

During July the Metron Project added the following to its database:

  • Users: 47
  • Issues: 1,940
  • Creators: 71
  • Characters: 329

Thanks to everyone that contributed!

More Database Series Type Changesโ€‹

Made a couple of changes to some Series Type names on Metron based on some suggestions from Buried-In-Code over on Matrix. They include:

  • Change Digital Chapters to Digital Chapter
  • Change Hard Cover to Hardcover

If you wish to update your existing ComicInfo.xml metadata, I've released a new version of Karkas that addresses these changes. You can download this version from this link, and just install it by running:

pipx install /path/to/karkas-1.2.0-py3-none-any.whl

Then just run:

karkas /path/to/comics

Server OS Upgradeโ€‹

I'm tentatively planning to upgrade Metron's operating system later this month, so there might be some downtime (most likely a few hours) when I do that. Once I have a better idea what changes this version has (PostgreSQL-16.2, Python-3.12, etc.) I'll have a better idea the work involved. Regardless, I'll post a notification on the site for the week leading to the upgrade, which most likely will occur on a Saturday.

Anyway, that's all I've got for this month. Take care!

Database Series Type Changes

ยท 3 min read
Brian Pepple
Founder of the Metron Project / Code Monkey

Monthly Statisticsโ€‹

During June the Metron Project added the following to its database:

  • Users: 26
  • Issues: 3,025
  • Creators: 189
  • Characters: 822

Thanks to everyone that contributed!

Database Series Type Changesโ€‹

Was discussing changes to the MetronInfo schema with the developer of Kavita, and it got me thinking about the Series Types that Metron uses.

Based on that discussion, we've consolidated Cancelled and Ongoing types to Single Issue, changed Annual Series to Annual, and also add Omnibus which would give us the following values:

  • Annual: An over-sized special of a comic book that is released in addition to the regular comics in that series.
  • Digital Chapters: This is where a comic is released in a digital format, but can sometimes be released in print later.
  • Graphic Novel: This is a comic book that comes out in the trade paperback/hardcover format without being in the serial single issue format beforehand.
  • Hardcover: Similar to a Trade Paperback but the cover has a very thick stock just like a hardcover novel.
  • Limited Series: This is a comic series that has a set number of issues.
  • Omnibus: These are very large number of single issues collected in one edition.
  • One-Shot: A story that is contained to a single issue.
  • Single Issue: This is the serial magazine-style format of a comic. For example, Action Comics v1 #2.
  • Trade Paperback: This is the most common kind of collected edition where it is usually collecting 6-12 single issues.

Note: Series Types descriptions are from this excellent article at How to Love Comics

In addition to those changes, we've added a new database field status to the Series model to track a series' status. The values for this field are as follows:

  • Cancelled: Used when a Single Issue or Annual series is ended. Sometimes can be used when a Limited series is abandoned before completing its story.
  • Complete: Commonly used when a Limited, One-Shot, Graphic Novel, Hardcover, Omnibus, or Digital Chapters series is ended.
  • Hiatus: When a series stops publishing before ending with the expectation that it will be finished at a later date.
  • Ongoing: Used with the Single Issue or Annual series while it is still being published.

To help users update their existing comics with the new values without having to use Metron's API to re-tag their comics, I've written Karkas which will change the Format element of a comics ComicInfo.xml to Single Issue if they are currently Cancelled or Ongoing, and Annual if the value is Annual Series. Since this is a program that most likely will only be used once I've decided to not publish it to PyPi, but you can grab the wheel from here.

To install it you just need to run:

wget https://static.metron.cloud/misc/karkas-1.0.0-py3-none-any.whl
pipx install karkas-1.0.0-py3-none-any.whl

Then just run:

karkas /path/to/comics

In the next day or so, I'll be releasing a new version of Mokkari that will include the new Series Status field.

If you run into any problems, please open a bug report with the appropriate project, i.e. Metron, Karkas, Mokkari, etc.

Anyway, that's all I've got for this month. Take care!

May 2024 Update

ยท One min read
Brian Pepple
Founder of the Metron Project / Code Monkey

Monthly Statisticsโ€‹

During May the Metron Project added the following to its database:

  • Users: 39
  • Issues: 3,140
  • Creators: 230
  • Characters: 852

Thanks to everyone that contributed!

API Changeโ€‹

A new parameter, rating, was added to the issue endpoint and accepts the follow case-insensitive values:

  • Unknown
  • Everyone
  • Teen
  • Mature
  • Teen Plus
  • CCA

An example of its usage would be: https://metron.cloud/api/issue/?publisher_name=dynamite&rating=teen

Metron-Taggerโ€‹

Released a new version of Metron-Tagger, which contains a couple of new features/changes:

  • Digital Comics Renaming: When renaming a digital-only comic, Digital Chapter will be appended to the filename.
  • Remove Non-Valid Metadata Option: Using the --remove-non-valid option with the --validate option will remove any comicinfo.xml that is not valid.
  • Removed Oddball Rename Tokens: Removed the genre, story titles, language, critical rating, and story arc tokens from the renaming templates since they are not commonly used.

Well, that's all I got for this month. Take care!

April 2024 Update

ยท One min read
Brian Pepple
Founder of the Metron Project / Code Monkey

Monthly Statisticsโ€‹

During March and April the Metron Project added the following to its database:

  • Users: 75
  • Issues: 4,495
  • Creators: 255
  • Characters: 1,632

Thanks to everyone that contributed!

Digital Chaptersโ€‹

Recently a new series type, Digital Chapters, was added to Metron. This was to facilitate adding digital comics, like DC Comics Bombshells. This series type appends the word Digital to the series display name and adds Chapter to the issue display name. When adding Digital Chapters series, the print version should not be added as an associated seres, but added as reprints to the appropriate issues. For an example of this, please refer to this issue.

Anyway, that's all I've got for this month. Take Care!

February 2024 Update

ยท 3 min read
Brian Pepple
Founder of the Metron Project / Code Monkey

Monthly statisticsโ€‹

During February the Metron Project had a total of 5,635 issues added to its database during February bring the total number of issues to 112,135. We also had 65 new users join.

ComicTaggerโ€‹

Recently comictagger released the metron_talker plugin, but unfortunately it's got a few design flaws that is generating 2-4 times the number of API calls compared to other clients, and it's also downloading the cover for each issue, instead of using the issue's cover_hash exposed by the Metron API. The developers are working on addressing these issues, but if you are planning to tag a large number of comics we would appreciate it if you waited for a new release or use Metron-Tagger in the interim.

Server Newsโ€‹

With the server load increase due to the comictagger bug, I've gone ahead and increased the CPU and RAM for the server and with any luck users shouldn't see a decrease in server quality of service.

Metron-Taggerโ€‹

AJ Slater recently released a new library (comicfn2dict) for parsing comic filenames, and since the code for handling that in darkseid was fairly old and crusty it seemed like a good time to do a little work on Metron-Tagger. Some of the changes are as follows:

  • comicfn2dict

    So, I switched over to using comicfn2dict for filename parsing, and did some testing on around 1,000 or so comics. Overall, it's performed as well as the old code and has the added benefit of being used by multiple projects.

  • Improved Matching

    Spent some time improving comic matching by implementing the following changes:

    • Only use the series name and issue number when querying Metron. By doing this we are likely to get a result from Metron. Also, we are striping out any special characters (like ,, -, or &) from the series name.
    • Use the cover hash from Metron to verify the issue is correct, otherwise we'll ask the user for help.
    • Use existing ComicInfo.xml for matching. If a comic has already been tagged by comictagger (or Metron-Tagger) and has information to help identify the issue (like the Comic Vine ID), we'll use that before using the filename.

Miscellaneousโ€‹

Right now, I'm thinking about making some changes to the API (like adding versioning), and if I do I'll ask the community for any suggestions of changes they'd like to see.

January 2024 Update

ยท 2 min read
Brian Pepple
Founder of the Metron Project / Code Monkey

Issues Indexedโ€‹

The Metron Project had a total of 7,816 issues added to its database during January bring the total number of issues to 106,500. I wish to give big thanks to everyone who has helped with the project. Thanks!

Universes Supportโ€‹

Universe support has been added to Metron, which will allow users to add Publisher's universes to Issues, Characters, and Teams. I've used information from a variety of sources to populate the initial universes, but I'm sure there is still a lot to be added.

To aid updating existing issues faster with this information I've created a Django Management Command to update a series' issues. To make a request to update a series with Universe information, please provide the necessary information in this discussion page.

Universe Detail

Software Updatesโ€‹

New versions of Mokkari and Metron-Tagger have been released, which primarily deal with using Pydantic and adding Universe support.

Outstanding Bug Fixedโ€‹

Fixed an outstanding bug where regular users were not able to add a new creator when adding a credit record to an Issue. Thanks to THElegend5 for reporting this bug!

Creator Widget

December 2023 Update

ยท One min read
Brian Pepple
Founder of the Metron Project / Code Monkey

Issues Indexedโ€‹

The Metron Project had a total of 10,722 issues added to its database during December bring the total number of issues to 98,684. I wish to give big thanks to everyone who has helped with the project. Thanks!

2023 Database Statisticsโ€‹

We added the following number of entries during 2023:

  • Users: 319
  • Publishers: 33
  • Series: 2,430
  • Comics: 44,914
  • Characters: 7,082
  • Creators: 3,118
  • Teams: 691
  • Arcs: 521

HTMX and Streaming HTMLโ€‹

I'm playing around with using HTMX and Django's ability to stream HTML to improve the user experience. Basically, we'll load the static parts (like the footer, navbar, etc.) of the page templates as soon as possible, and then load the data as it becomes available and render its fragment of HTML. Not sure if this will be pushed to production or not until I do more testing, but it's something worth looking into.