GithubHelp home page GithubHelp logo

atoosaparsa / sassafras Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alpatania/sassafras

0.0 0.0 0.0 980 KB

Script that sorts unread Google Scholar Alerts from my email.

JavaScript 100.00%

sassafras's Introduction

SASSAFRAS

Simple Automatic Scholar Sorter Appropriate For Researchers And Scientists (credit for the awesome acronym goes to Thomas Varley)

This is a small script that looks for unread Google Scholar Alerts emails in your Gmail account and saves each paper in a Google Spreadsheet as:

Title/ Authors - Journal/ URL of the paper/Date/ number of Alerts that contained the paper

note: an older version had a search query column now substituted with the email time-stamp, you can still access that option by changing the date_not_query variable.

The possibilities are endless

Personally, I have an extra column with a Data Validation drop-down menu so i can mark the papers as I go through them. One can write a script that sends emails with the list of papers marked in a specific way, or the script can run automatically every Monday, or the day after your journal club to get new ideas!

Take a look at the available functions for GoogleSheets and Gmail to customize your own script.

How does it work?

The script reads the unread Google Scholar Alerts emails Gmail alerts

Then saves the article's information in a SpreadSheet separating published articles (in Papers) and pre-prints (in PrePrints) Google sheet

The script can also automatically send an email of the top papers being added (defaults: 5 published and 5 pre-prints) ordered by the number of occurrences. Gmail summary

How to run it:

  1. Open a new Google SpreadSheet
  2. Go to Tools > Script Editor
  3. Copy-paste the .gs files in the code folder.
  4. Customize the variable so they can work with your account
    sassafras.gs : change the SEARCH_QUERY variable so that it can detect your unread Google Scholar Alerts (test run it on your Gmail)
    summary.gs : change the emailAddress variable to your Gmail address.
  5. Choose the options that best suit you in sassafras.gs, or keep the following defaults:
  • del_emails // if true deletes the GoogleAlert emails as it reads their content otherwise it just marks them as "read";
  • send_summary // if true sends an email summary of the new top 10 papers added;
  • date_not_query // if true adds the date of the email in column 5, otherwise adds the subject of the GoogleAlert;
  • date_separator // if true adds a separator before writing the new papers' list in the GoogleSheet;
  • del_past // if true deletes past list of papers before adding the new one.
  1. Run the save_email function.

  1. OPTIONAL: substitute the RegEx for keyword search and sheets names in the labels variables in cleaning.gs if you need to clean/organize your list.
    8.1 Run the run_labels function to move published papers in Papers to a new Sheet with the label name
    8.2 Run the run_tag function to add a column to Preprints with the label assigned to the manuscript

The custom menu

The options.gs script has a function that will add a custom menu with selected sassafras functions to your SpreadSheet to make it easier to run.
To make it work the script just needs to be saved in your script editor, and refresh the page of your SpreadSheet. Custom menu

How to run the script automatically every week

  1. In Google Scripts go to Edit > Current project's triggers
  2. It will open a new page saying No results - Try adjusting your filter criteria or create a new trigger
  3. Click on create a new trigger
  • Choose to run the function saveEmails
  • Deployment Head
  • Select Event source Time-driven
  • Type of time based trigger Week timer
  • Select day and time you want the code to run at every week

sassafras's People

Contributors

alpatania avatar nevillepark avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.