The PowerShell Toolkit… that’s what!
None the wiser? Me neither… but it sounds like a really cool idea so I thought if I can do it then so can anyone else if I share the concept a little. So I’m writing this article as I learn how to use this toolkit!
Powershell is a task automation framework that is installed as part of Windows… the PowerShell Toolkit compiled by Patrik Mazanek of SDL uses this framework and in simple terms it’s a way of providing the tools for automating things that Studio can do without having to redevelop the computer code to do them yourself. So you already have the means to do this and like me may not have known it at all!
Studio can do many things and the SDK (Software Development Kit) as part of the SDL OpenExchange (now RWS AppStore) provides a developer with many ways to write their own code and create plugins for filetypes, Machine Translation providers, or to integrate the workflows with other business systems all through the use of the API (Application Programming Interface… a way to make computer software applications talk to each other). But if you are not a developer, have no wish to learn how to write computer programs or just can’t afford to employ a developer to get what you need then the SDK and API is probably a little too much to take in.
However, the PowerShell Toolkit provides a way for anyone who has a Professional License for SDL Trados Studio (because of the Project Automation), who can read and can muddle their way though a few simple instructions (it’s starting to sound like my kind of thing!) to make use of the OpenExchange for some simple automation tasks. So for example there is a sample script in here that will do the following:
- Create a Translation Memory
- Create a new Project to use the TM just created
- Create project Packages for each target language
The necessary instructions are all in the Toolkit and you are provided with the following files and folders in a zip:
These are the examples to get you started. A real developer would be able to take advantage of PowerShell and automate far more than this by referring to the SDK. But by using this I was able to do all of the things I mentioned at the start and I’m feeling pretty clever right now! Here’s what I did:
- Downoaded the zip from the OpenExchange Developers Community website
- Unzipped it to my desktop and read the instructions provided in a pdf delivered with the zip
- They say:
- Create some folders and copy the files above into them
- Edit the individual files if you use a 64-bit system so that Program Files actually says Program Files (x86)
- I just used a text editor to open the files and found 8 instances of this to change
- Run the script by opening a PowerShell command prompt
Windows PowerShell is already installed on W7, so you’ll need to get it for Vista and WinXP. I have W7 so I just typed PowerShell into the Run command in the start menu. This started something new for me… exciting stuff! I then followed the instructions to the letter and typed in my command to run the sample script and a TM was created almost instantly… and then I got lots of red error messages throughout the screen. This was a little off putting… but I steeled myself and read them. It looked as though it could not find the files to add to the Project…. doh! So I opened the sample script with my text editor and noted that there was this line in the script:
$inputFilesFolderPath = "c:ProjectsPowerShellToolKitPowerShellTestSampleFiles";
I definitely hadn’t provided any sample files so I removed the folders containing the TM that had been created and I added a folder containing 5 files into this location. I ran the script again:
Success… and to say I was feeling really pleased with myself at this point is an understatement! I then opened Studio and opened the Project that had been created and found this:
So in just 6 seconds I had prepared a project, and assigned the package. Now I know this TM is empty so the analysis wouldn’t take too long for the five small files I added; but 6 seconds and only one click!
I think to put a twist on a well known saying about Machine Translation.. “If you’re not using the PowerShell Toolkit to automate and streamline your Project Management you can be sure you’ll have a competitor somewhere who is!”
If I was an LSP, or the Project Management Lead of a Translation Department using Studio I’d be asking why we aren’t using this free toolkit today! If I can do this, and it took me around an hour and a half to learn how to do it and document it into this article, then you certainly can. Sign up to the SDL Developer Program on the OpenExchange today!
I also found a little light reading for later to see what else I can do with this tool on my computer I didn’t even know I had 😉
Getting started with Windows PowerShell