mirror of
https://github.com/kanzure/pdfparanoia.git
synced 2024-12-04 23:15:52 +01:00
pdfparanoia command-line interface
This commit is contained in:
parent
5c8a194445
commit
775b927b42
@ -36,6 +36,7 @@ file_handler.close()
|
||||
|
||||
## 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.9 - AIP: better checks for false-positives; IEEE: remove stdout garbage.
|
||||
* 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"
|
||||
__version__ = "0.0.10"
|
||||
__build__ = 0x000010
|
||||
__version__ = "0.0.11"
|
||||
__build__ = 0x000011
|
||||
__author__ = "Bryan Bishop <kanzure@gmail.com>"
|
||||
__license__ = "BSD"
|
||||
__copyright__ = "Copyright 2013 Bryan Bishop"
|
||||
|
Loading…
Reference in New Issue
Block a user