#!/usr/bin/env python # coding: utf-8 # ## Use Pubmed-Sieve to build a PubMed query and RSS Feed from a Google Sheet. # # **Tutorial Here:**: https://hershbhargava.com/writing/adaptively-following-the-scientific-literature/ # # **Example Google Sheet Here:** https://docs.google.com/spreadsheets/d/1HD52dXGvVEHbBejDzUAzVhsvi_T3RT99uNhGzHZlQjo # # **Google Sheet Template Here (File > Make a Copy):** https://docs.google.com/spreadsheets/d/181rDSN6aB1zjKiPIP4Ai6bRNnnXx6GTPqNsVxNk1kB8 # # **_Make sure your sheet permissions are set to 'Anyone with the Link can View'_** # ### Paste your sheet URL in place of mine below. # # then run all cells to get your output. # In[1]: url = "https://docs.google.com/spreadsheets/d/1HD52dXGvVEHbBejDzUAzVhsvi_T3RT99uNhGzHZlQjo" feed_name = 'Your Pubmed-Sieve Feed' # In[2]: import pubmed_sieve as sieve # Generate the query query = sieve.build_query_from_spreadsheet_url(url) # Generate the RSS link (requires Chromium browser) rss_url = sieve.gen_pubmed_rss_link_for_query(feed_name=feed_name, query_string=query) print('\nPubmed RSS Feed URL: %s' % rss_url) print('\nRaw Pubmed Query String (try pasting it here: https://pubmed.ncbi.nlm.nih.gov/): \n\n%s' % query) # In[ ]: # In[ ]: