I’m a big fan of subscribing to academic journals’ tables of contents in RSS form. It allows for quickly browsing all the recently published articles and flagging ones of interest for further reading.
I also depend on a reference manager to keep my articles of interest organized and accessible. Plus, it makes bibliography generation so much faster!
- When in feedly, make sure you are in the list view (Settings > Presentation > Title Only) as shown below:
- Hover over an article of interest and the Mendeley button will appear, as shown below. Click this button to open a new tab where Mendeley will import the article into your library:
Note, if the Mendeley button does not appear, check out the section “Choose which button the Mendeley importer replaces” below.
Before I wrote this script, I tried out the new “Custom Sharing Link” on feedly, which is only available if you go Pro (currently $5/mo or $45/year). It allows you to add just one custom URL button for sharing articles from feedly. That would have been sufficient for me – Mendeley provides import URLs that only require you to plug in a URL to the journal article’s website or the DOI of the article. But upon trying the custom URL, I found that not all the journal article URLs made available to feedly were actually in a format that the Mendeley import site could understand.
Upon clicking the custom sharing button, a new tab will open, showing whether Mendeley was able to extract the information from the URL provided by feedly via the Greasemonkey script. If the article information was found, just click the “Save” button and you’re done!
I wanted to decrease the number of clicks though, and also tag all articles that enter my library via this Mendeley URL. So I wrote another script, called MendeleyTagger, that adds a specific tag each time, and then sets the focus on the “Save” button so that I just have to hit the “Enter” key and it will import. Then, if the article is successfully imported, the MendeleyTagger script will cause the Mendeley import tab to close, returning to the feedly tab so I can continue through the list of remaining articles.
Choose which button the Mendeley importer replaces
If you don’t have feedly Pro, the default script behavior is fine for you – it replaces the custom sharing button with the Mendeley button. If you do have Pro and use that button for something else, or if you do not see a paper airplane button when you hover over an article title, you will need to edit one line of script to make the Mendeley button take over a different button (Twitter or Facebook are options for now; let me know if you want a different button replaced).
To change which button Mendeley takes over:
- After installing the feedly2Mendeley script, you will need to edit one word within the code. To edit the code in Greasemonkey, click the Greasemonkey button in the browser toolbar, choose “Manage user scripts…” and then find the “feedly2Mendeley” listing. Click its “Options” button, and in the dialog that opens, click the button at the bottom that says “Edit this user script”. To edit the code in Tampermonkey, click the Tampermonkey button and choose “Dashboard”. Then click on the “feedly2Mendeley” script title to open the script code in the editor.
- Scroll down to line 61, where it says:
ButtonToSwitch = "Custom";
- Replace “Custom” with either “Twitter” or “Facebook”.
- Save the changes: in Greasemonkey, click the “Save” button (second from left) at the top of the editor window. In Tampermonkey, click the save icon in the editor toolbar (second button from left, NOT the save to disk one) and then click “OK” to the dialog that pops up.
- Make sure the script is enabled and then reload your feedly page.
When Mendeley can’t find the journal article
The feedly2Mendeley script takes into account some of the odd URLs that are sometimes made available to feedly for the journal articles; odd URLS that the Mendeley importer can’t understand. In my case, URLs provided by eLife, ScienceDirect, and the Nature family of journals proved problematic. I was able to find solutions for them all, so that Mendeley can read them in. If you have trouble finding a workaround for another journal, feel free to let me know here or at my userscript site and I can help you out. Also feel free to leave feedback about the scripts and to customize the scripts for your own purposes, within the terms of the license.
Customizing the MendeleyTagger script
The MendeleyTagger script automatically adds a tag called “toread” to the import form. You can easily change this behavior to add a different tag, multiple tags, or no tag at all. To edit the script after you have installed it, first follow the steps to get into the script editor as detailed above in the “Choose which button the Mendeley importer replaces” section, except make sure you are editing the MendeleyTagger script and not the feedly2Mendeley one.
Then, scroll down to line 50, which reads:
If you want different tag(s) to appear in the import form, change “toread” to something else (for multiple tags, remember to separate by a “;”). If you do not want any tags to appear, simply comment out that line by adding two slashes to the beginning:
Then follow the instructions as above in the “Choose which button the Mendeley importer replaces” section for saving changes to your script.
EDIT: the userscripts site may be down. Note that these scripts will also always be available in a BitBucket repository.
*Note: feedly and Mendeley, the products represented in the post and images above, are copyrighted by their respective owners.