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) |
+} |