1
0
mirror of https://github.com/kanzure/pdfparanoia.git synced 2024-06-01 08:38:04 +02:00
pdfparanoia/pdfparanoia/plugin.py
Zooko O'Whielacronx 56cc7719da add a "--verbose" option that writes to stderr if it finds anything to omit
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)
2013-02-13 19:58:47 +00:00

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")