Welcome to the Remus-Tips Blog. If you are a user of the OpenSource PIM Remus Information Management you'll find some interesting tips and tutorials for Remus, If you want more information visit the official project site http://remus-software.org

Monday, March 29, 2010

Create ZIP-Packages with one single drag and drop

The following article should you how to create a zip package from your desktop with one single drag and drop. Remus has built in a very simple rule engine which is coupled to a Groovy interpreter and enables you to execute custom Groovy Scripts. The creation trigger of a rule is always a drop or a paste of data into the desktop panel of Remus.
At first you have to setup a rule which is executed when dropping files into the application. Go to Extras → Preferences → Remus → Desktop Integration → Rules

You'll see an overview which rules are executed at specific triggers. Now you can add a new "Generic Rule"

After the new Rule was created the rule can be renamed with a meaningful name and a dialog can be opened to modify the script which is executed.

Now the application is ready to zip your dropped files. Just drag and drop the desired files or folders into the drop-section, select the created rule and you're ready to go.

Using Groovy gives you much flexibility. An example how to manipulate the resulting zip File name:

String fileName = new java.io.File(input[0]).getName();
zip(input, "C:\\Users\\tom\\" + filename + "_zipped.zip");

View the video to see the complete progress:

No comments:

Post a Comment