renanxcortes / springerquarantinebooksr Goto Github PK
View Code? Open in Web Editor NEWDownload all books made available by Springer during the COVID-19 quarantine!
Download all books made available by Springer during the COVID-19 quarantine!
After updating all packages, included dplyr, I am still getting the same error:
Error: (converted from warning) package 'dplyr' was built under R version 3.6.3
Execution halted
ERROR: lazy loading failed for package 'springerQuarantineBooksR'
Any suggestion how to proceed?
Thanks for your great work!!
package ‘rlang’ successfully unpacked and MD5 sums checked
Error: Failed to install 'springerQuarantineBooksR' from GitHub:
(converted from warning) cannot remove prior installation of package ‘rlang’
In addition: Warning messages:
1: In untar2(tarfile, files, list, exdir) :
skipping pax global extended headers
2: In untar2(tarfile, files, list, exdir) :
skipping pax global extended headers
hi, i cannot install the package. the error:
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools custom from https://cran.r-project.org/bin/windows/Rtools/.
√ checking for file 'C:\Users\javie\AppData\Local\Temp\RtmpiazejU\remotes3c1c50251966\renanxcortes-springerQuarantineBooksR-befa138/DESCRIPTION' ...
Installing package into ‘C:/Users/javie/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding
locale:
[1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252
[3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
[5] LC_TIME=Spanish_Spain.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] readxl_1.3.1
If you have any suggestions,
thanks for your help!
Trying to install the package (in multiple different Windows PCs) but encounter the error message
installation of package ‘C:/Users/Tim/AppData/Local/Temp/RtmpSETARB/file3ce4752013ff/springerQuarantineBooksR_0.1.0.tar.gz’ had non-zero exit status
Any help is greatly appreciated.
Allow to restart downloading titles from a certain position. I didn't fully dig into the code, but assuming that the order of the results from download_springer_table
is stable, it would be sufficient to change the definition of download_springer_book_files
to something like this:
download_springer_book_files <- function ([...], start = 1) {
[...]
for (title in springer_books_titles[start : lenght(springer_books_titles)]) {
[...]
}
[...]
}
Add also #16 (comment) in the German Books List
Currently, the package downloads all book files sequentially. It is worth to check the feasibility of parallel solutions. Possible options:
future_walk
or future_map
from furrr
(https://github.com/DavisVaughan/furrr)async
(https://github.com/r-lib/async)Thanks for creating this package and helping people with bulk downloading.
I installed, then loaded the package and then I executed download_springer_book_files(parallel = TRUE)
as suggested in your README
It downloads almost 7.5 Gb of PDFs in the default folder 'springer_quarantine_books', however, trying to open some of them with Adobe Acrobat Reader DC version 2020.006.20042, I get the following errors, from case to case, e.g.:
- "There was an error processing a page. Invalid ColorSpace"
I click OK and the PDF is blank with an gray background.
- "Cannot extract the embedded font 'Times-Roman'. Some characters may not display or print correctly."
I click OK then I get further:- "A drawing error occurred.". Click OK, then:
- "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem."
In the end the PDF is blank with a white background.
I get a similar error for './springer_quarantine_books\Business and Economics/Corporate Social Responsibility - 2013.pdf', but instead of referring to font 'Times-Roman', it mentions font IHMLIA+AdvP6975 (I presume this will vary from PDF to PDF).
When I download these books directly from Springer's link, I do not get the errors and the PDF can be read.
Any idea what might have happened?
Thanks so much for your support and help.
sessionInfo()
#> R version 3.6.2 (2019-12-12)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 18362)
#>
#> Matrix products: default
#>
#> locale:
#> [1] LC_COLLATE=English_United States.1252
#> [2] LC_CTYPE=English_United States.1252
#> [3] LC_MONETARY=English_United States.1252
#> [4] LC_NUMERIC=C
#> [5] LC_TIME=English_United States.1252
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> loaded via a namespace (and not attached):
#> [1] compiler_3.6.2 magrittr_1.5 tools_3.6.2 htmltools_0.4.0
#> [5] yaml_2.2.1 Rcpp_1.0.4.6 stringi_1.4.6 rmarkdown_2.1
#> [9] highr_0.8 knitr_1.28 stringr_1.4.0 xfun_0.13
#> [13] digest_0.6.25 rlang_0.4.5 evaluate_0.14
Created on 2020-04-26 by the reprex package (v0.3.0)
It would be great to have alos the possibility to get the German books also
How to obtain a list of all available e-books?
Springer seems to have updated their list of books, therefore xlsx-file that contains the list of books is not downloaded correctly.
Changing the end of line 21 in download_springer_table.R
from
books_list_url <- 'https://resource-cms.springernature.com/springer-cms/rest/v1/content/17858272/data/v4/'
to
books_list_url <- 'https://resource-cms.springernature.com/springer-cms/rest/v1/content/17858272/data/v5/'
fixes the problem (i.e., replace the v4
with v5
)
Currently, due to the fact that the package works with the book title (in order to facilitate the creation of subgroups of books by title), It fetches the latest edition of each book. In fact, that's why the number of books generated is lower than the number of lines of the .xlsx
file catalog that springer made available. Perhaps, it is worth to check an alternative to download all editions of the same book.
I am having an issue downloading all the Springer books. I end up getting all the book files by running downloadspringerbook_files(); however, they are all 14KB.
Currnetly, the package is not pulling appropriately books with ":" on their title.
Great package!
I tried the function download_springer_book_files()
but it seems that the same book is downloaded (the file name is correct). An issue with the URL maybe?
Package installed 1 hour ago.
I tried to install this package on a brand-new PC with the latest version of R just installed. I first installed the devtools package, and then ran the following code
devtools::install_github("renanxcortes/springerQuarantineBooksR", force=T)
It returns the error message:
Error: Failed to install 'springerQuarantineBooksR' from GitHub:
(converted from warning) cannot remove prior installation of package ‘rlang’
It is a brand-new PC with freshly installed R. What can the problem? Thanks!
Currently, the package downloads only the .pdf extensions of the books. It worth to add also the .epub versions also. Probably, some kind of filetype = 'epub'
argument inside generate_springer_book_files
.
Commas, spaces and some other non-alphanumeric characters are problematic. Please correct the directory and file names. Thank you very much.
Hi! First of all, thanks for the code!
I work with R 3.6.3 version and I used this lines to download the ebooks:
setwd("my path")
download_springer_book_files()
At the end of the process, it appear on the console:
Warning messages:
1: In if (!dir.exists(current_folder)) { :
the condition has length > 1 and only the first element will be used
2: In if (!dir.exists(current_folder)) { :
the condition has length > 1 and only the first element will be used
And I didn't get the books. What am I supposed to do?
Currently, the package assumes the file is not present in the folders. It worth checking its existence before generating the GET
request.
Hello,
i'm trying to install this repo and its showing some errors
> devtools::install_github("renanxcortes/springerQuarantineBooksR", force = T)
Downloading GitHub repo renanxcortes/springerQuarantineBooksR@master
√ checking for file 'C:\Users\Dunnlab\AppData\Local\Temp\Rtmp4AYpjB\remotes290446b5124b\renanxcortes-springerQuarantineBooksR-6278667/DESCRIPTION' (533ms)
- preparing 'springerQuarantineBooksR':
√ checking DESCRIPTION meta-information ...
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'springerQuarantineBooksR_0.1.0.tar.gz'
Installing package into ‘C:/Users/Dunnlab/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'springerQuarantineBooksR' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error: (converted from warning) package 'janitor' was built under R version 3.6.3
Execution halted
ERROR: lazy loading failed for package 'springerQuarantineBooksR'
* removing 'C:/Users/Dunnlab/Documents/R/win-library/3.6/springerQuarantineBooksR'
Error: Failed to install 'springerQuarantineBooksR' from GitHub:
(converted from warning) installation of package ‘C:/Users/Dunnlab/AppData/Local/Temp/Rtmp4AYpjB/file290433322c75/springerQuarantineBooksR_0.1.0.tar.gz’ had non-zero exit status
below is the session info
sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252
[4] LC_NUMERIC=C LC_TIME=English_Canada.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] rstudioapi_0.11 magrittr_1.5 usethis_1.6.1 devtools_2.3.0 pkgload_1.0.2 R6_2.4.1
[7] rlang_0.4.6 fansi_0.4.1 tools_3.6.1 pkgbuild_1.0.8 sessioninfo_1.1.1 cli_2.0.2
[13] withr_2.2.0 ellipsis_0.3.0 remotes_2.1.1 assertthat_0.2.1 digest_0.6.25 rprojroot_1.3-2
[19] crayon_1.3.4 processx_3.4.2 callr_3.4.3 fs_1.4.1 ps_1.3.2 curl_4.3
[25] testthat_2.3.2 memoise_1.1.0 glue_1.4.0 compiler_3.6.1 desc_1.2.0 backports_1.1.6
[31] prettyunits_1.1.1
Using Force=T didn't help either.
Here's the full log from the console:
Installing package into ‘C:/Users/Ariel Karlinsky/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'springerQuarantineBooksR' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error: (converted from warning) package 'httr' was built under R version 3.6.1
Execution halted
ERROR: lazy loading failed for package 'springerQuarantineBooksR'
* removing 'C:/Users/Ariel Karlinsky/Documents/R/win-library/3.6/springerQuarantineBooksR'
Error: Failed to install 'springerQuarantineBooksR' from GitHub:
(converted from warning) installation of package ‘C:/Users/ARIELK~1/AppData/Local/Temp/Rtmpyw2fkh/file271c4d4a64e/springerQuarantineBooksR_0.1.0.tar.gz’ had non-zero exit status
I'm running R 3.6.3, Mac 10.12.6.
Output file:
The downloaded binary packages are in
/var/folders/vd/td5slcr12ts4rfxgx06vvrww0000gp/T//RtmpmdFVWg/downloaded_packages
checking for file ‘/private/var/folders/vd/td5slcr12ts4rfxgx06vvrww0000gp/T/RtmpmdFVWg/remotes1c94e592bbe/renanxcortes-springerQuarantineBooksR-73b513e/DESCRIPTION’ ...
setwd("Zipped 2")
Error in setwd("Zipped 2") : cannot change working directory
download_springer_book_files()
Error in download_springer_book_files() :
could not find function "download_springer_book_files"
Thanks in advance for any suggestions
Good job with the package! By the way, when trying to run "download_springer_book_files()" I get an error. The code I run:
devtools::install_github("renanxcortes/springerQuarantineBooksR") library(springerQuarantineBooksR) setwd('G:/.../Springer Ebooks') download_springer_book_files()
And the error:
Downloading title latest editions. Processing... Fundamentals of Power Electronics (1 out of 391) Error in http_error(get_file) : could not find function "http_error"
Is it common? Is there a way to solve it? By the way, i use R version 4.0.0 (2020-04-24).
Thank you,
Pau
Can not open (linux) directory using setwd('path')
I have tried the package But it does not work. Then, I open the source code and change it a little. After the modification, It works fine
More explenation in this file
https://docs.google.com/document/d/1kqVkQDah3CtqHT1ejafI5HLxardKa8GI1D5gjuxmoW0/edit
I am using R 3.6.1 and tried to installed the new version but didn't work. So how can I use your codes for R 3.6.1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.