Skip to content

Instantly share code, notes, and snippets.

View puemos's full-sized avatar
♨️
Something is cooking

Shy Alter puemos

♨️
Something is cooking
View GitHub Profile
@puemos
puemos / google_translate.applescript
Last active October 13, 2022 09:12
Fast translation with Google Translator and MAC OSX
on run {input, parameters}
set output to "http://translate.google.com/#auto/en/" & 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