aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/postprocessor/common.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2019-10-11 20:28:37 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2019-10-11 20:28:37 -0400
commit619ed1cd4fd9c20ea2da6add1825dedb5b7f0e46 (patch)
tree944ec05686c780415f068a0ff14bbc90322353bd /gallery_dl/postprocessor/common.py
parent4fad1be5e8e180ab167d32ff2b67eff6ecbb61de (diff)
parent40f5fe6edef268632d3bc484e85e5b37bad67bff (diff)
Update upstream source from tag 'upstream/1.10.6'
Update to upstream version '1.10.6' with Debian dir 0be8d7b4b3f3acaa27959e04c2590a0c43dc533f
Diffstat (limited to 'gallery_dl/postprocessor/common.py')
-rw-r--r--gallery_dl/postprocessor/common.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/gallery_dl/postprocessor/common.py b/gallery_dl/postprocessor/common.py
index b967cf6..71ef932 100644
--- a/gallery_dl/postprocessor/common.py
+++ b/gallery_dl/postprocessor/common.py
@@ -8,20 +8,30 @@
"""Common classes and constants used by postprocessor modules."""
-from . import log
+import logging
class PostProcessor():
"""Base class for postprocessors"""
- log = log
- def prepare(self, pathfmt):
- """ """
+ def __init__(self):
+ name = self.__class__.__name__[:-2].lower()
+ self.log = logging.getLogger("postprocessor." + name)
- def run(self, pathfmt):
+ @staticmethod
+ def prepare(pathfmt):
+ """Update file paths, etc."""
+
+ @staticmethod
+ def run(pathfmt):
"""Execute the postprocessor for a file"""
- def finalize(self):
+ @staticmethod
+ def run_after(pathfmt):
+ """Execute postprocessor after moving a file to its target location"""
+
+ @staticmethod
+ def finalize():
"""Cleanup"""
def __repr__(self):