Skip to content

Commit 4337a21

Browse files
committed
Add override for #4153
1 parent 0c280c6 commit 4337a21

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

add_panel_override.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
app = typer.Typer()
1212

1313

14-
def add_panel_override(image_path: Path, panel_no: list[int]) -> None:
14+
def add_panel_override(image_path: Path, comic_id: int, panel_no: list[int]) -> None:
1515
overrides = json.load(open('parse_qwantz/data/panel_overrides.json'))
1616
image = Image.open(image_path)
1717
md5 = hashlib.md5(image.tobytes()).hexdigest()
1818
if md5 not in overrides:
19-
comic_id, file_name = image_path.name.split(' - ')
19+
file_name = image_path.name
2020
overrides[md5] = {"comic_id": int(comic_id), "file_name": file_name, "panels": {}}
2121
panels = list(parse_qwantz(image))
2222
for n in panel_no:

parse_qwantz/data/panel_overrides.json

+22
Original file line numberDiff line numberDiff line change
@@ -5289,5 +5289,27 @@
52895289
"T-Rex: AAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHH"
52905290
]
52915291
}
5292+
},
5293+
"8ad8d9f5b6e9bf94cba746db3a25f80c": {
5294+
"comic_id": 4153,
5295+
"file_name": "comic2-4351.png",
5296+
"panels": {
5297+
"1": [
5298+
"Hot Pink Narrator: IT'S THE FUTURE!",
5299+
"T-Rex: Woo! The future!",
5300+
"T-Rex: Everything is great!"
5301+
],
5302+
"3": [
5303+
"Hot Pink Narrator: EVERYTHING ISN'T GREAT!",
5304+
"T-Rex: Aw man. Well, are - are SOME things great?",
5305+
"Hot Pink Narrator: YEAH, SOME THINGS ARE GREAT!",
5306+
"T-Rex: Are the things that are great in the future the same things that are great now?",
5307+
"Hot Pink Narrator: SOME OF THEM, SURE"
5308+
],
5309+
"5": [
5310+
"Hot Pink Narrator: 30 SECONDS. NOT THAT MUCH HONESTLY",
5311+
"T-Rex: This sucks! Send me back to my own time, I wanna get here the normal way!"
5312+
]
5313+
}
52925314
}
52935315
}

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "parse_qwantz"
33
authors = [{name = "Jan Szejko", email = "[email protected]"}]
4-
version = "2024.1.3"
4+
version = "2024.2.1"
55
description = "Transcript generator for Dinosaur Comics"
66
readme = "README.md"
77
requires-python = ">=3.10"

0 commit comments

Comments
 (0)