Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Picking up wrong publication #17

Open
vasutweaks opened this issue Jan 16, 2024 · 3 comments
Open

Picking up wrong publication #17

vasutweaks opened this issue Jan 16, 2024 · 3 comments

Comments

@vasutweaks
Copy link

I am trying to rename following publication
https://www.swpc.noaa.gov/sites/default/files/images/u30/Murphy%2C%20A.H.%2C%20and%20E.S.%20Epstein%2C%201989.pdf
with command
pdfrenamer -fr -max_words_title 6 -f "{Aetal}-{YYYY}-{T}" Murphy,\ A.H.,\ and\ E.S.\ Epstein,\ 1989.pdf
Now it picked up an entirely different paper and renamed it to
Summaries of changes done:
Murphy, A.H., and E.S. Epstein, 1989.pdf
---> Wilks-2001-A skill score based on economic.pdf
available at https://rmets.onlinelibrary.wiley.com/doi/pdf/10.1017/S1350482701002092
I have come across this problem multiple times.

@MicheleCotrufo
Copy link
Owner

Yeah, this is an unfortunate issue with many old publications. It is just due to the fact that pdf was not crafted very well, so the script can't find the DOI of the paper. Then, it starts making "educated guesses" based on the text inside the pdf file. In this case, it fails. Unfortunately there isn't an easy way to address this.

The only workaround is to identify yourself the DOI of the paper, and associate to the pdf file with this method https://github.com/MicheleCotrufo/pdf2doi?tab=readme-ov-file#manually-associate-the-correct-identifier-to-a-file
Then, if you run again pdf-renamer on the same file, it should work well.

@vasutweaks
Copy link
Author

Please add an option to say yes/no to a proposed rename. Because many guesses are wrong, no point in renaming to that.

@MicheleCotrufo
Copy link
Owner

Hi, this is an interesting suggestion, however I am not sure what the best way to implement it would be. If I make it such that, for any paper, it asks to confirm the proposed rename, it would slow down the process too much (especially when renaming a bunch of papers in a folder).

I could add a command line option (something link ' -confirm') that asks for confirmation before renaming it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants