configurable output temp dir
parent
ca2f4c0fac
commit
689998d71f
|
|
@ -96,7 +96,8 @@ class Chars:
|
|||
modified_page.mediabox.lower_right = (bounds.x0, bounds.y1)
|
||||
modified_page.mediabox.lower_left = (bounds.x1, bounds.y1)
|
||||
modified_writer.add_page(modified_page)
|
||||
modified_path = "/tmp/{}-{:03d}-{}.modified.pdf".format(
|
||||
modified_path = "{}/{}-{:03d}-{}.modified.pdf".format(
|
||||
config.TEMP_DIR,
|
||||
self.path.split("/")[-1],
|
||||
self.page.page_number,
|
||||
j,
|
||||
|
|
|
|||
|
|
@ -4,3 +4,5 @@ DEBUG = os.environ.get("DEBUG", "")
|
|||
DEBUG_NO_SHOW = os.environ.get("DEBUG_NO_SHOW", "")
|
||||
DEBUG_HEIGHT = int(os.environ.get("DEBUG_HEIGHT", "800"))
|
||||
INPUT = os.environ.get("INPUT", "./testdata/input.pdf")
|
||||
TEMP_DIR = os.environ.get("TEMP_DIR", "/tmp/dnd-pdf-to-txt.d")
|
||||
os.makedirs(TEMP_DIR, exist_ok=True)
|
||||
|
|
|
|||
Loading…
Reference in New Issue