Automation of the routine actions

Description

This plugin is created to automate routine actions, as alternative for the bat, ps1 files, ant scripts and etc.
Contains scripts, written on c#. You can run it with this plugin from menu or with console tool, which use settings of the ui plugin (I use it with continuous integration server). Last specified parameters of the script are saved and you don't need to specify it again. It support undo for operations, but this feature is disabled for now.

Settings

Plugin allow creation of the different profiles to allow grouping of the commands.

automater-settings-1.png

For each profile you can configure set of the script projects.

automater-settings-2.png

Sample of the scripts project. Also in this window you can enable or disable scripts.

Usage

automater-editor.png

From plugin menu you can run very simple script editor.

automater-editor-view.png

You can build, view build errors and save changes. But the better way is to edit scripts in solution from Data\Automater folder in visual studio.

automater-run.png

In this menu you can find profiles, you can run all scripts from this profile or separate script. For separate script you can specify all parameters, for batch run, plugin use previously configured parameters.

Scripts

Script is a simple cs file in folder Data\Automater. Script should contain one non static public class, inherited from ScriptEngine.IScript. It can use all libraries from library folder.

Scripts parameters

Parameters should be public properties of this class, also you can specify different attributes with special parameters. For example:
[Bool(false)]
public bool BoolParam{get;set;}

[String("test")]
public string StringParam{get;set;}

[Password(CanBeEmpty = true)]
public string Password { get; set; }

[Guid("fe1d4f8e-1764-4d49-9d48-759bffceeedd")]
public Guid GuidParam{get;set;}

[File("d:\text.txt")]
public string FileParam{get;set;}

[Directory("d:\test")]
public string DirectoryParam{get;set;}

[Integer(Min=0,Max=10,Value=3)]
public int IntParam{get;set;}

[Double(Min=-10,Max=10,Value=0.5)]
public double RealParam{get;set;}

[StringList( "1", "2", "3")]
public string[] StringListParam{get;set;}

[GuidList("C97F361A-FE72-4532-813B-F54BDF922770")]
public IList<Guid> GuidListParam{get;set;}

[FileList("f1", "f2", "f3")]
public IList<string> FileListParam{get;set;}

[DirectoryList("d1", "d2", "d3")]
public IList<string> FolderListParam{get;set;}

[IntegerList(Min=0,Max=10,Values=new[]{1,2,3,4,5,6,7})]
public IList<int> IntListParam{get;set;}

[DoubleList(Min=-100, Max=100, Values=new double[]{0, -1, 10})]
public IList<double> RealListParam{get;set;}

[StringDictionary("key", "value")]
public IDictionary<string,string> StringDictionaryParam { get; set; }

[GuidDictionary("Test", "C97F361A-FE72-4532-813B-F54BDF922770")]
public IDictionary<string, Guid> GuidDictionaryParam { get; set; }

[FileDictionary( "file", "D:/test.txt", "file2", "D:/test2.txt")]
public IDictionary<string, string> FileDictionaryParam { get; set; }

[DirectoryDictionary()]
public IDictionary<string, string> FolderDictionaryParam { get; set; }

[IntegerDictionary(Min=0, Max=10)]
public IDictionary<string, int> IntDictionaryParam { get; set; }

[DoubleDictionary(Min=-100, Max=100)]
public IDictionary<string, double> RealDictionaryParam { get; set; }


All parameters validate its own value. If property don't contain attribute, plugin try to identify type of this property. For collections properties you can disable some of the values.

Standart scripts
  • AddTracing - add tracing to file for application. I use it with Requests watcher plugin
  • EnableFeatures - configure features for config files.
  • OptimizeSolution - try to optimize solution compile time: disable tasks, copy of the files, create hard links for dlls and projects.
  • params - Demo to show parameters.
  • PutObjects - Integrate dlls from package from teamcity by projects.
  • RunDevServers - Runs cassini dev servers.
  • SelectDatabases - Allow you specify connection strings to databases for all projects. For example you can specify only one connection string from set of the existing.
  • StopDevServers - Stops cassini dev servers.

Last edited Nov 22, 2013 at 2:43 AM by mnk92, version 9