Skip to content

Commit

Permalink
Refactor gutenberg_download().
Browse files Browse the repository at this point in the history
  • Loading branch information
jonthegeek committed Aug 30, 2024
1 parent e3fc3ed commit e5f9d0f
Show file tree
Hide file tree
Showing 48 changed files with 13,462 additions and 531 deletions.
8 changes: 6 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ URL: https://docs.ropensci.org/gutenbergr/,
https://github.com/ropensci/gutenbergr
BugReports: https://github.com/ropensci/gutenbergr/issues
Depends:
R (>= 2.10)
R (>= 4.1)
Imports:
cli,
dplyr,
Expand All @@ -25,19 +25,23 @@ Imports:
magrittr,
purrr,
readr,
rlang,
stringr,
tibble,
urltools
Suggests:
curl,
knitr,
rmarkdown,
testthat,
tidyr,
tidytext
tidytext,
withr
VignetteBuilder:
knitr
Encoding: UTF-8
Language: en-US
LazyData: TRUE
LazyDataCompression: xz
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ importFrom(dplyr,count)
importFrom(dplyr,distinct)
importFrom(dplyr,filter)
importFrom(magrittr,"%>%")
importFrom(rlang,"%||%")
2 changes: 0 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

# gutenbergr 0.2.4

# New Version

* Update data scraping process to use R end-to-end (@jonthegeek, #36).

# gutenbergr 0.2.3 (2022-12-13)
Expand Down
20 changes: 20 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,23 @@
#'
#' @seealso \link{gutenberg_metadata}, \link{gutenberg_subjects}
"gutenberg_languages"


#' Sample Book Downloads
#'
#' A tibble of book text for two sample books, generated using
#' [gutenberg_download()].
#'
#' @details This code was used to download the books:
#' `gutenberg_download(c(109, 105), meta_fields = c("title", "author"))`
#'
#' @format A tbl_df (from [tibble::tibble()]) with one row for each
#' line of text from each book, with columns:
#' \describe{
#' \item{gutenberg_id}{Unique identifier for the work that can
#' be used to join with the \link{gutenberg_metadata} dataset.}
#' \item{text}{A character vector of lines of text.}
#' \item{title}{The title of this work.}
#' \item{author}{The author of this work.}
#' }
"sample_books"
Loading

0 comments on commit e5f9d0f

Please sign in to comment.