Skip to main content

6 posts tagged with "api"

View All Tags

November 2025 News

· 5 min read
Brian Pepple
Founder of the Metron Project / Code Monkey

Monthly Statistics

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

  • Users: 30
  • Issues: 1,042
  • Creators: 158
  • Characters: 531

Thanks to everyone that contributed!

Reading Lists

Mea Culpa

So... the last post I made introducing Reading List, unfortunately caused a bit of drama, since I forgot to attribute that the 13 initial reading lists were created from cbl files from the CBL-ReadingLists group. I'm sorry for this oversight and it wasn't my intention to give the impression they were created by me. I've since made a note on those reading lists attributing them to this group, and removed the import CLB functionality from the site.

Due to the aforementioned drama, I've had to call a bit of an audible in regard to the maintaining of the reading lists owned by the Metron user. I'm planning to work on adding support for non-admin users to edit these lists over the Holiday break and if you have an interest in helping to maintain them, please contact me.

One side-effect of my mistake is that it spurred on one of our community members to write a tool to retrieve the data directly from the reading lists source and check them against the site, and then produce a json file or if issues are missing generate a report that can be acted upon. Currently, I've got a management command to import these json files, but maybe I'll look at adding POST support to the API in the future.

Down the road, I'll look at adding arc-based bulk additions, other import options, and maybe an associated reading list fields.

Adding Series to Reading List

I've added the option to add a series to a reading list, which should be easier than just adding individual issues.

API

I've spent the last week or so working on the Reading List API, and it's finally been pushed to production. There is fairly detailed API documentation on the wiki, and there is also the Swagger API Documents.

I was originally planning to write a simple tool to generate reading lists from the API, but have held off due to:

  • CBL files don't really have a schema.
  • json-cbl-standard aren't currently designed to handle information from an API that well.

Mokkari

A new version of Mokkari has been released that adds support for the new Reading List API, and also reworked the rate limiting code so that it produces more feedback to the user. If you have written an application that uses Mokkari, you'll want to modify your API calls to Metron to sleep when receiving RateLimitError. For example:


>>> import time
>>> from mokkari.exceptions import RateLimitError
>>> session = Session("username", "password")
>>> def fetch_with_rate_limit_handling(issue_id):
... while True:
... try:
... return session.issue(issue_id)
... except RateLimitError as e:
... if "per minute" in str(e):
... # Minute limit - automatically wait and retry
... print(f"{e}")
... print(f"Waiting {format_time(e.retry_after)}...")
... time.sleep(e.retry_after)
... continue
... elif "per day" in str(e):
... # Daily limit - ask user whether to wait or quit
... response = input(f"Wait {format_time(e.retry_after)}? (y/n): ")
... if response.lower() == 'y':
... time.sleep(e.retry_after)
... continue
... else:
... raise
... else:
... raise
>>> issue = fetch_with_rate_limit_handling(1)

Metron-Tagger

A couple of releases of Metron-Tagger were made since my last blog post. The big change was support for writing/reading metadata was added, but implemented differently than other tagging software which have overloaded the PDF metadata. I decided to treat PDFs, like we do with CBZ, by embedding the metadata.

After discussing this with AJ, he has also made a release of Comicbox supporting this method of writing comic metadata to a PDF.

The latest release has also improved the rate limiting, so that when the daily limit is exceeded, the user is asked whether they want to wait the reported number of minutes or quit processing the remaining files.

Cloudflare

The site has been dealing with AiBots and scrapers quite a bit lately, and I'm giving serious thought to moving the site DNS over to Cloudflare to take advantage of the bot protection. I'm still working on what the migration plan would entail (name server changes, SSL certs, nginx, etc) and will make a decision once that's finished. If we do make the switch, the site will most likely be down for a while (assuming everything goes as planned), and I will put a notice on the site beforehand.

OpenCollective

If you would like to help keep the lights on at the project, we have an account at Open Collective to defray the servers costs and help with increasing future server capacity.

Anyway, I think that's everything for this month! Take care.

December 2024 Update

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

Monthly Statistics

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

  • Users: 39
  • Issues: 823
  • Creators: 259
  • Characters: 413

