integrating rsync with Rev

Sarah Reichelt sarah.reichelt at gmail.com
Thu May 15 18:09:05 EDT 2008


On Thu, May 15, 2008 at 6:26 AM, Josh Mellicker <josh at dvcreators.net> wrote:
> I'm working on a project that requires robust downloading abilities that
> include syncing remote and local directories, checking for newer files on
> the server, and compressing files during downloading to speed transfer.
>
>  I have written this code in Revolution but I'm not altogether happy with
> some aspects, notably the fact that "background" downloading via libURL is
> not completely in the background, slowing down responsiveness, and even
> missing mouseUps at times.
>
>  Luckily, there is a GPL'd shell app called "rsync" that is amazing! It does
> all this and much more, including the ability to only transfer the changed
> portion of files! (something it would take a while to script reliably in Rev
> and would need a serverside counterpart)
>
>  Has anyone worked with rsync? I feel anyone using Rev to
> upload/download/sync files should investigate using rsync in lieu of
> commands like "libURLdownloadtoFile", "put" or "load".
>
>  Anyway, rsync is easy (from Terminal), but I am having a hard time getting
> started with using shell commands in Rev.
>

I haven't used rsync Josh, but if it is easy in the Terminal, then it
will be easy in Rev. Just call the same shell commands you used in the
Terminal.
As an example, if I want to get a detailed directory listing in
Terminal, I use:   ls -la
In Rev, I would use:  put shell("ls -la") into fld "Listing"

I see from the man page that rsync does both local & remote file
transfers. Can it be used to do uploads to a web site instead of FTP?
It seems that the web host would need to be running an rsync server
and I have no idea whether that is common or not.

Cheers,
Sarah



More information about the use-livecode mailing list