Welcome Guest

Pages: 1
New string function to convert between different language encoding
lightwavePostJanuary 22, 2017, 10:28
Newbie
Posts: 8
Registered:
December 31, 2016, 17:21
Normal topicNew string function to convert between different language encoding

I'm trying to make an Action in Yate to automate the process of converting Simplified Chinese string meta data to Traditional Chinese string. The way I do it outside of Yate is to use a general purpose scripting language like Ruby and the iconv library to convert between Simplied and Traditional chinese. Is there a way to call a shell script from within Yate action to convert string?

In general, it'd be cool to be able to write action in Javascript/Ruby/Python, etc. It would open up Yate to a bigger market of plugins.

2MR2PostJanuary 22, 2017, 10:43
Avatar photo
Administrator
Posts: 2084
Registered:
August 23, 2012, 19:27
Normal topicRe: New string function to convert between different language encoding

There is a "Run External Script" action statement. When setting the 'custom' option in the statement you can optionally pass the folder, full path and up to 10 variables.

You can create the script on the fly. Put the script text in a variable or named variable and use a Write Text File statement to write the script. If the filename extension is .yatesh Yate will ensure that the written file has the required privilege to execute.

The Resources web page has a sample action called "Dump Metadata" which we use to accumulate metadata for debugging. It creates and executes an external script.

We've been asked for AppleScript, Ruby, Python, Java, JavaScript, Apple Events, etc. The list is long and time is short 🙂

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.014 seconds.