2024 Annual Statistics

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

  • Users: 566
  • Issues: 33,784
  • Creators: 2,283
  • Characters: 7,748

Thanks to everyone that contributed!

Grand Comics Database (GCD) ID Support

Recently support for GCD ID's was added to the site, and we've currently linked about 50% of the issues on the site, and with luck, should be completed in the next week or so.

Potential January Projects

I'm looking at some small projects to work on in January, and some potential ones I'm thinking about are:

  • Add Legacy Numbering field
  • Alternative Series Name field
  • Advanced Resources (Series, Issues, etc) Search
  • Resource ID URLS

Not sure which ones (or any) will be implemented, but I'm planning to dig into them a bit more in the next few weeks.

OpenCollective

We've recently set up an account at Open Collective if you wish to help defray the server costs and help with increasing future server capacity.

Anyway, that's all I got for now, hope everyone had a great holiday and are enjoying New Years day. Take Care!

November 2024 Update

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

Monthly Statistics

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

  • Users: 31
  • Issues: 2,210
  • Creators: 104
  • Characters: 426

Thanks to everyone that contributed!

Metron-Tagger v3.1.0

I released a new version of Metron-Tagger today that adds the ability to migrate data from a comic that contains a ComicInfo.xml.

The conversion from ComicInfo.xml -> MetronInfo.xml does have some caveats though:

  • Elements containing data with a comma in a delimited ComicInfo element. If for example, the Title element contained a story call "Babs: True Blue, I Love You" and it was originally written with a tool other than Metron-Tagger it will split the story into two element items: Babs: True Blue and I Love You .
  • Ratings. We map these to the enums used in MetronInfo, but it's not perfect since the ComicInfo documentation isn't terribly clear how it defines it values, so if you feel our mapping is incorrect please notify us and explain what it should be. Also, I've seen some users use non-valid values which obviously won't work.
  • Series Format. We've also done our best to map the series format, but this is even less defined the age rating since this is just a text element in the schema, and could be anything. We've used the values in Comic-Tagger to handle the conversion, but this isn't perfect.

To migrate your ComicInfo.xml to MetronInfo.xml without any online lookup would simply run:

metron-tagger --migrate /path/to/comics

If you wanted to tag you comics with data from the Metron Comic Book Database, and migrate the data from the existing ComicInfo.xml for those comics not on Metron, you would run:

metron-tagger -om --migrate /path/to/comics

If you run across any bugs or have suggestions for improvements, please file a Bug Report or Feature Request.

Server Upgrade

Finally got around to upgrading the server, and it was fairly uneventful. Yay! 🎉

OpenCollective

The main repository has finally reached 100 stars, and so most likely in the next week or two, I'll set up a funding option at Open Collective to help defray the server costs and help with increasing future server capacity.

Future

Now the bulk of the work is done with getting the MetronInfo out the door and some initial tooling to generate them, I'm planning to work on some low-hanging bugs with the website over the next month or so, before starting any large scale projects.

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

Latest Happenings

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

New Indexed Issues Milestone

The Metron Project reached a milestone today by having 65,000 issues added to its database. I wish to give big thanks to everyone who has helped with the project. Thanks!

POST API

Been spending the last few months working on a POST API to make it easier to add/update information on Metron. Currently it's only available to users with Adminstrators permissions, but later this year I'll look at the feasability of making it more readily available.

Comic Vine ID's

Another project I've been working on is adding Comic Vine identification numbers to the various resource items. This should help users match items between the two data sources. Currently, about 40% of the issues have been updated with this information and with any luck the majority of issues will be finished by the end of the month.

ComicTagger

One of the developers of Comic Tagger has been working on adding support for tagging digital comics with data from Metron, and hopefully in the next couple of months that merged.

Esak-1.3.2

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

Did a quick release this morning of the python wrapper for the Marvel API, Esak, which adds an option to have the cache results expire after a user-defined number of days. To update to the latest version just run the following command:

pip3 install -U --user esak

50,000 issues indexed

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

The Metron Project reached a milestone today by having 50,000 issues added to its database. I wish to give big thanks to everyone who has helped with the project. Thanks!