The Mathworks File Exchange does not allow .exe or .dll files to be included in submissions. But sometimes a submission requires compiled external libraries. This submission enables seamless downloading and installation of forbidden files through a zip file hosted through Google Sites.
By default it will unpack a 2MB zip file containing a converter for turning IDTF files into U3D files (useful for making 3D pdf figures from meshes).
Francis Esmonde-White (2019). Install package requirements automatically from a zip file hosted on Google Sites. (https://www.mathworks.com/matlabcentral/fileexchange/31414-install-package-requirements-automatically-from-a-zip-file-hosted-on-google-sites), MATLAB Central File Exchange. Retrieved .
Thanks for the helpful feedback. I have implemented points 2 and 3 (below) in the new code revision.
1. The benefit of using Google's redirection method is that I currently host my web site through Google Sites. It's the most obvious (and easy) place for me to locate files. Since Google Sites uses this redirection scheme, I'm adapting to their setup.
2. Good idea with urlread.
3. Good idea with the extra error handling.
4. The short answer: I'm not sure.
The long answer: I don't have access to any IP or download count data through my Google Sites or Google Analytics accounts. I do have a list of the number of people visiting the page that the files is attached through. That data includes the geographic location and generic browser information, but not IP level data. Google may collect more information about visitors.
I cannot test the function currently, therefore I do not rate it. It has a H1 line, a complete help text and comments in the code. A message appears about what happens in the background - *very nice*!
What is the benefit of using Google's redirection method? Why not using URLREAD with the URL of the original file?
Because internet access is fragil, it might be useful to evaluate the status replied by URLREAD and explain problems on demand.
Does Google collect the IPs of the downloaders?
In response to Jan Simon's helpful comment, I have updated the routine.
1. urlwrite & textscan replaced by urlread.