diff --git a/R/sysdata.rda b/R/sysdata.rda index 4452ff7..53b3c0b 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/README.Rmd b/README.Rmd index fbc1d86..208a633 100644 --- a/README.Rmd +++ b/README.Rmd @@ -32,7 +32,6 @@ results](https://badges.cranchecks.info/worst/resmush.svg)](https://cran.r-proje [![R-CMD-check](https://github.com/dieghernan/resmush/actions/workflows/check-full.yaml/badge.svg)](https://github.com/dieghernan/resmush/actions/workflows/check-full.yaml) [![R-hub](https://github.com/dieghernan/resmush/actions/workflows/rhub.yaml/badge.svg)](https://github.com/dieghernan/resmush/actions/workflows/rhub.yaml) [![codecov](https://codecov.io/gh/dieghernan/resmush/graph/badge.svg)](https://app.codecov.io/gh/dieghernan/resmush) -[![r-universe](https://dieghernan.r-universe.dev/badges/resmush)](https://dieghernan.r-universe.dev/resmush) [![CodeFactor](https://www.codefactor.io/repository/github/dieghernan/resmush/badge)](https://www.codefactor.io/repository/github/dieghernan/resmush) [![DOI](https://img.shields.io/badge/DOI-10.32614/CRAN.package.resmush-blue)](https://doi.org/10.32614/CRAN.package.resmush) [![Project Status: Active -- The project has reached a stable, usable state and @@ -79,8 +78,7 @@ You can install the development version of **resmush** from remotes::install_github("dieghernan/resmush") ``` -Alternatively, you can install **resmush** using the -[r-universe](https://dieghernan.r-universe.dev/resmush): +Alternatively, you can install **resmush** using the **r-universe+**: ```{r, eval=FALSE} # Install resmush in R: @@ -178,7 +176,7 @@ There are other alternatives for optimizing images with **R**: installed locally. | tool | CRAN | Additional software? | Online? | API Key? | Limits? | -|--------------|--------------|--------------|--------------|--------------|--------------| +|-------------------|------|----------------------|---------|----------|-----------------------------| | `xfun::tinify()` | Yes | No | Yes | Yes | 500 files/month (Free tier) | | `xfun::optipng()` | Yes | Yes | No | No | No | | **tinieR** | No | No | Yes | Yes | 500 files/month (Free tier) | diff --git a/README.md b/README.md index cc92901..44d53d3 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@ results](https://badges.cranchecks.info/worst/resmush.svg)](https://cran.r-proje [![R-CMD-check](https://github.com/dieghernan/resmush/actions/workflows/check-full.yaml/badge.svg)](https://github.com/dieghernan/resmush/actions/workflows/check-full.yaml) [![R-hub](https://github.com/dieghernan/resmush/actions/workflows/rhub.yaml/badge.svg)](https://github.com/dieghernan/resmush/actions/workflows/rhub.yaml) [![codecov](https://codecov.io/gh/dieghernan/resmush/graph/badge.svg)](https://app.codecov.io/gh/dieghernan/resmush) -[![r-universe](https://dieghernan.r-universe.dev/badges/resmush)](https://dieghernan.r-universe.dev/resmush) [![CodeFactor](https://www.codefactor.io/repository/github/dieghernan/resmush/badge)](https://www.codefactor.io/repository/github/dieghernan/resmush) [![DOI](https://img.shields.io/badge/DOI-10.32614/CRAN.package.resmush-blue)](https://doi.org/10.32614/CRAN.package.resmush) [![Project Status: Active – The project has reached a stable, usable @@ -61,8 +60,7 @@ You can install the development version of **resmush** from remotes::install_github("dieghernan/resmush") ``` -Alternatively, you can install **resmush** using the -[r-universe](https://dieghernan.r-universe.dev/resmush): +Alternatively, you can install **resmush** using the **r-universe+**: ``` r # Install resmush in R: diff --git a/codemeta.json b/codemeta.json index 47ce841..fe82bce 100644 --- a/codemeta.json +++ b/codemeta.json @@ -161,7 +161,7 @@ "SystemRequirements": null }, "keywords": ["r", "compress-images", "optimize-images", "resmushit", "api", "r-package"], - "fileSize": "677.416KB", + "fileSize": "676.942KB", "citation": [ { "@type": "SoftwareSourceCode", diff --git a/data-raw/res_example.R b/data-raw/res_example.R index fdd91b5..b6ec77b 100644 --- a/data-raw/res_example.R +++ b/data-raw/res_example.R @@ -25,10 +25,14 @@ jpg_url <- paste0( all_in <- c(png_url, notval, jpg_url, turl) res_example <- resmush_url(all_in) -res_example$dest_img <- gsub("C:\\Users\\diego\\AppData\\Local\\Temp", "", - res_example$dest_img, - fixed = TRUE + +# Anonimize folder + +res_example$dest_img <- basename(res_example$dest_img) + +res_example$dest_img <- ifelse(is.na(res_example$dest_img), + NA, file.path("some_folder", res_example$dest_img) ) -res_example$dest_img + usethis::use_data(res_example, overwrite = TRUE, internal = TRUE) diff --git a/revdep/README.md b/revdep/README.md index 88f3436..9de59cb 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -1,38 +1,37 @@ # Platform -|field |value | -|:--------|:----------------------------------------| -|version |R version 4.4.0 (2024-04-24 ucrt) | -|os |Windows 11 x64 (build 22631) | -|system |x86_64, mingw32 | -|ui |RStudio | -|language |(EN) | -|collate |Spanish_Spain.utf8 | -|ctype |Spanish_Spain.utf8 | -|tz |Europe/Madrid | -|date |2024-05-22 | -|rstudio |2024.04.1+748 Chocolate Cosmos (desktop) | -|pandoc |3.1.12.2 @ C:\PROGRA~1\Pandoc\pandoc.exe | +| field | value | +|:---------|:-------------------------------------------| +| version | R version 4.4.1 (2024-06-14 ucrt) | +| os | Windows 11 x64 (build 22631) | +| system | x86_64, mingw32 | +| ui | RStudio | +| language | (EN) | +| collate | Spanish_Spain.utf8 | +| ctype | Spanish_Spain.utf8 | +| tz | Europe/Madrid | +| date | 2024-07-19 | +| rstudio | 2024.04.2+764 Chocolate Cosmos (desktop) | +| pandoc | 3.1.12.2 \@ C:\PROGRA\~1\Pandoc\pandoc.exe | # Dependencies -|package |old |new |Δ | -|:---------|:-----|:-----|:--| -|resmush |0.1.0 |0.1.1 |* | -|askpass |1.2.0 |1.2.0 | | -|cli |3.6.2 |3.6.2 | | -|curl |5.2.1 |5.2.1 | | -|glue |1.7.0 |1.7.0 | | -|httr2 |1.0.1 |1.0.1 | | -|lifecycle |1.0.4 |1.0.4 | | -|magrittr |2.0.3 |2.0.3 | | -|openssl |2.2.0 |2.2.0 | | -|R6 |2.5.1 |2.5.1 | | -|rappdirs |0.3.3 |0.3.3 | | -|rlang |1.1.3 |1.1.3 | | -|sys |3.4.2 |3.4.2 | | -|vctrs |0.6.5 |0.6.5 | | -|withr |3.0.0 |3.0.0 | | +| package | old | new | Δ | +|:----------|:------|:------|:----| +| resmush | 0.1.1 | 0.2.0 | \* | +| askpass | 1.2.0 | 1.2.0 | | +| cli | 3.6.3 | 3.6.3 | | +| curl | 5.2.1 | 5.2.1 | | +| glue | 1.7.0 | 1.7.0 | | +| httr2 | 1.0.2 | 1.0.2 | | +| lifecycle | 1.0.4 | 1.0.4 | | +| magrittr | 2.0.3 | 2.0.3 | | +| openssl | 2.2.0 | 2.2.0 | | +| R6 | 2.5.1 | 2.5.1 | | +| rappdirs | 0.3.3 | 0.3.3 | | +| rlang | 1.1.4 | 1.1.4 | | +| sys | 3.4.2 | 3.4.2 | | +| vctrs | 0.6.5 | 0.6.5 | | +| withr | 3.0.0 | 3.0.0 | | # Revdeps - diff --git a/tests/testthat/_snaps/show_report.md b/tests/testthat/_snaps/show_report.md index 608e2a7..24ae0fd 100644 --- a/tests/testthat/_snaps/show_report.md +++ b/tests/testthat/_snaps/show_report.md @@ -6,11 +6,11 @@ == resmush summary ============================================================= i Input: 4 files with size 340.2 Kb v Success for 2 files: Size now is 153.8 Kb (was 340.2 Kb). Saved 186.4 Kb (54.79%). - See results in directory '/RtmpwZ55V8'. + See results in directory 'some_folder'. x Failed for 2 files in directories 'https://raw.githubusercontent.com/dieghernan/resmush/main' and 'https://dieghernan.github.io'. i Files not converted: ! 'https://raw.githubusercontent.com/dieghernan/resmush/main/README.md' (NA): - 403: Unauthorized extension. Allowed are : JPG, PNG, GIF, BMP, TIFF, WEBP. + 403: Unauthorized extension. Allowed are : JPG, PNG, GIF, BMP, TIFF. ! 'https://dieghernan.github.io/aaabbbccc.png' (NA): 401: Cannot copy from remote url. @@ -24,7 +24,7 @@ x Failed for 1 file in directory 'https://raw.githubusercontent.com/dieghernan/resmush/main'. i File not converted: ! 'https://raw.githubusercontent.com/dieghernan/resmush/main/README.md' (NA): - 403: Unauthorized extension. Allowed are : JPG, PNG, GIF, BMP, TIFF, WEBP. + 403: Unauthorized extension. Allowed are : JPG, PNG, GIF, BMP, TIFF. --- @@ -36,7 +36,7 @@ x Failed for 2 files in directories 'https://raw.githubusercontent.com/dieghernan/resmush/main' and 'https://dieghernan.github.io'. i Files not converted: ! 'https://raw.githubusercontent.com/dieghernan/resmush/main/README.md' (NA): - 403: Unauthorized extension. Allowed are : JPG, PNG, GIF, BMP, TIFF, WEBP. + 403: Unauthorized extension. Allowed are : JPG, PNG, GIF, BMP, TIFF. ! 'https://dieghernan.github.io/aaabbbccc.png' (NA): 401: Cannot copy from remote url. @@ -48,7 +48,7 @@ == resmush summary ============================================================= i Input: 1 file with size 239.9 Kb v Success for 1 file: Size now is 70.7 Kb (was 239.9 Kb). Saved 169.2 Kb (70.54%). - See result in directory '/RtmpwZ55V8'. + See result in directory 'some_folder'. --- @@ -58,7 +58,7 @@ == resmush summary ============================================================= i Input: 2 files with size 340.2 Kb v Success for 2 files: Size now is 153.8 Kb (was 340.2 Kb). Saved 186.4 Kb (54.79%). - See results in directory '/RtmpwZ55V8'. + See results in directory 'some_folder'. # Report for url @@ -68,10 +68,10 @@ == resmush summary ============================================================= i Input: 4 urls with size 340.2 Kb v Success for 2 urls: Size now is 153.8 Kb (was 340.2 Kb). Saved 186.4 Kb (54.79%). - See results in directory '/RtmpwZ55V8'. + See results in directory 'some_folder'. x Failed for 2 urls: ! : 403: - Unauthorized extension. Allowed are : JPG, PNG, GIF, BMP, TIFF, WEBP. + Unauthorized extension. Allowed are : JPG, PNG, GIF, BMP, TIFF. ! : 401: Cannot copy from remote url. @@ -84,7 +84,7 @@ i Input: 1 url with size 0 bytes x Failed for 1 url: ! : 403: - Unauthorized extension. Allowed are : JPG, PNG, GIF, BMP, TIFF, WEBP. + Unauthorized extension. Allowed are : JPG, PNG, GIF, BMP, TIFF. --- @@ -95,7 +95,7 @@ i Input: 2 urls with size 0 bytes x Failed for 2 urls: ! : 403: - Unauthorized extension. Allowed are : JPG, PNG, GIF, BMP, TIFF, WEBP. + Unauthorized extension. Allowed are : JPG, PNG, GIF, BMP, TIFF. ! : 401: Cannot copy from remote url. @@ -107,7 +107,7 @@ == resmush summary ============================================================= i Input: 1 url with size 239.9 Kb v Success for 1 url: Size now is 70.7 Kb (was 239.9 Kb). Saved 169.2 Kb (70.54%). - See result in directory '/RtmpwZ55V8'. + See result in directory 'some_folder'. --- @@ -117,5 +117,5 @@ == resmush summary ============================================================= i Input: 2 urls with size 340.2 Kb v Success for 2 urls: Size now is 153.8 Kb (was 340.2 Kb). Saved 186.4 Kb (54.79%). - See results in directory '/RtmpwZ55V8'. + See results in directory 'some_folder'. diff --git a/tests/testthat/test-show_report.R b/tests/testthat/test-show_report.R index 996bfd6..817e0e9 100644 --- a/tests/testthat/test-show_report.R +++ b/tests/testthat/test-show_report.R @@ -1,8 +1,5 @@ test_that("Report for local", { skip_on_cran() - skip_on_os("mac") - skip_on_os("linux") - skip_on_os("solaris") test_f <- res_example # Full @@ -23,9 +20,6 @@ test_that("Report for local", { test_that("Report for url", { skip_on_cran() - skip_on_os("mac") - skip_on_os("linux") - skip_on_os("solaris") test_f <- res_example # Full