mirror of
https://github.com/kanzure/pdfparanoia.git
synced 2025-05-25 09:04:23 +02:00
pdfparanoia command-line interface
This commit is contained in:
parent
5c8a194445
commit
775b927b42
@ -36,6 +36,7 @@ file_handler.close()
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
* 0.0.11 - pdfparanoia command-line interface. Use it by either piping in pdf data, or specifying a path to a pdf in the first argv slot.
|
||||||
* 0.0.10 - JSTOR
|
* 0.0.10 - JSTOR
|
||||||
* 0.0.9 - AIP: better checks for false-positives; IEEE: remove stdout garbage.
|
* 0.0.9 - AIP: better checks for false-positives; IEEE: remove stdout garbage.
|
||||||
* 0.0.8 - IEEE
|
* 0.0.8 - IEEE
|
||||||
|
28
bin/pdfparanoia
Executable file
28
bin/pdfparanoia
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/usr/bin/env python2.7
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""
|
||||||
|
pdfparanoia - pdf watermark removal tool
|
||||||
|
|
||||||
|
This is the command-line client. It accepts pdf formatted data either through
|
||||||
|
stdin/piping or by referencing a file in argv[0].
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import sys
|
||||||
|
import fileinput
|
||||||
|
from StringIO import StringIO
|
||||||
|
|
||||||
|
import pdfparanoia
|
||||||
|
|
||||||
|
# read in all lines
|
||||||
|
content = ""
|
||||||
|
for line in fileinput.input():
|
||||||
|
content += line
|
||||||
|
|
||||||
|
# scrub the pdf to get rid of watermarks
|
||||||
|
output = pdfparanoia.scrub(StringIO(content))
|
||||||
|
|
||||||
|
# dump to output
|
||||||
|
sys.stdout.write(output)
|
||||||
|
|
@ -17,8 +17,8 @@ usage:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = "pdfparanoia"
|
__title__ = "pdfparanoia"
|
||||||
__version__ = "0.0.10"
|
__version__ = "0.0.11"
|
||||||
__build__ = 0x000010
|
__build__ = 0x000011
|
||||||
__author__ = "Bryan Bishop <kanzure@gmail.com>"
|
__author__ = "Bryan Bishop <kanzure@gmail.com>"
|
||||||
__license__ = "BSD"
|
__license__ = "BSD"
|
||||||
__copyright__ = "Copyright 2013 Bryan Bishop"
|
__copyright__ = "Copyright 2013 Bryan Bishop"
|
||||||
|
1
setup.py
1
setup.py
@ -24,6 +24,7 @@ setup(
|
|||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
packages=packages,
|
packages=packages,
|
||||||
install_requires=["pdfminer>=0"],
|
install_requires=["pdfminer>=0"],
|
||||||
|
scripts=["bin/pdfparanoia"],
|
||||||
platforms="any",
|
platforms="any",
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
classifiers=[
|
classifiers=[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user