R/WP_new_articles.R

### publish WordPress ----

if ( (length(newPMIDList_pancreas$X1) + 
      length(newPMIDList_gallbladder$X1) +
      length(newPMIDList_bileducts$X1) + 
      length(newPMIDList_ampulla$X1)
) > 0
) {

inputWP <- "~/JournalWatchPBPath/candidates/WP.md"

titleWP <- paste0("Recent Articles on Pancreatobiliary #Pathology - ", Sys.Date())

knitr::knit2wp(
    input = inputWP,
    title = titleWP,
    shortcode = TRUE,
    categories = c("pathology",
                   "PBPath",
                   "articles"
                   ),
    action = "newPost",
    publish = TRUE
)
    
}

Sys.sleep(10)
sbalci/AutoJournalWatch documentation built on Aug. 13, 2020, 4:18 p.m.