mirror of
https://github.com/kanzure/pdfparanoia.git
synced 2025-07-04 20:37:38 +02:00

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)
17 lines
316 B
Python
17 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")
|
|
|