Automatic download of freely available Springer books during COVID-19 quarentine
Recently Springer has made available for free a collection of key textbooks so that educators, students and academics could use them during the COVID-19 quarentine. There are more than 500 textbooks on different disciplines and in English and German languages. The detailed list of textbooks can be found here.
Thinking about facilitating the access to this textbooks collection the project
springerQuarantineBooksR, written in R, has been developed to download all of them automatically. Here I’ll describe here a step-by-step procedure to download, install and use the project’s package.
[EDIT] As a reader mentioned, the
generate_springer_book_files()function shown below has been modified to
download_springer_book_files(), because the project has evolved, changing the function’s name. But the idea behind downloading all books or just a set of books from Springer remains the same.
1. First you need to have the R environment installed:
$ sudo apt install r-base
2. I’m using Ubuntu 18.04, so in order for you to download the
springerQuarantineBooksR package you need first another package called
devtools. Devtools has some dependencies that we need to download:
$ sudo apt install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev
3. With the R environment set and dependencies installed we can access the R environment:
$ sudo -i R
4. Now it’s time to download the devtools package:
5. Devtools maked available a function to download and install github repositories to our own R environment. Using the install_github() function, it’s possible to download and install the
6. After installing the package we need to load the package’s functions:
7. Finally we have to set the download folder and start downloading the textbook’s pdfs. You’ll need 7.27GB for the generated repositority.
> tic("Total time: ")
Alternative procedure to download specific books
The procedure detailed above generates a folder with 20 subfolders, one for each of the disciplines the books encompass. Alternatively you can download just specific books. In order to do that, access this URL and download the “Free English textbook titles (all disciplines)” spreadsheet.
Open the spreadsheet and select the rows of books you want to download, delete the rest. As an example, I ordered the books by the column “English Package Name” and selected just the Computer Science books, deleting the other, leaving only 48 rows.
With the spreadsheet set, follow the steps below to download this book selection:
1. Enter the R environment, load the
springerQuarantineBooksR package and define the path to the download folder:
$ sudo -i R
2. Set a
springer_table variable with the spreadsheet contents:
> springer_table <- read_excel("path-to-spreadsheet.xlsx")
3. Start to download the files:
Enjoy and happy reading!
Other interesting topics:
- Devtools: https://github.com/r-lib/devtools
- How to Install R Packages using devtools on Ubuntu 18.04: https://www.digitalocean.com/community/tutorials/how-to-install-r-packages-using-devtools-on-ubuntu-18-04
- springerQuarantineBooksR project: https://github.com/renanxcortes/springerQuarantineBooksR