From 224556236ecd0f48f461738bc8157a82f5009618 Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Mon, 19 Oct 2020 10:23:12 +0200 Subject: [PATCH] refactoring --- src/{dirhandler.py => migrator.py} | 2 +- src/photosort.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) rename src/{dirhandler.py => migrator.py} (99%) diff --git a/src/dirhandler.py b/src/migrator.py similarity index 99% rename from src/dirhandler.py rename to src/migrator.py index 54d1ca9..b3703e0 100644 --- a/src/dirhandler.py +++ b/src/migrator.py @@ -4,7 +4,7 @@ import os import misc -class DirHandler: +class Migrator: def __init__(self, src_dir, dst_dir): self._base_src_dir = src_dir self._base_dst_dir = dst_dir diff --git a/src/photosort.py b/src/photosort.py index 8ed4ee7..2829337 100755 --- a/src/photosort.py +++ b/src/photosort.py @@ -4,7 +4,7 @@ import argparse import datetime import logging -from dirhandler import DirHandler +from migrator import Migrator parser = argparse.ArgumentParser(description='Process some integers.') parser.add_argument('SOURCE_DIR', type=str, help='source directory') @@ -28,7 +28,7 @@ else: logging.basicConfig(format='[%(asctime)s] %(levelname)s: %(message)s', level=log_level, datefmt='%m/%d/%Y %H:%M:%S') -handler = DirHandler(args.SOURCE_DIR, args.DEST_DIR) -handler.migrate(args.cleanup) +migrator = Migrator(args.SOURCE_DIR, args.DEST_DIR) +migrator.migrate(args.cleanup) if args.cleanup: - handler.cleanup() + migrator.cleanup() -- 2.39.5