fix Rbuildignore issues and tidy package
This commit is contained in:
parent
d8326e4521
commit
1455a6256c
3 changed files with 26 additions and 19 deletions
|
|
@ -7,5 +7,12 @@
|
||||||
.prettierrc.json
|
.prettierrc.json
|
||||||
.woodpecker
|
.woodpecker
|
||||||
devxy-arm64-r-binaries/
|
devxy-arm64-r-binaries/
|
||||||
PACKAGES.*
|
^PACKAGES.*
|
||||||
s3:*
|
s3:*
|
||||||
|
docker
|
||||||
|
.*.sh
|
||||||
|
Justfile
|
||||||
|
renovate.json
|
||||||
|
exec.R
|
||||||
|
get-all-pkg-versions.R
|
||||||
|
05-get-updated-cran-pkgs.R
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
Package: rBinaries
|
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
|
Version: 0.0.0.9000
|
||||||
Authors@R:
|
Authors@R:
|
||||||
person("First", "Last", , "first.last@example.com", role = c("aut", "cre"),
|
person("Patrick", "Schratz", , "mail@devxy.io", role = c("aut", "cre"))
|
||||||
comment = c(ORCID = "YOUR-ORCID-ID"))
|
|
||||||
Description: What the package does (one paragraph).
|
Description: What the package does (one paragraph).
|
||||||
License: GPL (>= 3)
|
License: GPL (>= 3)
|
||||||
Imports:
|
Imports:
|
||||||
|
|
@ -24,7 +23,9 @@ Imports:
|
||||||
xml2
|
xml2
|
||||||
Suggests:
|
Suggests:
|
||||||
dbplyr
|
dbplyr
|
||||||
|
Remotes:
|
||||||
|
pat-s/cranlike@s3,
|
||||||
|
pat-s/desc@description-from-remote
|
||||||
Encoding: UTF-8
|
Encoding: UTF-8
|
||||||
Roxygen: list(markdown = TRUE)
|
Roxygen: list(markdown = TRUE)
|
||||||
RoxygenNote: 7.3.2
|
RoxygenNote: 7.3.2
|
||||||
Remotes: pat-s/desc@description-from-remote, pat-s/cranlike@s3
|
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ get_updated_cran_packages <- function(date = lubridate::today()) {
|
||||||
feed <- get_cranberries_feed()
|
feed <- get_cranberries_feed()
|
||||||
|
|
||||||
# Apply the function to each item and bind the results into a data frame
|
# Apply the function to each item and bind the results into a data frame
|
||||||
results <- map(feed, ~ process_cranberries_rss(.x, date)) %>%
|
results <- purrr::map(feed, ~ process_cranberries_rss(.x, date)) %>%
|
||||||
list_rbind()
|
purrr::list_rbind()
|
||||||
|
|
||||||
return(results)
|
return(results)
|
||||||
}
|
}
|
||||||
|
|
@ -28,8 +28,8 @@ get_new_cran_packages <- function(date = lubridate::today()) {
|
||||||
feed <- get_cranberries_feed(type = "new")
|
feed <- get_cranberries_feed(type = "new")
|
||||||
|
|
||||||
# Apply the function to each item and bind the results into a data frame
|
# Apply the function to each item and bind the results into a data frame
|
||||||
results <- map(feed, ~ process_cranberries_rss(.x, date)) %>%
|
results <- purrr::map(feed, ~ process_cranberries_rss(.x, date)) %>%
|
||||||
list_rbind()
|
purrr::list_rbind()
|
||||||
|
|
||||||
return(results)
|
return(results)
|
||||||
}
|
}
|
||||||
|
|
@ -47,8 +47,8 @@ get_removed_cran_packages <- function(date = lubridate::today()) {
|
||||||
feed <- get_cranberries_feed(type = "removed")
|
feed <- get_cranberries_feed(type = "removed")
|
||||||
|
|
||||||
# Apply the function to each item and bind the results into a data frame
|
# Apply the function to each item and bind the results into a data frame
|
||||||
results <- map(feed, ~ process_cranberries_rss(.x, date)) %>%
|
results <- purrr::map(feed, ~ process_cranberries_rss(.x, date)) %>%
|
||||||
list_rbind()
|
purrr::list_rbind()
|
||||||
|
|
||||||
return(results)
|
return(results)
|
||||||
}
|
}
|
||||||
|
|
@ -61,10 +61,10 @@ get_cranberries_feed <- function(type = "updated") {
|
||||||
feed <- sprintf("https://dirk.eddelbuettel.com/cranberries/cran/%s/index.rss", type)
|
feed <- sprintf("https://dirk.eddelbuettel.com/cranberries/cran/%s/index.rss", type)
|
||||||
|
|
||||||
# Fetch and parse the RSS feed
|
# Fetch and parse the RSS feed
|
||||||
rss_content <- read_xml(feed)
|
rss_content <- xml2::read_xml(feed)
|
||||||
|
|
||||||
# Extract item nodes
|
# Extract item nodes
|
||||||
items <- xml_find_all(rss_content, "//item")
|
items <- xml2::xml_find_all(rss_content, "//item")
|
||||||
|
|
||||||
return(items)
|
return(items)
|
||||||
}
|
}
|
||||||
|
|
@ -73,12 +73,11 @@ get_cranberries_feed <- function(type = "updated") {
|
||||||
#' @importFrom xml2 xml_text xml_find_first
|
#' @importFrom xml2 xml_text xml_find_first
|
||||||
#' @export
|
#' @export
|
||||||
process_cranberries_rss <- function(feed, date = lubridate::today()) {
|
process_cranberries_rss <- function(feed, date = lubridate::today()) {
|
||||||
title <- xml_text(xml_find_first(feed, "title"))
|
title <- xml2::xml_text(xml_find_first(feed, "title"))
|
||||||
pub_date_text <- xml_text(xml_find_first(feed, "pubDate"))
|
pub_date_text <- xml2::xml_text(xml_find_first(feed, "pubDate"))
|
||||||
pub_date <- as_date(dmy_hms(pub_date_text))
|
pub_date <- lubridate::as_date(dmy_hms(pub_date_text))
|
||||||
# pub_date_interval <- interval(head(pub_date), tail(pub_date))
|
|
||||||
if (class(date) == "Date") {
|
if (class(date) == "Date") {
|
||||||
date <- interval(date, date)
|
date <- lubridate::interval(date, date)
|
||||||
}
|
}
|
||||||
|
|
||||||
# browser()
|
# browser()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue