Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: R/download_devbuilds_list.R

Issue 29336289: devbuild
Patch Set: Created Feb. 12, 2016, 1:53 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « R/download_default_easylist_subscriptions.R ('k') | R/filter_devbuilds.R » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: R/download_devbuilds_list.R
diff --git a/R/download_devbuilds_list.R b/R/download_devbuilds_list.R
new file mode 100644
index 0000000000000000000000000000000000000000..133ad41d0bd7e12d172586a9008367197dfed775
--- /dev/null
+++ b/R/download_devbuilds_list.R
@@ -0,0 +1,19 @@
+#' Downloads the current list of published adblockplus devbuilds.
+#' @description
+#' Output data.table: datetime, version, addonName
+#' @keywords download devbuilds
+#' @export
+
+download_devbuilds_list <- function(){
+ path_script <- system.file("download_devbuilds_list.sh",
+ package = "bbbi", mustWork = TRUE)
+ devbuilds <- system(path_script, intern = TRUE, ignore.stderr = TRUE)
+ devbuilds <- data.frame(do.call(rbind, strsplit(devbuilds, ",")))
+ names(devbuilds) <- c("datetime", "addonVersion", "addonName")
+ dateformat <- "%Y-%m-%d %H:%M"
+ devbuilds$datetime <- as.POSIXct(devbuilds$datetime, format = dateformat, tz = "UTC")
+ devbuilds$date <- as.Date(devbuilds$datetime)
+ devbuilds <- devbuilds[order(devbuilds$datetime),]
+ row.names(devbuilds) <- 1:nrow(devbuilds)
+ return(devbuilds)
+}
« no previous file with comments | « R/download_default_easylist_subscriptions.R ('k') | R/filter_devbuilds.R » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld