mirror of
https://github.com/kanzure/pdfparanoia.git
synced 2024-06-01 08:38:04 +02:00
56cc7719da
Also cleaned up some flakes noticed by pyflakes, and make the scrub() be @classmethod instead of @staticmethod so I could use the class for the verbose output. caveats: * there are no unit tests of this patch * now your logs of your stderr have potentially sensitive information in them * the implementation of arg parsing is very low-tech; (a *good* way to do arg parsing is the "argparse" module)
18 lines
316 B
Python
18 lines
316 B
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
pdfparanoia.plugin
|
|
~~~~~~~~~~~~~~~
|
|
|
|
Defines how plugins work.
|
|
|
|
"""
|
|
|
|
class Plugin:
|
|
@classmethod
|
|
def scrub(cls, content, verbose=False):
|
|
"""
|
|
Removes watermarks from the given pdf.
|
|
"""
|
|
raise NotImplementedError("must be implemented by the subclass")
|
|
|