Browse Source

Merge branch 'canary'

master
deeppppp 3 years ago
parent
commit
09bc42d2af
  1. 2
      argv/checkpoints.py
  2. 2
      config.py
  3. 4
      processing/folder.py
  4. 4
      processing/gif.py
  5. 8
      processing/image.py

2
argv/checkpoints.py

@ -45,7 +45,7 @@ def check_args_checkpoints_parser(parser, args): @@ -45,7 +45,7 @@ def check_args_checkpoints_parser(parser, args):
def check_arg_checkpoints(parser, args):
Conf.log.debug(args.checkpoints)
if not ('download' in str(args.func)):
if not ('download' in str(args.func)):
for _, v in args.checkpoints.items():
if not os.path.isfile(v):
parser.error(

2
config.py

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
class Config:
"""Variables Configuration Class."""
version = "v1.2.1"
version = "v1.2.2"
checkpoints_version = "v0.0.1"
checkpoints_cdn = "https://cdn.dreamnet.tech/releases/checkpoints/{}.zip"

4
processing/folder.py

@ -29,9 +29,9 @@ class FolderImageProcessing(MultipleImageProcessing): @@ -29,9 +29,9 @@ class FolderImageProcessing(MultipleImageProcessing):
args['phases'] = select_phases(self._args)
args['output'] = [
"{}{}{}".format(
os.path.splitext(x.path)[0],
os.path.splitext(x)[0],
'_out',
os.path.splitext(x.path)[1]
os.path.splitext(x)[1]
)
if not Conf.args['output'] else
os.path.join(

4
processing/gif.py

@ -17,8 +17,8 @@ class GifProcessing(Processing): @@ -17,8 +17,8 @@ class GifProcessing(Processing):
"""GIF Image Processing Class."""
def _setup(self, *args):
self.__phases = select_phases(self._args)
self.__input_path = args['input']
self.__output_path = args['output']
self.__input_path = self._args['input']
self.__output_path = self._args['output']
self.__tmp_dir = None
self.__temp_input_paths = []
self.__temp_output_paths = []

8
processing/image.py

@ -42,7 +42,7 @@ class ImageProcessing(Processing): @@ -42,7 +42,7 @@ class ImageProcessing(Processing):
self.__image_steps = [
(Loader.get_loader(x)).load(x) if isinstance(x, str) else x for x in self.__image_steps
]
except FileNotFoundError as e:
except (FileNotFoundError, AttributeError) as e:
Conf.log.error(e)
Conf.log.error("{} is not able to resume because it not able to load required images. "
.format(camel_case_to_str(self.__class__.__name__)))
@ -65,11 +65,11 @@ class ImageProcessing(Processing): @@ -65,11 +65,11 @@ class ImageProcessing(Processing):
if os.path.isfile(self._args['input']) or not self._args.get('folder_altered') \
else os.path.join(self._args['folder_altered'], os.path.basename(self.__output_path))
write_image(r, os.path.join(path, "{}.png".format(p.__class__.__name__)))
write_image(r, os.path.join(path, "{}.png".format(p.__name__)))
Conf.log.debug("{} Step Image Of {} Execution".format(
os.path.join(path, "{}.png".format(p.__class__.__name__)),
camel_case_to_str(p.__class__.__name__),
os.path.join(path, "{}.png".format(p.__name__)),
camel_case_to_str(p.__name__),
))
write_image(self.__image_steps[-1], self.__output_path)

Loading…
Cancel
Save