Discussion:
Automator's download from URL
(too old to reply)
Ian McCall
2021-03-19 11:57:51 UTC
Permalink
How do you pass in a URL to Automator’s Download from URL action?

Context:
I want to download a zip file every day, then expand it in a particular
folder. Fine. Was going to write a bash script but then thought - hmm, maybe
try Automator. The URL is fixed but I can’t see how to pass that
information into the Automator action. I can see things like copy to
clipboard etc., but not how to pass a constant string.

Cheers,
Ian
Graham J
2021-03-19 12:04:40 UTC
Permalink
Post by Ian McCall
How do you pass in a URL to Automator’s Download from URL action?
I want to download a zip file every day, then expand it in a particular
folder. Fine. Was going to write a bash script but then thought - hmm, maybe
try Automator. The URL is fixed but I can’t see how to pass that
information into the Automator action. I can see things like copy to
clipboard etc., but not how to pass a constant string.
If it's a constant string, why bother to pass it? Why not write it in
the Automator action directly? I know it's bad programming technique,
but ...
--
Graham J
Ian McCall
2021-03-19 12:10:00 UTC
Permalink
Post by Ian McCall
How do you pass in a URL to Automator’s Download from URL action?
I want to download a zip file every day, then expand it in a particular
folder. Fine. Was going to write a bash script but then thought - hmm, maybe
try Automator. The URL is fixed but I can’t see how to pass that
information into the Automator action. I can see things like copy to
clipboard etc., but not how to pass a constant string.
If it's a constant string, why bother to pass it? Why not write it in
the Automator action directly? I know it's bad programming technique,
but ...
Would love to, but I can’t see how. “Download URLs” requires input, and
I’m trying to work out how to give it that input.

Cheers,
Ian
Ian McCall
2021-03-19 12:17:29 UTC
Permalink
Post by Ian McCall
Post by Ian McCall
How do you pass in a URL to Automator’s Download from URL action?
I want to download a zip file every day, then expand it in a particular
folder. Fine. Was going to write a bash script but then thought - hmm, maybe
try Automator. The URL is fixed but I can’t see how to pass that
information into the Automator action. I can see things like copy to
clipboard etc., but not how to pass a constant string.
If it's a constant string, why bother to pass it? Why not write it in
the Automator action directly? I know it's bad programming technique,
but ...
Would love to, but I can’t see how. “Download URLs” requires input, and
I’m trying to work out how to give it that input.
Ah - found it. GetSpecifiedURLs. Am now looking for a way to unzip the file
I’ve just downloaded.

Cheers,
Ian
Ian McCall
2021-03-19 13:16:44 UTC
Permalink
Post by Ian McCall
Post by Ian McCall
Post by Ian McCall
How do you pass in a URL to Automator’s Download from URL action?
I want to download a zip file every day, then expand it in a particular
folder. Fine. Was going to write a bash script but then thought - hmm, maybe
try Automator. The URL is fixed but I can’t see how to pass that
information into the Automator action. I can see things like copy to
clipboard etc., but not how to pass a constant string.
If it's a constant string, why bother to pass it? Why not write it in
the Automator action directly? I know it's bad programming technique,
but ...
Would love to, but I can’t see how. “Download URLs” requires input, and
I’m trying to work out how to give it that input.
Ah - found it. GetSpecifiedURLs. Am now looking for a way to unzip the file
I’ve just downloaded.
Cheers,
Ian
Couldn’t work it out. Done it in three lines of bash instead.

curl -L some/url/ --output /tmp/tmpFile.zip
unzip -o -d outputdir /tmp/tmpFile.zip
rm. /tmp/tmpFile.zip

Sometimes ye olde ways are the best.

Cheers,
Ian
Bruce Horrocks
2021-03-19 23:22:52 UTC
Permalink
Post by Ian McCall
Post by Ian McCall
Post by Ian McCall
Post by Ian McCall
How do you pass in a URL to Automator’s Download from URL action?
I want to download a zip file every day, then expand it in a particular
folder. Fine. Was going to write a bash script but then thought - hmm, maybe
try Automator. The URL is fixed but I can’t see how to pass that
information into the Automator action. I can see things like copy to
clipboard etc., but not how to pass a constant string.
If it's a constant string, why bother to pass it? Why not write it in
the Automator action directly? I know it's bad programming technique,
but ...
Would love to, but I can’t see how. “Download URLs” requires input, and
I’m trying to work out how to give it that input.
Ah - found it. GetSpecifiedURLs. Am now looking for a way to unzip the file
I’ve just downloaded.
Cheers,
Ian
Couldn’t work it out. Done it in three lines of bash instead.
You just open the file, same as if you double-click on it. So

"Open Finder items" -> Open with : default application (or search for
Archive Utility which is buried!)
Post by Ian McCall
curl -L some/url/ --output /tmp/tmpFile.zip
unzip -o -d outputdir /tmp/tmpFile.zip
rm. /tmp/tmpFile.zip
Sometimes ye olde ways are the best.
Cheers,
Ian
--
Bruce Horrocks
Surrey, England
(bruce at scorecrow dot com)
STALKING_TARGET_48
2021-03-19 12:22:00 UTC
Permalink
Post by Ian McCall
How do you pass in a URL to Automator’s Download from URL action?
I want to download a zip file every day, then expand it in a particular
folder. Fine. Was going to write a bash script but then thought - hmm, maybe
try Automator. The URL is fixed but I can’t see how to pass that
information into the Automator action. I can see things like copy to
clipboard etc., but not how to pass a constant string.
If it's a constant string, why bother to pass it? Why not write it in
the Automator action directly? I know it's bad programming technique,
but ...
--
Graham J
RonB lies so much that he has a difficult time keeping record of his dishonesty.
Or his socks for that matter.

If vallor has 'file.doc' open in a user space program such as MS Word
and you want to change its name to 'mack.doc' via a GUI menu item when
connecting to a NFS host, that might be handy. At times, a make believe
world is more valuable than reality. vallor can create a virtual machine.
Let's make sure he gets all the cookies in the world!

After yesterday's update I no longer have a working system. Thanks Linux!
Gee, imagine RonB trying to pin his trash on others, no one has ever seen
that before <shrug>.

-
Curious how these posts are made? Email: ***@gmail.com
Continue reading on narkive:
Loading...