MicheleCotrufo / pdf2bib

A python library/command-line tool to quickly and automatically generate BibTeX data starting from the pdf file of a scientific publication.
58 stars 7 forks source link

Improved verbosity and error codes #9

Open luarpy opened 1 year ago

luarpy commented 1 year ago

I think it would be advisable to generate an output text according to whether or not there have been errors in the acquisition process. By this I mean, in case no metadata was found, to indicate with an output error 1 that the program has failed. Currently in Linux at least, it can be seen that the execution code remains at 0, i.e. there have been no problems or errors.

Another example of use is when the -clip argument is added to copy to the clipboard, even if no metadata could be found, it still prints All bibtex entries found in will be copied into the system clipboard, which leads the user to think that something could be found but in fact it was not. Also, the error/problems text should be printed to the standard error output and not to the standard error.

Can I make a PR to contribute in this part?

MicheleCotrufo commented 4 months ago

Sorry, I have been busy with other things and just now found this comment. Of course, feel free to PR! :)