|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 - 3 | Next > |
|
|
integrating rsync with RevI'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. So, I am asking for help, of course, any suggestions via this list greatly appreciated, once I get it working I would be happy to share my stack. If someone is excited about integrating rsync I would be happy to fund this effort for the benefit of the Rev developer community. Thanks for your input. _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with RevOn Thu, May 15, 2008 at 6:26 AM, Josh Mellicker <josh@...> 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 _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with RevOn Fri, May 16, 2008 at 6:09 AM, Sarah Reichelt <sarah.reichelt@...>
wrote: > > 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" But what if I need to look into a locked directory, one that in terminal I'd use sudo ls -la ? How do I pass the command and the password. In Terminal I always do the sudo + command, it then asks for my password which I enter. How do I do these 2 steps in Rev? Thanks _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with Rev2008/5/14 Josh Mellicker <josh@...>:
> Anyway, rsync is easy (from Terminal), but I am having a hard time getting > started with using shell commands in Rev. > > So, I am asking for help, of course, any suggestions via this list greatly > appreciated, once I get it working I would be happy to share my stack. I used rsync and Rev on a project a few years back - and I don't remember any problems - but it was a long time ago. As I'm working on a video archive and moving lots of files onto the NAS I'd be interested in getting this working - do you have a test stack? _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with RevHi,
This kind of "su- shell" command works perfectly there. In replacing the "oracle/oracle" user/password by yours and the "sqlplus" command by the "rsync" one, the task will certainly be up and running. -- put shell("su - oracle -c" && quote & "sqlplus" && char 7 to -1 of item itemoffset("Login=",PostIn) of PostIn & "/" & \ -- char 8 to -1 of item itemoffset("Passwd=",PostIn) of PostIn && "@" & \ -- char 9 to -1 of item itemoffset("TmpFile=",PostIn) of PostIn & quote & return & "oracle") into Retour Hope this can help ;-) Best, -- Pierre Sahores mobile : 06 03 95 77 70 www.sahores-conseil.com Le 16 mai 08 à 12:02, Kay C Lan a écrit : > On Fri, May 16, 2008 at 6:09 AM, Sarah Reichelt <sarah.reichelt@... > > > wrote: > >> >> 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" > > > But what if I need to look into a locked directory, one that in > terminal I'd > use sudo ls -la ? How do I pass the command and the password. In > Terminal I > always do the sudo + command, it then asks for my password which I > enter. > How do I do these 2 steps in Rev? > > Thanks > _______________________________________________ > use-revolution mailing list > use-revolution@... > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with Rev>> 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" > > > But what if I need to look into a locked directory, one that in terminal I'd > use sudo ls -la ? How do I pass the command and the password. In Terminal I > always do the sudo + command, it then asks for my password which I enter. > How do I do these 2 steps in Rev? Here is the way I do it: -- specify the shell command to use put "ls -la" into tCmd -- build the series of shell commands to sudo this put "#!/bin/sh" & cr into tScript put "pw=" & quote & tPass & quote & cr after tScript put "echo $pw | sudo -S " & tCmd & cr after tScript -- do the complete shell command put shell(tScript) into tCheck -- do the command & get the result You can either ask for the password each time, or store it in a custom property or global for future reference. Cheers, Sarah _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with RevOn May 15, 2008, at 3:09 PM, Sarah Reichelt wrote: > > 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? Yes, it can do transfers from local -> local local -> remote remote -> local remote -> remote > > 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. My limited research indicates Linux servers generally have rsync installed. > > > Cheers, > Sarah > _______________________________________________ > use-revolution mailing list > use-revolution@... > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with RevMac OS X machines also come with rsync.
rsync is awesome. We use it to keep various servers in sync, to spawn changes from the master servers to secondary servers. Kee Nethery On May 16, 2008, at 10:44 AM, Josh Mellicker wrote: > > On May 15, 2008, at 3:09 PM, Sarah Reichelt wrote: >> >> 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? > > Yes, it can do transfers from > > local -> local > local -> remote > remote -> local > remote -> remote > >> >> 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. > > My limited research indicates Linux servers generally have rsync > installed. > > >> >> >> Cheers, >> Sarah >> _______________________________________________ >> use-revolution mailing list >> use-revolution@... >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-revolution > > _______________________________________________ > use-revolution mailing list > use-revolution@... > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution ------------------------------------------------- I check email roughly 2 to 3 times per business day. Kagi main office: +1 (510) 550-1336 _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with RevThanks for the detailed example, but apparently rsync won't accept a
password this way or I just don't get it (or both :-) So here's where I'm stuck: In Terminal, you: 1. issue the rsync command 2. then, at the next prompt, you are asked for the server password. Typing this and pressing enter starts the rsyncing. I cannot figure out how to respond to this second prompt with either "shell" or "open process-write to process". I have tried to implement this solution: http://www.sakana.fr/blog/2008/05/07/securing-automated-rsync-over-ssh/ for being able to automate rsync by setting up a secure an SSH key pair, so I don't need a password, but this too is beyond my capabilities. Again, I would gladly finance the effort of creating a test stack and share it, I think many developers would enjoy Rev working with rsync. On May 16, 2008, at 4:54 AM, Sarah Reichelt wrote: >>> 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" >> >> >> But what if I need to look into a locked directory, one that in >> terminal I'd >> use sudo ls -la ? How do I pass the command and the password. In >> Terminal I >> always do the sudo + command, it then asks for my password which I >> enter. >> How do I do these 2 steps in Rev? > > Here is the way I do it: > > -- specify the shell command to use > put "ls -la" into tCmd > -- build the series of shell commands to sudo this > put "#!/bin/sh" & cr into tScript > put "pw=" & quote & tPass & quote & cr after tScript > put "echo $pw | sudo -S " & tCmd & cr after tScript > -- do the complete shell command > put shell(tScript) into tCheck -- do the command & get the result > > You can either ask for the password each time, or store it in a custom > property or global for future reference. > > Cheers, > Sarah > _______________________________________________ > use-revolution mailing list > use-revolution@... > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with RevJosh -
Will it work by doing what Mark Smith mentioned on 4/25/08? (below) > > Another option is to open "/bin/bash" as a process, so you can then > read and write to it as if it were the 'terminal' app. > > best, > > Mark Phil Davis Josh Mellicker wrote: > Thanks for the detailed example, but apparently rsync won't accept a > password this way or I just don't get it (or both :-) > > So here's where I'm stuck: > > In Terminal, you: > > 1. issue the rsync command > 2. then, at the next prompt, you are asked for the server password. > Typing this and pressing enter starts the rsyncing. > > I cannot figure out how to respond to this second prompt with either > "shell" or "open process-write to process". > > > I have tried to implement this solution: > > http://www.sakana.fr/blog/2008/05/07/securing-automated-rsync-over-ssh/ > > for being able to automate rsync by setting up a secure an SSH key > pair, so I don't need a password, but this too is beyond my capabilities. > > > Again, I would gladly finance the effort of creating a test stack and > share it, I think many developers would enjoy Rev working with rsync. > > > > On May 16, 2008, at 4:54 AM, Sarah Reichelt wrote: > >>>> 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" >>> >>> >>> But what if I need to look into a locked directory, one that in >>> terminal I'd >>> use sudo ls -la ? How do I pass the command and the password. In >>> Terminal I >>> always do the sudo + command, it then asks for my password which I >>> enter. >>> How do I do these 2 steps in Rev? >> >> Here is the way I do it: >> >> -- specify the shell command to use >> put "ls -la" into tCmd >> -- build the series of shell commands to sudo this >> put "#!/bin/sh" & cr into tScript >> put "pw=" & quote & tPass & quote & cr after tScript >> put "echo $pw | sudo -S " & tCmd & cr after tScript >> -- do the complete shell command >> put shell(tScript) into tCheck -- do the command & get the result >> >> You can either ask for the password each time, or store it in a custom >> property or global for future reference. >> >> Cheers, >> Sarah -- Phil Davis PDS Labs Professional Software Development http://pdslabs.net _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with RevOn Sat, May 17, 2008 at 4:29 AM, Josh Mellicker <josh@...> wrote:
> Thanks for the detailed example, but apparently rsync won't accept a > password this way or I just don't get it (or both :-) > > So here's where I'm stuck: > > In Terminal, you: > > 1. issue the rsync command > 2. then, at the next prompt, you are asked for the server password. Typing > this and pressing enter starts the rsyncing. Oh, my method was providing your admin password so you could use sudo. If rsync needs another password, then I'm not sure how that would work. I'll have a look at the link you provided and get back to you on that. Cheers, Sarah _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with RevHi Phil...
It might, but I can't get it to work. If you try this (on OS X): 1. create a folder called "revcoder_rsync_test" in the root directory of your main hard drive 2. open Terminal 3. enter this: rsync -avzrt revcoder@...:/home/revcoder/public_html/ revcoder_rsync_test/ /revcoder_rsync_test 4. you will see the following (the first time you connect): The authenticity of host 'revcoders.org (67.19.54.130)' can't be established. RSA key fingerprint is 9f:8c:ba:a9:5d:3f:b4:ef:f7:4a:2c:20:cd:77:b3:8c. Are you sure you want to continue connecting (yes/no)? 5. enter "yes" 6. response: Warning: Permanently added 'revcoders.org' (RSA) to the list of known hosts. revcoder@...'s password: 7. enter "cookies" 8. Then, a couple of small pictures will download. Success! OK, so all works well in Terminal. Now, in Revolution: put "/bin/bash" into tProc open process tProc FOR update write "rsync -avzrt revcoder@...:/home/revcoder/ public_html/revcoder_rsync_test/ /revcoder_rsync_test" to process tProc wait 2 seconds WITH messages write "cookies" to process tProc Nothing happens. I have tried "read from process tProc until empty" after both write commands, with no data. ??!!? On May 16, 2008, at 1:43 PM, Phil Davis wrote: > Josh - > > Will it work by doing what Mark Smith mentioned on 4/25/08? (below) >> >> Another option is to open "/bin/bash" as a process, so you can then >> read and write to it as if it were the 'terminal' app. >> >> best, >> >> Mark > Phil Davis > > > > Josh Mellicker wrote: >> Thanks for the detailed example, but apparently rsync won't accept >> a password this way or I just don't get it (or both :-) >> >> So here's where I'm stuck: >> >> In Terminal, you: >> >> 1. issue the rsync command >> 2. then, at the next prompt, you are asked for the server password. >> Typing this and pressing enter starts the rsyncing. >> >> I cannot figure out how to respond to this second prompt with >> either "shell" or "open process-write to process". >> >> >> I have tried to implement this solution: >> >> http://www.sakana.fr/blog/2008/05/07/securing-automated-rsync-over-ssh/ >> >> for being able to automate rsync by setting up a secure an SSH key >> pair, so I don't need a password, but this too is beyond my >> capabilities. >> >> >> Again, I would gladly finance the effort of creating a test stack >> and share it, I think many developers would enjoy Rev working with >> rsync. >> >> >> >> On May 16, 2008, at 4:54 AM, Sarah Reichelt wrote: >> >>>>> 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" >>>> >>>> >>>> But what if I need to look into a locked directory, one that in >>>> terminal I'd >>>> use sudo ls -la ? How do I pass the command and the password. In >>>> Terminal I >>>> always do the sudo + command, it then asks for my password which >>>> I enter. >>>> How do I do these 2 steps in Rev? >>> >>> Here is the way I do it: >>> >>> -- specify the shell command to use >>> put "ls -la" into tCmd >>> -- build the series of shell commands to sudo this >>> put "#!/bin/sh" & cr into tScript >>> put "pw=" & quote & tPass & quote & cr after tScript >>> put "echo $pw | sudo -S " & tCmd & cr after tScript >>> -- do the complete shell command >>> put shell(tScript) into tCheck -- do the command & get the result >>> >>> You can either ask for the password each time, or store it in a >>> custom >>> property or global for future reference. >>> >>> Cheers, >>> Sarah > > -- > Phil Davis > > PDS Labs > Professional Software Development > http://pdslabs.net > > _______________________________________________ > use-revolution mailing list > use-revolution@... > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with RevOn Sat, May 17, 2008 at 8:49 AM, Josh Mellicker <josh@...> wrote:
> Hi Phil... > > It might, but I can't get it to work. > > If you try this (on OS X): > > > 1. create a folder called "revcoder_rsync_test" in the root directory of > your main hard drive > > 2. open Terminal > > 3. enter this: > > rsync -avzrt > revcoder@...:/home/revcoder/public_html/revcoder_rsync_test/ > /revcoder_rsync_test > > 4. you will see the following (the first time you connect): > > The authenticity of host 'revcoders.org (67.19.54.130)' can't be > established. > RSA key fingerprint is 9f:8c:ba:a9:5d:3f:b4:ef:f7:4a:2c:20:cd:77:b3:8c. > Are you sure you want to continue connecting (yes/no)? > > 5. enter "yes" > > 6. response: > > Warning: Permanently added 'revcoders.org' (RSA) to the list of known hosts. > revcoder@...'s password: > > 7. enter "cookies" > > 8. Then, a couple of small pictures will download. Success! > > OK, so all works well in Terminal. > > > Now, in Revolution: > > put "/bin/bash" into tProc > > open process tProc FOR update > write "rsync -avzrt > revcoder@...:/home/revcoder/public_html/revcoder_rsync_test/ > /revcoder_rsync_test" to process tProc > wait 2 seconds WITH messages > write "cookies" to process tProc > > Nothing happens. I think the "expect" shell command may do what you need. From my brief look, it allows you to script the expected interactions with any shell process. Cheers, Sarah _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with Rev> I think the "expect" shell command may do what you need. From my brief
> look, it allows you to script the expected interactions with any shell > process. And the link... <http://www.rootprompt.org/article.php3?article=5760> _______________________________________________ use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with RevGenerating the SSH keys is actually quite easy, and once done you can
connect no problem without passwords - that's the method I've used before. However I'd be interested in a solution that used the new features in 2.9 to allow Rev to interact with the shell process. 2008/5/16 Josh Mellicker <josh@...>: > Thanks for the detailed example, but apparently rsync won't accept a > password this way or I just don't get it (or both :-) > > So here's where I'm stuck: > > In Terminal, you: > > 1. issue the rsync command > 2. then, at the next prompt, you are asked for the server password. Typing > this and pressing enter starts the rsyncing. > > I cannot figure out how to respond to this second prompt with either > "shell" or "open process-write to process". > > > I have tried to implement this solution: > > http://www.sakana.fr/blog/2008/05/07/securing-automated-rsync-over-ssh/ > > for being able to automate rsync by setting up a secure an SSH key pair, so > I don't need a password, but this too is beyond my capabilities. > > > Again, I would gladly finance the effort of creating a test stack and share > it, I think many developers would enjoy Rev working with rsync. > > > > > On May 16, 2008, at 4:54 AM, Sarah Reichelt wrote: > > 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" >>>> >>> >>> >>> But what if I need to look into a locked directory, one that in terminal >>> I'd >>> use sudo ls -la ? How do I pass the command and the password. In Terminal >>> I >>> always do the sudo + command, it then asks for my password which I enter. >>> How do I do these 2 steps in Rev? >>> >> >> Here is the way I do it: >> >> -- specify the shell command to use >> put "ls -la" into tCmd >> -- build the series of shell commands to sudo this >> put "#!/bin/sh" & cr into tScript >> put "pw=" & quote & tPass & quote & cr after tScript >> put "echo $pw | sudo -S " & tCmd & cr after tScript >> -- do the complete shell command >> put shell(tScript) into tCheck -- do the command & get the result >> >> You can either ask for the password each time, or store it in a custom >> property or global for future reference. >> >> Cheers, >> Sarah >> _______________________________________________ >> use-revolution mailing list >> use-revolution@... >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-revolution >> > > _______________________________________________ > use-revolution mailing list > use-revolution@... > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > use-revolution mailing list use-revolution@... Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution |
|
|
Re: integrating rsync with Rev> > 1. create a folder called "revcoder_rsync_test" in the root directory of
> > your main hard drive > > > > 2. open Terminal > > > > 3. enter this: > > > > rsync -avzrt > > revcoder@...:/home/revcoder/public_html/revcoder_rsync_test/ > > /revcoder_rsync_test > > > > 4. you will see the following (the first time you connect): > > > > The authenticity of host 'revcoders.org (67.19.54.130)' can't be > > established. > > RSA key fingerprint is 9f:8c:ba:a9:5d:3f:b4:ef:f7:4a:2c:20:cd:77:b3:8c. > > Are you sure you want to continue connecting (yes/no)? > > > > 5. enter "yes" > > > > 6. response: > > > > Warning: Permanently added 'revcoders.org' (RSA) to the list of known hosts. > > revcoder@...'s password: > > > > 7. enter "cookies" > > > > 8. Then, a couple of small pictures will download. Success! > > > > OK, so all works well in Terminal. > > > > > > Now, in Revolution: > > > > put "/bin/bash" into tProc > > > > open process tProc FOR update > > write "rsync -avzrt > > revcoder@...:/home/revcoder/pu |