[squeak-dev] Fetch zip file from web, unzip,
save constituent parts?
tim Rowledge
tim at rowledge.org
Fri Jun 17 17:54:19 UTC 2016
> On 17-06-2016, at 12:11 AM, Tobias Pape <Das.Linux at gmx.de> wrote:
>
> https://raw.githubusercontent.com/foo/bar/master/thing.zip
That works better, thanks. It also helps if you have the ssl plugin working, as I discovered while trying this out on my iMac instead of the Pi. So that means I have to see if it even gets built on a Pi…
So far (just for the record) this is showing promise -
fetch the data with
'https://raw.githubusercontent.com/user/repo/branch/myimportant.zip' asUrl retrieveContents
then extract with
UIManager default informUserDuring: [:bar| (ZipArchive new readFrom: (ReadStream on: content asByteArray)) extractAllTo: (FileDirectory default) informing: bar].
where ‘content’ is the content from the MIMEDocument you get back. The files are all extracted ok.
Next step is to see how I can ‘load’ each file more directly.
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: PSM: Print and SMear
More information about the Squeak-dev
mailing list
|