added rename operation

This commit is contained in:
Faraphel 2022-07-14 16:15:41 +02:00
parent ea4a1d293e
commit f11c8a5de2

View file

@ -46,6 +46,19 @@ class PatchOperation:
patch_content.seek(0) patch_content.seek(0)
return file_name, patch_content return file_name, patch_content
class Rename(Operation):
"""
Rename the output file
"""
type = "rename"
def __init__(self, name: str):
self.name = name
def patch(self, patch: "Patch", file_name: str, file_content: IO) -> (str, IO):
return self.name, file_content
class ImageGenerator(Operation): class ImageGenerator(Operation):
""" """
generate a new image based on a file and apply a generator on it generate a new image based on a file and apply a generator on it