SHARE
TWEET
notitrans for skype
a guest
Mar 7th, 2016
106
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- #!/usr/bin/env bash
- text="$(xsel -o)"
- echo -e "$text" > /tmp/brackets
- mapfile < /tmp/brackets
- text="${MAPFILE[@]}"
- echo -e "$text" > /tmp/brackets2
- sed -e 's/\[[^][]*\]//g' /tmp/brackets2 > /tmp/brackets3
- mapfile < /tmp/brackets3
- echo "${MAPFILE[@]}"
- text="${MAPFILE[@]}"
- translate="$(wget -U "Mozilla/5.0" -qO - "http://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=en&dt=t&q=$(echo $text | sed "s/[\"'<>]//g")" | sed "s/,,,0]],,.*//g" | awk -F'"' '{print $2, $
- echo -e "Original text:" "$text"'\n' > /tmp/notitrans
- echo "Translation:" "$translate" >> /tmp/notitrans
- zenity --text-info --title="Translation" --filename=/tmp/notitrans
RAW Paste Data
