diff --git a/.Rbuildignore b/.Rbuildignore index 7865738..8eead88 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,5 +7,12 @@ .prettierrc.json .woodpecker devxy-arm64-r-binaries/ -PACKAGES.* -s3:* \ No newline at end of file +^PACKAGES.* +s3:* +docker +.*.sh +Justfile +renovate.json +exec.R +get-all-pkg-versions.R +05-get-updated-cran-pkgs.R \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index 7ae36cd..d1bb770 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,9 +1,8 @@ Package: rBinaries -Title: What the Package Does (One Line, Title Case) +Title: Toolbox for building R package binaries on Linux Version: 0.0.0.9000 Authors@R: - person("First", "Last", , "first.last@example.com", role = c("aut", "cre"), - comment = c(ORCID = "YOUR-ORCID-ID")) + person("Patrick", "Schratz", , "mail@devxy.io", role = c("aut", "cre")) Description: What the package does (one paragraph). License: GPL (>= 3) Imports: @@ -24,7 +23,9 @@ Imports: xml2 Suggests: dbplyr +Remotes: + pat-s/cranlike@s3, + pat-s/desc@description-from-remote Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 -Remotes: pat-s/desc@description-from-remote, pat-s/cranlike@s3 diff --git a/R/get_updated_packages.R b/R/get_updated_packages.R index c7942fd..8dc0f60 100644 --- a/R/get_updated_packages.R +++ b/R/get_updated_packages.R @@ -9,8 +9,8 @@ get_updated_cran_packages <- function(date = lubridate::today()) { feed <- get_cranberries_feed() # Apply the function to each item and bind the results into a data frame - results <- map(feed, ~ process_cranberries_rss(.x, date)) %>% - list_rbind() + results <- purrr::map(feed, ~ process_cranberries_rss(.x, date)) %>% + purrr::list_rbind() return(results) } @@ -28,8 +28,8 @@ get_new_cran_packages <- function(date = lubridate::today()) { feed <- get_cranberries_feed(type = "new") # Apply the function to each item and bind the results into a data frame - results <- map(feed, ~ process_cranberries_rss(.x, date)) %>% - list_rbind() + results <- purrr::map(feed, ~ process_cranberries_rss(.x, date)) %>% + purrr::list_rbind() return(results) } @@ -47,8 +47,8 @@ get_removed_cran_packages <- function(date = lubridate::today()) { feed <- get_cranberries_feed(type = "removed") # Apply the function to each item and bind the results into a data frame - results <- map(feed, ~ process_cranberries_rss(.x, date)) %>% - list_rbind() + results <- purrr::map(feed, ~ process_cranberries_rss(.x, date)) %>% + purrr::list_rbind() return(results) } @@ -61,10 +61,10 @@ get_cranberries_feed <- function(type = "updated") { feed <- sprintf("https://dirk.eddelbuettel.com/cranberries/cran/%s/index.rss", type) # Fetch and parse the RSS feed - rss_content <- read_xml(feed) + rss_content <- xml2::read_xml(feed) # Extract item nodes - items <- xml_find_all(rss_content, "//item") + items <- xml2::xml_find_all(rss_content, "//item") return(items) } @@ -73,12 +73,11 @@ get_cranberries_feed <- function(type = "updated") { #' @importFrom xml2 xml_text xml_find_first #' @export process_cranberries_rss <- function(feed, date = lubridate::today()) { - title <- xml_text(xml_find_first(feed, "title")) - pub_date_text <- xml_text(xml_find_first(feed, "pubDate")) - pub_date <- as_date(dmy_hms(pub_date_text)) - # pub_date_interval <- interval(head(pub_date), tail(pub_date)) + title <- xml2::xml_text(xml_find_first(feed, "title")) + pub_date_text <- xml2::xml_text(xml_find_first(feed, "pubDate")) + pub_date <- lubridate::as_date(dmy_hms(pub_date_text)) if (class(date) == "Date") { - date <- interval(date, date) + date <- lubridate::interval(date, date) } # browser()