Acidham Posted April 2, 2018 Share Posted April 2, 2018 (edited) Rsync Folders for Alfred Keep a set of folders in sync with their target folders via rsync. Usage rsync: executes all rsync configurations add a new entry to rsync batch delete an entry from the batch file Downloads: https://github.com/Acidham/rsync-folders http://www.packal.org/workflow/rsync-folders Edited April 3, 2018 by Acidham deanishe, cands and Diegobit 3 Link to comment
deanishe Posted April 3, 2018 Share Posted April 3, 2018 Haha! I'm going to use the shit out of this workflow Feature requests! ? Remote source/target folders? That's far any away my main use for rsync, tbh, though I've plenty of local folders to add as well It'd be cool to be able to run just one configuration instead of all of them. (Perhaps run by default, ⌘↩ to delete, or vice versa?) I use rsync to back up my drive, but the target drive isn't mounted most of the time. It'd also just be generally cool to be able to only sync the folder I just changed. Link to comment
Acidham Posted April 6, 2018 Author Share Posted April 6, 2018 Thx for the feedback and suggestions! I added a few of your feature requests but auto mount is missing and a way to figure out which of the folders contain changes. Hope that helps a bit!? Link to comment
deanishe Posted April 8, 2018 Share Posted April 8, 2018 On 06/04/2018 at 11:03 PM, Acidham said: but auto mount is missing and a way to figure out which of the folders contain changes I don't want automount or auto-execution when a directory has changed. I just want to not have to run every configuration every time because the target might not be mounted or I want to quickly sync only the directory I just changed. Link to comment
JAAE Posted April 11, 2018 Share Posted April 11, 2018 Doesn't seem to work for me. I get following debug information: Starting debug for 'RSync Folders' [2018-04-11 11:19:22][ERROR: action.script] 0:49: execution error: sh: -c: line 0: unexpected EOF while looking for matching `'' sh: -c: line 1: syntax error: unexpected end of file (2) Link to comment
Acidham Posted April 11, 2018 Author Share Posted April 11, 2018 Which version or rsync are you using? You can find version when you open WF in Alfred preferences, top right corner [x] symbol. Link to comment
JAAE Posted April 11, 2018 Share Posted April 11, 2018 Quote Which version or rsync are you using? You can find version when you open WF in Alfred preferences, top right corner [x] symbol. Version 1.3 Link to comment
deanishe Posted April 11, 2018 Share Posted April 11, 2018 Sounds like there might be a quotation mark (or another "special" character?) in one of your folder paths. Is that perhaps the case? Link to comment
JAAE Posted April 11, 2018 Share Posted April 11, 2018 Thanks @deanishe. Yeah you're right, that's it. There's a single apostrophe in a destination folder. I hope there's a work-around for this, because I don't have any control over the name of the destination. Link to comment
Acidham Posted April 11, 2018 Author Share Posted April 11, 2018 Thx @deanishe for the hint and @JAAE for reporting! Fixed in version 1.3.1: https://github.com/Acidham/rsync-folders/blob/master/RSync Folders.alfredworkflow Link to comment
Hevisko Posted April 24, 2019 Share Posted April 24, 2019 On 4/2/2018 at 7:34 PM, Acidham said: Rsync Folders for Alfred Keep a set of folders in sync with their target folders via rsync. - Is there any way to insert rsync+ssh (like: server:/directory ) and rsync:// (ie. site::module/directory ) destination or sources? - Reverse action(s)? - Selective push/pull? My use case is editing a directory locally, and sync to the remote, run Ansible/etc. perhaps even make a remote quick fix, and to pull back the fix before I git commit/push. Link to comment
Acidham Posted April 24, 2019 Author Share Posted April 24, 2019 I was only focusing on local folder but your suggestions sounds reasonable. These days my time is limited but happy to commit pull requests on that soon Link to comment
TomBenz Posted July 17, 2022 Share Posted July 17, 2022 On 4/24/2019 at 8:09 PM, Acidham said: I was only focusing on local folder but your suggestions sounds reasonable. These days my time is limited but happy to commit pull requests on that soon Is this workflow maintained and updated? Does it work on Monterey 12.3 and do incremental copy and can be used for folder backup? Link to comment
Acidham Posted July 17, 2022 Author Share Posted July 17, 2022 try it then you will know…i am not actively using it and i don’t know if it works. Feel free to file issues in git Link to comment
TomBenz Posted July 17, 2022 Share Posted July 17, 2022 2 hours ago, Acidham said: try it then you will know…i am not actively using it and i don’t know if it works. Feel free to file issues in git Tried, had to change to refer to Alfred 5 instead of Alfred 4. I configured one source and target folder and executed it. It says zero file copied. I will run the command in terminal to troubleshoot and then revisit this workflow. thanks. Link to comment
Acidham Posted July 17, 2022 Author Share Posted July 17, 2022 Same here, after added source and target folder, nothing synced. When I execute it again, it seems sync works Link to comment
vitor Posted July 18, 2022 Share Posted July 18, 2022 6 hours ago, pankajsz said: had to change to refer to Alfred 5 instead of Alfred 4. @Acidham Instead of tell application "Alfred 4.app", use tell application id "com.runningwithcrayons.Alfred" because that is constant across versions. It’s what the External Trigger example shows. Link to comment
Acidham Posted July 18, 2022 Author Share Posted July 18, 2022 @vitor Yes makes total sense, but I am not using custom JS, or at least I cannot find it I think @pankajsz refers to EXTERNAL WF object...but EXTERNAL contains app id. Link to comment
vitor Posted July 18, 2022 Share Posted July 18, 2022 I found the tell application "Alfred 4.app" in the action.scpt file, which is called by the Run Script. Link to comment
Acidham Posted July 18, 2022 Author Share Posted July 18, 2022 Damn it...now I am seeing what happened. I have rewritten that workflow in python, but never released it . Therefore, I was unable to find any AS. Link to comment
Acidham Posted July 18, 2022 Author Share Posted July 18, 2022 Committed latest version: https://github.com/Acidham/rsync-folders/releases/latest cands 1 Link to comment
TomBenz Posted July 18, 2022 Share Posted July 18, 2022 3 hours ago, Acidham said: Committed latest version: https://github.com/Acidham/rsync-folders/releases/latest This works great. Many many thanks. Two questions: 1. Is it doing incremental copy as default? what is rsync command option it is using? 2. In target folder, is it possible to just type the path? I have excluded target folder from indexing so it can't be searched. Link to comment
Acidham Posted July 18, 2022 Author Share Posted July 18, 2022 1. Rsync Folders sync a source folder to target folder, including deletion in target folder if file was deleted in source folder as well. rsync command options: rsync -rtvuc --delete-after 2. Nope, because you cannot type, but it would be easy to extend. If I find some time, I can add an add only by typing option. TomBenz 1 Link to comment
TomBenz Posted September 18, 2022 Share Posted September 18, 2022 On 7/19/2022 at 2:37 AM, Acidham said: 2. Nope, because you cannot type, but it would be easy to extend. If I find some time, I can add an add only by typing option. @Acidham Pls see if you can include this typing option. many thanks Link to comment
Acidham Posted September 18, 2022 Author Share Posted September 18, 2022 Should be available in v1.4. Select Search&Add Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now