diff --git a/src/clew/clew.py b/src/clew/clew.py index fadf7d1..4acbfa6 100644 --- a/src/clew/clew.py +++ b/src/clew/clew.py @@ -130,7 +130,6 @@ def run_renpy_object_dump(game_root: Path, script: Path, output: Path) -> None: "--output", str(output), ] - LOG.info("dumping Ren'Py object graph: %s", script) subprocess.run(command, check=True) @@ -148,11 +147,13 @@ def dump_renpy_objects(output_root: Path, overwrite: bool) -> None: for game_root in game_roots: scripts = find_compiled_scripts(game_root) LOG.info("found %d compiled Ren'Py scripts under %s", len(scripts), game_root) - for script in scripts: + total = len(scripts) + for index, script in enumerate(scripts, start=1): output = object_dump_output_path(output_root, extracted_root, game_root, script) if output.exists() and not overwrite: - LOG.info("skipping existing Ren'Py object dump: %s", output) + LOG.info("skipping existing Ren'Py object dump %d/%d: %s", index, total, output) continue + LOG.info("dumping Ren'Py object graph %d/%d: %s", index, total, script) run_renpy_object_dump(game_root, script, output) diff --git a/src/clew/renpy_object_dump.py b/src/clew/renpy_object_dump.py index d206798..f89b6c3 100644 --- a/src/clew/renpy_object_dump.py +++ b/src/clew/renpy_object_dump.py @@ -35,7 +35,7 @@ def parse_args(argv): parser.add_argument("--game-root", required=True) parser.add_argument("--input", required=True) parser.add_argument("--output", required=True) - parser.add_argument("--max-depth", default=24, type=int) + parser.add_argument("--max-depth", type=int) return parser.parse_args(argv) @@ -121,7 +121,7 @@ class Dumper(object): if is_primitive(value): return safe_text(value) - if depth >= self.max_depth: + if self.max_depth is not None and depth >= self.max_depth: return { "type": "truncated", "class": class_name(value),