diff --git a/README.md b/README.md index cb0ac94..26bfd42 100644 --- a/README.md +++ b/README.md @@ -3,26 +3,12 @@ Translate From The Clipboard (Simple Translate App From The Clipboard) ![TFC](images/tfc.png) -TFC listens to the clipboard and translates the copied words using Yandex Translate. It shows translations as notifications. +TFC listens to the clipboard and translates the copied words using Google Translate. It shows translations as notifications. ![TFC](images/tfcPicture.jpg) # Setup -Firstly, take a Yandex Translate API key. - -**Yandex Translate API:** https://tech.yandex.com/translate/doc/dg/concepts/about-docpage/ - -After taking the API key, create a config file as `.tfc.config.json` on **home** directory. - -It should look like this: - -```json -{ - "key": "YandexTranslateKey", - "lang": "en-tr" -} -``` -Ok. Now you can download and install the project. +Download and install the project. ```bash ~$ git clone https://github.com/emregeldegul/tfc && cd tfc diff --git a/tfc/__init__.py b/tfc/__init__.py index 22cc1e7..75b3a1d 100644 --- a/tfc/__init__.py +++ b/tfc/__init__.py @@ -1,25 +1,10 @@ -import sys -from json import loads -from os.path import exists, expanduser, join - from .tfc import Translation - - - def main(): - """ Entry point for cli. """ - if not exists(join(expanduser("~"), '.tfc.config.json')): - print('TFC Could Not Find The Configuration File.') - exit(1) - - with open(join(expanduser("~"), '.tfc.config.json'), 'r') as configFile: - config = loads(configFile.read()) - print('TFC listens To Your Clipboard For Translation.') print('='*50) - translation = Translation(config) + translation = Translation() translation.start() if __name__ == '__main__': diff --git a/tfc/tfc.py b/tfc/tfc.py index 407c650..971bdb6 100644 --- a/tfc/tfc.py +++ b/tfc/tfc.py @@ -6,9 +6,7 @@ from xerox import paste class Translation(): - def __init__(self, config): - self.config = config - + def __init__(self): self.translate = Translator() self.notify = Notify()