{
"info": {
"author": "EnderQIU",
"author_email": "a934560824@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: Microsoft :: Windows :: Windows 10",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Utilities"
],
"description": "# cp2trans\n\nTranslate text from clipboard.\n\n- [\u4e2d\u6587\u6587\u6863](README.zh-CN.md)\n\n## Installation\n\nThis script is written for Windows. Believe it's a hard way to setup but an easy one to use :).\n\n1. Python 37 on Windows 10.\n2. Upgrade pip by `pip install -U pip`.\n3. Install `aws-cli` from and initiate aws by `aws configure`.\n4. Install MeCab from . Add the `/bin` directory $PATH.\n5. Make additional dictionary by [mecab-ipadic-neologd](https://github.com/neologd/mecab-ipadic-neologd).\n Since it's hard to build on Windows 10, I suggest build it on Ubuntu WSL and copy all the files under\n `/usr/lib/x86_64-linux-gnu/mecab/dic/mecab-ipadic-neologd` into `C:\\neologd\\` if you want the newest dictionary.\n [Here](neologd/)'s a pre-built dictionary on 2019-05-11.\n6. **NOTICE:** We use `pydub`'s ffmpeg binding to play TTS mp3 audio. If you want to enable TTS, download ffmpeg from\n or just ignore the warning. We won't save mp3 so you should mind of its costs.\n7. Install requirements by `pip install -r requirements.txt`. If your system default encoding is not UTF-8, you might\n fail on installing the `romkan` package. Usually neither `chcp` nor `locale.setdefaultencoding()` won't solve this\n problem. I suggest manually download [romkan source code](https://github.com/soimort/python-romkan) and replace line 12\n `README = open(os.path.join(here, 'README.rst')).read()` to\n `README = open(os.path.join(here, 'README.rst'), encoding=\"utf-8\").read()`. Then run `python .\\setup.py install`.\n8. Copy a file of `config.ini.example` and rename it to `config.ini`. Fill in the `appid` and the `secretkey`, make sure\n `Natural Language Translation` of this app is enabled.\n9. Run the script by `python .\\cp2trans\\cp2trans.py` or install `cp2trans` by `python setup.py install` (in this way you can pass step 8).\n\n## Usage\n\n```powershell\nPS C:\\cp2translate> python .\\cp2trans.py -h\nusage: cp2trans [-h] [--passwd log_file] [-p section] [-l log_file]\n [-e password] [-v {0,1}] [-m pattern] [-s lang_code]\n [-t lang_code] [-d] [-i seconds] [-a agth_path] [-o agth_opts]\n\nClipboard to Translate.\n\noptional arguments:\n -h, --help show this help message and exit\n --passwd log_file Change password of an encrypted log_file or\n encrypt/decrypt log_file and exit.\n -p section, --profile section\n Load profiled options from the specified section of\n \"config.ini\" file. Any other options from command line\n will be ignored. See details in \"config.example.ini\".\n -l log_file, --log log_file\n Save and read translation history from \"log_file\" to\n save API calls.\n -e password, --encrypt password\n Encrypt logfile if you don't want it too exposed ;P.\n Have to be specified while loading an encrypted log\n file.\n -v {0,1}, --voice {0,1}\n Voice of TTS. \"0\" for male and \"1\" for female. Unset\n for disable TTS.\n -m pattern, --match pattern\n Only TTS when match .\n -s lang_code, --source lang_code\n Source language code. Romkan will only be shown with\n \"ja\".\n -t lang_code, --target lang_code\n Primary uses Youdao API and the secondary by AWS\n translate API.\n -d, --disable Disable AWS translate api in low network connection\n environment. Log won't be recorded into disk (but will\n be in memory) if set.\n -i seconds, --interval seconds\n Time interval in seconds to check the clipboard.\n -a agth_path, --agth agth_path\n Start AGTH text hook. \"agth_path\" must be specified.\n You might also have to specify -o option.\n -o agth_opts, --opt agth_opts\n Extra options passed to \"agth.exe\". See details by the\n help button of \"agth.exe\" window.\n```",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/EnderQIU/cp2translate",
"keywords": "clipboard translate",
"license": "GPLv3",
"maintainer": "",
"maintainer_email": "",
"name": "cp2trans",
"package_url": "https://pypi.org/project/cp2trans/",
"platform": "",
"project_url": "https://pypi.org/project/cp2trans/",
"project_urls": {
"Homepage": "https://github.com/EnderQIU/cp2translate"
},
"release_url": "https://pypi.org/project/cp2trans/1.0.7/",
"requires_dist": null,
"requires_python": "",
"summary": "Clipboard to translate.",
"version": "1.0.7"
},
"last_serial": 5288120,
"releases": {
"1.0.7": [
{
"comment_text": "",
"digests": {
"md5": "af3480a6571e196687ee8a9db4c71611",
"sha256": "966d7a6ea65e581897c2f2106e0e82c9a854d5022e052689c65ed6782640e64a"
},
"downloads": -1,
"filename": "cp2trans-1.0.7.tar.gz",
"has_sig": false,
"md5_digest": "af3480a6571e196687ee8a9db4c71611",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 29311,
"upload_time": "2019-05-19T12:28:52",
"url": "https://files.pythonhosted.org/packages/ca/77/17d7e545457de6c49484a00ad3b47fc161cd48a4f97cf47f69924c5396cc/cp2trans-1.0.7.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "af3480a6571e196687ee8a9db4c71611",
"sha256": "966d7a6ea65e581897c2f2106e0e82c9a854d5022e052689c65ed6782640e64a"
},
"downloads": -1,
"filename": "cp2trans-1.0.7.tar.gz",
"has_sig": false,
"md5_digest": "af3480a6571e196687ee8a9db4c71611",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 29311,
"upload_time": "2019-05-19T12:28:52",
"url": "https://files.pythonhosted.org/packages/ca/77/17d7e545457de6c49484a00ad3b47fc161cd48a4f97cf47f69924c5396cc/cp2trans-1.0.7.tar.gz"
}
]
}