diff --git a/README.md b/README.md index 1a1d14c..57eeda1 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,38 @@ $ pip install py-googletrans # ``` +--- + +## GoogleTrans as a command line application + +```bash +$ translate -h +usage: translate [-h] [-d DEST] [-s SRC] [-c] text + +Python Google Translator as a command-line tool + +positional arguments: + text The text you want to translate. + +optional arguments: + -h, --help show this help message and exit + -d DEST, --dest DEST The destination language you want to translate. + (Default: en) + -s SRC, --src SRC The source language you want to translate. (Default: + auto) + -c, --detect + +$ translate "veritas lux mea" -s la -d en +[veritas] veritas lux mea + -> +[en] The truth is my light +[pron.] The truth is my light + +$ translate -c "안녕하세요." +[ko, 1] 안녕하세요. +``` + + --- ## A note on library usage diff --git a/googletrans/__init__.py b/googletrans/__init__.py index ab09d10..cc549d1 100644 --- a/googletrans/__init__.py +++ b/googletrans/__init__.py @@ -1,3 +1,3 @@ """Free Google Translate API for Python. Translates totally free of charge.""" -__version__ = 1.1 \ No newline at end of file +__version__ = 1.1.1 \ No newline at end of file diff --git a/setup.py b/setup.py index 94f2191..caa4588 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ def install(): desc = googletrans.__doc__ setup( name='py-googletrans', - version='1.1', + version='1.1.1', description=desc, long_description=desc, author='SuHun Han', @@ -31,6 +31,7 @@ def install(): 'requests', 'future', ], + scripts=['translate'], ) if __name__ == "__main__":