From 7a4a57b0aae7ae7cea8fdb1e9a8694068c354374 Mon Sep 17 00:00:00 2001 From: "Queen Vinyl Da.i'gyu-Kazotetsu" Date: Fri, 14 Jun 2024 21:03:56 -0700 Subject: [PATCH] Update parsing script to handle a second color --- parse.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/parse.py b/parse.py index 9ffbc9f..47fb7f4 100644 --- a/parse.py +++ b/parse.py @@ -118,9 +118,12 @@ class Tag(): "production_date": bytes_to_date(self.blocks[12]), "unknown": bytes_to_string(self.blocks[13]), # Appears to be some sort of date -- on some tags, this is identical to the production date, but not always - } + # Check for a second color + if self.blocks[16][4]: + self.data["filament_color"] += " / #" + bytes_to_hex(self.blocks[16][4:8][::-1]) + def __str__(self, blocks_to_output = IMPORTANT_BLOCKS): result = ""