cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Progress meter and custom output

From: Doug McNutt <douglist_at_macnauchtan.com>
Date: Wed, 2 Feb 2005 08:32:29 -0700

At 14:17 +0100 2/2/05, Gunno Ivansson wrote:
>I am using curl (via AppleScript and do shell script) on my Macintosh (OS
>10.3.7) to send files to our print shop.
. . .
>I would like to see a progress bar and/or information about the upload speed.
>Could someone please give me an example of where in my command I put these
>options.

I have been working on an AppleScript procedure which passes curl commands by way of Apple's Terminal.app using the "do script" AppleEvent.

Terminal.app understands curl's normal output to STERR which uses return characters, as opposed to lineends, so that a line of text - the progress bar - can overlay itself every second or so. Terminal.app properly emulates a real terminal while other options like AppleScript's "do shell script" and BBEdit worksheets either ignore the output or don't display it right.

The trick is to persuade Terminal.app to open a window that will stick around with an addressable name so that it can handle repeated requests in a previously opened window.

There are a couple of relevant threads on the AppleScript mailing list.
<http://lists.apple.com/mailman/listinfo/applescript-users>

-- 
Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
Received on 2005-02-02