User guide

Installation

If you have an anaconda environment with python >= 3.6 installed, you can install refy with:

pip install refy

Usage

The .bib file

Refy uses a .bib file with metadata about papers you've read before (see Overview). Most frequently used reference managers allow you to export publication data in a .bib file from your library (or a selection of papers). Once you've created you .bib file, keep track of it's path on your computer.

By the way, you can see an example .bib file here.

Getting recommendations

Refy is a python package, so you can use it as you normally use python. In the terminal, a .py script or a Jupyter notebook. This is the code you need to get a set of recommendations:

import refy

refy.Recomender(
 'library.bib',            # path to your .bib file
  n_days=30,               # fetch preprints from the last N days
  html_path="test.html",   # save results to a .html (Optional)
  N=10                     # number of recomended papers 
)

refy.Recomender is the class that takes care of loading your paper's metadata from your .bib file, downloading the latest preprints and selecting the most relevant ones (see Under the hood). The first argument, library.bib is the path to the .bib file we just created. Next, n_days allows you to decide how far in the past you want to go. Do you want yesterday's preprints? n_days=1. Want the last week? Then n_days=7, etc... How many preprints do you want to have recommended to you? You can use the N argument for that.

Once Recomender has done it's job, it will print to the terminal a list of recommended papers with their authors, titles and links. It will look something like this:

In addition, you can have the same output saved to a HTML file for visualizing it in a web browser. That's what the html_path argument is for. You can pass a path to where you want your HTML file to be saved to.

Taking it further

You can have a look at Under the hood if you want more details about how refy works, but more importantly you should check setting up GitHub actions to see how you can setup refy to work automatically and periodically online.

Last updated