

If two file names have more than 90% match, it assumes that it’s the same article.

It uses the SequenceMatcher function from the difflib module. The matching part of the script compares each file name in the Google Drive with the file names in the local Mendeley folder. I don’t use the Android app to download PDFs anymore but I still have old PDFs that I didn’t take the time to rename. This might not be a big problem for new files but at some point Mendeley Desktop and the app I used on the tablet produced slightly different file names for the same article. I needed something slightly better than a rsync because it’s possible that the filenames are not the same between the two folders. The updateMendeley.py script is on the GitHub repo. I wrote a Python script that checks the Google Drive folder and Mendeley’s local folder, matches PDF files and syncs them.
