Progress info from wget or curl?
Richard Gaskin
ambassador at fourthworld.com
Sun Nov 2 14:52:12 EST 2014
Mark Wieder wrote:
> Richard-
>
>> Sunday, November 2, 2014, 8:59:25 AM, you wrote:
>>
>> > /usr/local/bin/wget --no-check-certificate --config=/etc/wgetrc -O-
>> > --content-on-error -o /dev/null
>>
>> The options for displaying progress in the terminal work well, but how
>> can we call that from LiveCode to obtain that progress info
>> periodically
>> while the command is executing from the "shell" function?
>
> get shell("/usr/local/bin/wget <options>...
>
> in particular, the -O- error will give you the info that normally just
> goes to the screen. I use the --content-on-error argument to receive
> information even if wget runs into an error, and the -o /dev/null
> argument is because wget has an annoying habit of putting "..." into
> the output stream as a means of telling you it's still working. If
> you're getting the wget output as above then the "..." gets mixed in
> with the data, and the -o option sends the status data to /dev/null.
>
> try "wget --help" for a dizzying list of options
I must be slow this morning, because I can still only get shell to
return with the final output from the command, the
successfully-downloaded file, and my best effort at experimenting with
wget's options still never yields anything from LiveCode's shell
function except at the very end after wget completes.
This is more or less what I would expect, given how the shell function
works. I had just hoped there might be some way to get periodic
progress callbacks during lengthy transfers.
For my immediate needs it's not much of an issue: this is for use with
smaller files one server will be transferring to another, so without
humans involved it's not necessary to provide progress info during the
transfer.
But I've been so impressed with the performance of wget and curl that
I'm considering replacing some libURL stuff in GUI apps with them,
provided I can find a way to provide download feedback for the user.
Thanks for your help just the same. Much appreciated.
--
Richard Gaskin
Fourth World Systems
More information about the use-livecode
mailing list