Last active
August 9, 2018 10:33
-
-
Save lkmadushan/da75721a4c1463ae5a9bdb1c149aabc3 to your computer and use it in GitHub Desktop.
Translate English to Sinhala AppleScript (Using Automator in Mac)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input, parameters} | |
set output to "http://translate.google.com/#auto/si/" & urldecode(input as string) | |
return output | |
end run | |
on urldecode(x) | |
set cmd to "'require \"cgi\"; puts CGI.escape(STDIN.read.chomp)'" | |
do shell script "echo " & quoted form of x & " | ruby -e " & cmd | |
end urldecode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation