From 2f4ae6001ede994c5770d8a261ee10f02283478c Mon Sep 17 00:00:00 2001 From: jlw4049 Date: Wed, 24 Jan 2024 12:31:46 -0500 Subject: [PATCH] refactor: update name for v1.0.0 --- image_generator.py => frame_forge.py | 12 ++++++------ {image_generator => frame_forge}/__init__.py | 8 ++++---- {image_generator => frame_forge}/exceptions.py | 2 +- {image_generator => frame_forge}/utils.py | 0 pyproject.toml | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) rename image_generator.py => frame_forge.py (93%) rename {image_generator => frame_forge}/__init__.py (98%) rename {image_generator => frame_forge}/exceptions.py (60%) rename {image_generator => frame_forge}/utils.py (100%) diff --git a/image_generator.py b/frame_forge.py similarity index 93% rename from image_generator.py rename to frame_forge.py index f09adb0..8428a3c 100644 --- a/image_generator.py +++ b/frame_forge.py @@ -1,12 +1,12 @@ from pathlib import Path from argparse import ArgumentParser -from image_generator import GenerateImages -from image_generator.exceptions import ImageGeneratorError -from image_generator.utils import exit_application +from frame_forge import GenerateImages +from frame_forge.exceptions import FrameForgeError +from frame_forge.utils import exit_application -program_name = "Comparison Image Generator" -__version__ = "1.1.0" +program_name = "FrameForge" +__version__ = "1.0.0" if __name__ == "__main__": @@ -106,5 +106,5 @@ if __name__ == "__main__": img_gen = img_generator.process_images() if img_gen: exit_application(f"Output: {img_gen}", 0) - except ImageGeneratorError as error: + except FrameForgeError as error: exit_application(error, 1) diff --git a/image_generator/__init__.py b/frame_forge/__init__.py similarity index 98% rename from image_generator/__init__.py rename to frame_forge/__init__.py index 6974dc8..e6a2e3e 100644 --- a/image_generator/__init__.py +++ b/frame_forge/__init__.py @@ -6,8 +6,8 @@ from numpy import linspace from unidecode import unidecode import awsmfunc import vapoursynth as vs -from image_generator.exceptions import ImageGeneratorError -from image_generator.utils import get_working_dir, hex_to_bgr +from frame_forge.exceptions import FrameForgeError +from frame_forge.utils import get_working_dir, hex_to_bgr class GenerateImages: @@ -362,7 +362,7 @@ class GenerateImages: frame += 1 b_frames[i] = frame except ValueError: - raise ImageGeneratorError( + raise FrameForgeError( "Error! Your encode file is likely an incomplete or corrupted encode" ) @@ -579,7 +579,7 @@ class GenerateImages: def load_plugins(self): plugin_path = get_working_dir() / "img_plugins" if not plugin_path.is_dir() and not plugin_path.exists(): - raise ImageGeneratorError("Can not detect plugin directory") + raise FrameForgeError("Can not detect plugin directory") else: for plugin in plugin_path.glob("*.dll"): self.core.std.LoadPlugin(Path(plugin).resolve()) diff --git a/image_generator/exceptions.py b/frame_forge/exceptions.py similarity index 60% rename from image_generator/exceptions.py rename to frame_forge/exceptions.py index cbc4cd1..4ba465f 100644 --- a/image_generator/exceptions.py +++ b/frame_forge/exceptions.py @@ -1,2 +1,2 @@ -class ImageGeneratorError(Exception): +class FrameForgeError(Exception): """Handle all exceptions thrown by image generation""" diff --git a/image_generator/utils.py b/frame_forge/utils.py similarity index 100% rename from image_generator/utils.py rename to frame_forge/utils.py diff --git a/pyproject.toml b/pyproject.toml index a77b4bc..f8d60c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] -name = "image-generator" -version = "1.1.0" +name = "frame-forge" +version = "1.0.0" description = "CLI to offload image generation to" authors = ["jlw4049 "] license = "MIT"