MicheleCotrufo / pdf-renamer

A python tool to automatically rename the pdf files of scientific publications by looking up the publication metadata on the web.
132 stars 21 forks source link

Only the first file is handled #19

Closed user202729 closed 6 months ago

user202729 commented 6 months ago

Even though it's advertised that multiple paths can be passed.

Caused by the following piece of code:

    ## The following block of code (until ##END) is required to make sure that 'path' is considered a required parameter, except for the case when
    ## -install--right--click or -uninstall--right--click are used, or when the user is setting default values for some of the parameters
    if isinstance(args.path,list):
        if len(args.path)>0:
            target = args.path[0]
        else:
            target = ""
    else:
        target = args.path

(it's identical to https://github.com/MicheleCotrufo/pdf2bib/issues/12 , yes)

MicheleCotrufo commented 6 months ago

Not sure what you mean that "it's advertised that multiple paths can be passed". The path can be either a folder (potentially containing multiple pdf files) or a single pdf file

positional arguments: path Relative path of the target pdf file or of the targe folder.