[Israel.pm] web-based script
Shlomo Yona
shlomo at cs.haifa.ac.il
Tue Aug 31 05:07:00 PDT 2004
On Tue, 31 Aug 2004, Yuval Yaari wrote:
> This can all be done from the shell.
> And as much as I like to write Perl -- I'd rather use already-written tools.
>
>> [in the browser]
>> * goto url x.y.z
>> * login (username+password) [1]
>
> This can be done with wget and/or lwp-request and/or curl.
I was hoping for a snippet...
I guess I'll RTFM...
>> <new page>
>> * select a radio button
>> * select another radio button
>> * hit submit
>
> Can you emulate this by hacking the URL?
> Otherwise you can use WWW::Mechanize (which means you will write code, but
> it's easy).
No. It is all based on POST.
>> <wait for a download of a HUGE (over 100 mg) file>
I anticipate problems here due to time-outs.
How can this be controlled?
>> [in the shell prompt]
>> * run a script on the downloaded file
>> <new file produced>
>> * copy the new file to some directory
>
> Of course, this is basic.
>
>> * synchronize the directory with its mirror on another server
>> * run another script that compiles something out of the file
>> <after a few hours of processing a new file is created>
>> * sftp the file to server A
>> * ssh to server C
>> * ssh from C to server B
>> * sftp from server B to server A and get the new file
>> * chmod the file on server B as it should be
>> DONE
>
> Rsync runs over SSH, and can be used with SSH keys.
Don't I need a Rsync server at the other end? If I do...
then I'm screwed because there isn't one...
> That means you can sync the directory, run scripts, chmod, etc.
> I wrote a backup script for my former company that backs things up over
> SSH using rsync and also chmods stuff.
>
I might email you with some queries then...
--
Shlomo Yona
shlomo at cs.haifa.ac.il
http://cs.haifa.ac.il/~shlomo/
More information about the Perl
mailing list