File Exchange

image thumbnail

Install package requirements automatically from a zip file hosted on Google Sites.

version 1.1 (2.14 KB) by

Allows package requirements to be seamlessly downloaded and installed without user intervention.

0 Downloads

Updated

View License

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).

Syntax:
installGoogleArchive(downloadLocation, zipFile)

Comments and Ratings (2)

Hi Jan,

Thanks for the helpful feedback. I have implemented points 2 and 3 (below) in the new code revision.

In response:
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.

Jan Simon

Jan Simon (view profile)

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?

Updates

1.1

In response to Jan Simon's helpful comment, I have updated the routine.

1. urlwrite & textscan replaced by urlread.
2. Error messages included to make potential causes of execution failure more obvious.
3. Help appropriately updated.

MATLAB Release
MATLAB 7.12 (R2011a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video