Skip to content

Commit

Permalink
Add publish.R without password.
Browse files Browse the repository at this point in the history
  • Loading branch information
arencambre committed May 12, 2020
1 parent 74bdaa3 commit 71e5f3b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions publish.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
if (!require('knitr')) {install.packages("knitr")}
if (!require('devtools')) {install.packages("devtools")}
if (!require('RWordPress')) {devtools::install_github(c("duncantl/XMLRPC", "duncantl/RWordPress"))}

library(knitr)
library(RWordPress)
library(keyring)

#' Before the below commands will work, you need to run both of these from
#' the console to set the username and password:
#' key_set("blog_password")

options(WordpressLogin = c("Aren Cambre" = key_get("blog_password")),
WordpressURL = 'https://www.arencambre.com/xmlrpc.php')

knit2wp('index.Rmd',
title = 'Who is Wylie H. Dallas?',
publish = FALSE,
action = "editPost",
postid = 2818)

0 comments on commit 71e5f3b

Please sign in to comment.