Science-for-Nature-and-People / BibScan

R package to batch download PDFs from a Web of Science search
5 stars 8 forks source link

Improve PDF filenames from the publisher's default #20

Open brunj7 opened 6 years ago

brunj7 commented 6 years ago

See if we can rename the file with more explanatory names

nathanhwangbo commented 4 years ago

I started looking into this. My approach is just renaming the file using file.rename() in the for loop of article_pdf_download(). Thinking about using maybe publication year and first author?

nathanhwangbo commented 4 years ago

I have a partial implementation for this, which saves files using (name)(publication year)_(doi).pdf We can't have backslashes in the filename, so I replaced the \ in the doi with ..

To do

I had to use regex to try and pull out the first author name. Some of the papers start with first name, and some start with last name though, so the name isn't consistent.

We can try to figure out how to consistently pull out the last name.