Browse Source

fixed ios parser

master
boB Rudis 5 years ago
parent
commit
aadbcc0ed2
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 4
      DESCRIPTION
  2. 5
      R/ios.R
  3. 19
      README.Rmd
  4. BIN
      README_cache/gfm/apache_64e645fe0c4206c6b0aac44aeaeabcb0.RData
  5. BIN
      README_cache/gfm/apache_64e645fe0c4206c6b0aac44aeaeabcb0.rdx
  6. BIN
      README_cache/gfm/apache_bcea6c038a05f961e12f724d55c9eeb0.RData
  7. 0
      README_cache/gfm/apache_bcea6c038a05f961e12f724d55c9eeb0.rdb
  8. BIN
      README_cache/gfm/apache_bcea6c038a05f961e12f724d55c9eeb0.rdx

4
DESCRIPTION

@ -18,14 +18,14 @@ License: MIT + file LICENSE
Suggests:
testthat,
covr,
tibble (>= 2.0.1)
tibble
Depends:
R (>= 3.2.0)
Imports:
purrr,
rvest,
readr,
dplyr (>= 0.7.8),
dplyr,
stringi,
semver,
lubridate,

5
R/ios.R

@ -16,7 +16,7 @@ apple_ios_version_history <- function() {
vers_nodes <- rvest::html_nodes(pg, xpath=".//th[contains(@id, '.') or contains(., '.')]")
dplyr::data_frame(
dplyr::tibble(
vers = rvest::html_text(vers_nodes),
rls_date = purrr::map_chr(
vers_nodes,
@ -40,13 +40,14 @@ apple_ios_version_history <- function() {
c_d <- stri_extract_all_regex(more_complex$rls_date, "[[:alpha:]]{2,}[[:space:]]+[[:digit:]]{1,2},[[:space:]]+[[:digit:]]{4}")
purrr::map2_df(c_v, c_d, ~{
dplyr::data_frame(
dplyr::tibble(
vers = .x,
rls_date = .y
)
}) -> more_complex
dplyr::bind_rows(simple, more_complex) %>%
dplyr::mutate(vers = stri_trim_both(vers)) %>%
dplyr::mutate(rls_date = lubridate::mdy(rls_date)) %>%
dplyr::filter(!stri_detect_fixed(vers, "Beta")) %>%
dplyr::mutate(

19
README.Rmd

@ -3,7 +3,14 @@ output: rmarkdown::github_document
editor_options:
chunk_output_type: console
---
```{r include=FALSE}
knitr::opts_chunk$set(
message = FALSE,
warning = FALSE,
fig.retina = 2
)
options(width=120)
```
# vershist
Collect Version Histories For Vendor Products
@ -44,16 +51,16 @@ Utility:
## Installation
```{r eval=FALSE}
devtools::install_git("https://git.sr.ht/~hrbrmstr/vershist")
# OR
devtools::install_gitlab("hrbrmstr/vershist")
# OR
devtools::install_github("hrbrmstr/vershist")
```
```{r message=FALSE, warning=FALSE, error=FALSE, include=FALSE}
options(width=120)
```
## Usage
```{r message=FALSE, warning=FALSE, error=FALSE}
```{r}
library(vershist)
# current verison

BIN
README_cache/gfm/apache_64e645fe0c4206c6b0aac44aeaeabcb0.RData

Binary file not shown.

BIN
README_cache/gfm/apache_64e645fe0c4206c6b0aac44aeaeabcb0.rdx

Binary file not shown.

BIN
README_cache/gfm/apache_bcea6c038a05f961e12f724d55c9eeb0.RData

Binary file not shown.

0
README_cache/gfm/apache_64e645fe0c4206c6b0aac44aeaeabcb0.rdb → README_cache/gfm/apache_bcea6c038a05f961e12f724d55c9eeb0.rdb

BIN
README_cache/gfm/apache_bcea6c038a05f961e12f724d55c9eeb0.rdx

Binary file not shown.
Loading…
Cancel
Save