pdftitle icon indicating copy to clipboard operation
pdftitle copied to clipboard

feat: pass args via run

Open dwahdany opened this issue 1 year ago • 1 comments

Fixes #33

This should be the most minimal-invasive way of passing arguments to pdftitle when calling it from another python module. It allows the module to be used in conjunction with contextlib as shown in the following example

import pdftitle
from contextlib import redirect_stdout
import io
with redirect_stdout(io.StringIO()) as s:
    pdftitle.run(['-p', file_path, '-a', 'max2'])
title = s.getvalue()

dwahdany avatar May 11 '23 10:05 dwahdany

Actually I didnt plan pdftitle to be embedded or used as a library, it is a command line utility, so none of such uses are considered. However, it seems there is an interest in this but I probably have to change more.

metebalci avatar Aug 28 '23 07:08 metebalci