Acidham / rsync-folders

Alfred WF to shadow a folder to another folder via rsync
24 stars 4 forks source link

Feature: Add Option for `--exclude` flag #6

Open kalaschnik opened 9 months ago

kalaschnik commented 9 months ago

I trying to find a way to sync my node projects to iCloud. Yet, I don't want node_modules to be synced with iCloud

Would be great to be able to define an rsync exclude pattern (e.g., rsync ... --exclude="node_modules" ...)

kalaschnik commented 9 months ago

Since this is not only affecting node_modules, maybe it is clever to specify certain values in a list:

For example, in workflow configuration a user may add in text field: macos,visualstudiocode,node,nextjs and this would translate to this api: https://www.toptal.com/developers/gitignore?templates=macos,visualstudiocode,node,nextjs

and would generate this: https://www.toptal.com/developers/gitignore/api/macos,visualstudiocode,node,nextjs

This it would contain all relevant ignore files...

There is an --exclude-from flag that accepts a file, e.g.,: rsync -av --exclude-from={'list.txt'} sourcedir/ destinationdir/

kalaschnik commented 9 months ago

I can look into this and come up with a PR if you are interested in this?