Skip to content

Instantly share code, notes, and snippets.

@makiaea
Last active December 29, 2015 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makiaea/7628665 to your computer and use it in GitHub Desktop.
Save makiaea/7628665 to your computer and use it in GitHub Desktop.
20131124maki002
# coding: utf-8
# firstly need to select and copy
# the character you want to search
# import modules to get/set text to
# clipboard and open other apps
import clipboard
import webbrowser
# we are extracting from the clipboard
text01 = clipboard.get()
base = 'http://www.cantonese.sheik.co.uk/scripts/wordsearch.php?searchtype=2&text='
# search for the character in cantodict
webbrowser.open('safari-http:')
clipboard.set(base + text01)
# seems to be a coding problem so paste clipboard by hand rather than directly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment