# Download Collection Data from PubMed Collections as .csv via cron jobs
# ## cronR job
# ## id: job_1dcff1753b875b369367956867d93cc3
# ## tags: PubMed, journalwatch
# ## desc: download PubMed Collection
# 15 21 * * 6 /Library/Frameworks/R.framework/Resources/bin/Rscript '/Users/serdarbalciold/MyJournalWatch/downloadCollectionData.R' >> '/Users/serdarbalciold/MyJournalWatch/downloadCollectionData.log' 2>&1
# PBPathJournalWatchPubMedCollection
print(paste0("Download started for PBPath Journal Watch PubMed Collection at: ", Sys.time()))
PBPathJournalWatchPubMedCollectionURL <- "https://www.ncbi.nlm.nih.gov/portal/utils/streamer.cgi?request=%3CRequest%20version%3D%271%27%3E%3CCommand%20name%3D%27collection-save%27%3E%09%3CParam%20name%3D%27id%27%3E58240634%3C%2FParam%3E%09%3CParam%20name%3D%27format%27%3Ecsv%3C%2FParam%3E%09%3CParam%20name%3D%27sortKey%27%3Edate%3C%2FParam%3E%09%3CParam%20name%3D%27sortOrder%27%3Edescending%3C%2FParam%3E%20%20%3C%2FCommand%3E%3C%2FRequest%3E"
PBPathJournalWatchPubMedCollectionFile <- "~/MyJournalWatch/data/PBPathJournalWatchPubMedCollection.csv"
download.file(url = PBPathJournalWatchPubMedCollectionURL, destfile = PBPathJournalWatchPubMedCollectionFile)
Sys.sleep(10)
file.info(PBPathJournalWatchPubMedCollectionFile)$ctime
print(paste0("Download completed for PBPath Journal Watch PubMed Collection at: ", Sys.time()))
# Collection
# PBPathJournalWatchPubMedCollection <- readr::read_csv("https://www.ncbi.nlm.nih.gov/portal/utils/streamer.cgi?request=%3CRequest%20version%3D%271%27%3E%3CCommand%20name%3D%27collection-save%27%3E%09%3CParam%20name%3D%27id%27%3E58240634%3C%2FParam%3E%09%3CParam%20name%3D%27format%27%3Ecsv%3C%2FParam%3E%09%3CParam%20name%3D%27sortKey%27%3Edate%3C%2FParam%3E%09%3CParam%20name%3D%27sortOrder%27%3Edescending%3C%2FParam%3E%20%20%3C%2FCommand%3E%3C%2FRequest%3E")
# PBPathJournalWatchPubMedCollection <- readr::read_csv("~/downloads/PBPathJournalWatch (2).csv")
# Prepare Table
# PBPathJournalWatchPubMedCollection2 <- PBPathJournalWatchPubMedCollection %>%
# mutate(Link = paste0("https://www.ncbi.nlm.nih.gov", URL)) %>%
# select(Title, Link) %>%
# head(n=25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.