modified the init file to work on local directory; added logging to init.py

This commit is contained in:
Marcel Gansfusz
2025-10-21 14:48:06 +02:00
parent 93f2c59997
commit 7d828a7c3b
5 changed files with 200 additions and 37 deletions

View File

@@ -461,6 +461,7 @@ async def censor_pdf(
):
"""Censors pdf and runs OCR
If Secure is True the file is converted to Pixels and then recreated; else the censored sections are just covering the text below and can be easiliy removed with e.g. Inkscape
Saves the file to the given Destpath.
Args:
path: path to the pdf document
destpath: Path where the result is supposed to be saved to
@@ -614,8 +615,6 @@ def make_savepath(
destpath = pathlib.Path(savepath + file)
i = 0
info(destpath)
info(destpath.is_file())
while destpath.is_file():
file = filename + f"_{i}." + ftype
i += 1