{ "info": { "author": "Shun-Yi Jheng", "author_email": "m157q.tw@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)" ], "description": "## hor2vec\n\n[![Coverage Status](https://coveralls.io/repos/github/M157q/hor2vec/badge.svg?branch=master)](https://coveralls.io/github/M157q/hor2vec?branch=master)\n\n```\n _ ____\n| |__ ___ _ _|___ \\__ _____ ___\n| '_ \\ / _ \\| '__|__) \\ \\ / / _ \\/ __|\n| | | | (_) | | / __/ \\ V / __/ (__\n|_| |_|\\___/|_| |_____| \\_/ \\___|\\___|\n```\n\nChange your horizontal pure text to vertical with some options.\n\n---\n\n## Installation\n\n- `hor2vec` doesn't use any third party Python package.\n- You can just `git clone` from GitHub, `cd` into cloned `hor2vec` dir, and use `python3 hor2vec ...`.\n- You can also install from PyPI with `pip install hor2vec`, after that, you can just use `hor2vec ...`.\n\n\n### GitHub\n\n`$ git clone https://github.com/M157q/hor2vec`\n\n\n### PyPI\n\n`$ pip install hor2vec`\n\n---\n\n## Usage\n\n```\nusage: hor2vec [-h] [-s SEP] [-ld {l2r,r2l}] [-wd {t2b,b2t}] [-nr] [-fw]\n [input]\n\npositional arguments:\n input The file has horizontal pure text to be changed to\n vertical. If not been given in the command, will use\n the stdin as input.\n\noptional arguments:\n -h, --help show this help message and exit\n -s SEP, --sep SEP, --separator SEP\n The separator between lines. Default is '', you can\n use ' ', '|' or any other strings.\n -ld {l2r,r2l}, --line-direction {l2r,r2l}\n The reading direction of each line. Default is 'l2r'\n (left to right), you can choose 'r2l' (right to left).\n -wd {t2b,b2t}, --word-direction {t2b,b2t}\n The reading direction of each word/character. Default\n is 't2b' (top to bottom), you can choose 'b2t' (bottom\n to top).\n -nr, --no-rotate If this option has been given, hor2vec won't rotate\n the input.\n -fw, --full-width If this option has been given, hor2vec will use\n fullwidth characters instead of halfwidth characters.\n```\n\n---\n\n## Examples\n\n### Chinese\n\n```\n$ cat tests/data/chinese_test_data.txt\n\u6211\u8981\u8e0f\u4e0a\u4e00\u500b\u964c\u751f\u7684\u65c5\u9014\n\u6211\u6703\u5fd8\u8a18\u6709\u4f60\u966a\u4f34\u7684\u6eab\u5ea6\n\u8a66\u8457\u653e\u4e0b\u5fc3\u4e2d\u6700\u907a\u61be\u5b64\u7368\n\u5b78\u8457\u795d\u798f\n\u6211\u8981\u8b8a\u6210\u5168\u4e16\u754c\u6700\u52c7\u6562\u7684\u4eba\n\u76f8\u4fe1\u4e00\u5207\u5b89\u6392\u90fd\u662f\u6700\u597d\u7684\u8def\n\u518d\u898b\n```\n\n```\n$ python3 hor2vec tests/data/chinese_test_data.txt\n\u6211\u6211\u8a66\u5b78\u6211\u76f8\u518d\n\u8981\u6703\u8457\u8457\u8981\u4fe1\u898b\n\u8e0f\u5fd8\u653e\u795d\u8b8a\u4e00\n\u4e0a\u8a18\u4e0b\u798f\u6210\u5207\n\u4e00\u6709\u5fc3\u3000\u5168\u5b89\n\u500b\u4f60\u4e2d\u3000\u4e16\u6392\n\u964c\u966a\u6700\u3000\u754c\u90fd\n\u751f\u4f34\u907a\u3000\u6700\u662f\n\u7684\u7684\u61be\u3000\u52c7\u6700\n\u65c5\u6eab\u5b64\u3000\u6562\u597d\n\u9014\u5ea6\u7368\u3000\u7684\u7684\n\u3000\u3000\u3000\u3000\u4eba\u8def\n```\n\n```\n$ python3 hor2vec -s '|' tests/data/chinese_test_data.txt\n\u6211|\u6211|\u8a66|\u5b78|\u6211|\u76f8|\u518d\n\u8981|\u6703|\u8457|\u8457|\u8981|\u4fe1|\u898b\n\u8e0f|\u5fd8|\u653e|\u795d|\u8b8a|\u4e00|\n\u4e0a|\u8a18|\u4e0b|\u798f|\u6210|\u5207|\n\u4e00|\u6709|\u5fc3|\u3000|\u5168|\u5b89|\n\u500b|\u4f60|\u4e2d|\u3000|\u4e16|\u6392|\n\u964c|\u966a|\u6700|\u3000|\u754c|\u90fd|\n\u751f|\u4f34|\u907a|\u3000|\u6700|\u662f|\n\u7684|\u7684|\u61be|\u3000|\u52c7|\u6700|\n\u65c5|\u6eab|\u5b64|\u3000|\u6562|\u597d|\n\u9014|\u5ea6|\u7368|\u3000|\u7684|\u7684|\n\u3000|\u3000|\u3000|\u3000|\u4eba|\u8def|\n```\n\n```\n$ python3 hor2vec -s '|' -ld r2l tests/data/chinese_test_data.txt\n\u518d|\u76f8|\u6211|\u5b78|\u8a66|\u6211|\u6211\n\u898b|\u4fe1|\u8981|\u8457|\u8457|\u6703|\u8981\n\u3000|\u4e00|\u8b8a|\u795d|\u653e|\u5fd8|\u8e0f\n\u3000|\u5207|\u6210|\u798f|\u4e0b|\u8a18|\u4e0a\n\u3000|\u5b89|\u5168|\u3000|\u5fc3|\u6709|\u4e00\n\u3000|\u6392|\u4e16|\u3000|\u4e2d|\u4f60|\u500b\n\u3000|\u90fd|\u754c|\u3000|\u6700|\u966a|\u964c\n\u3000|\u662f|\u6700|\u3000|\u907a|\u4f34|\u751f\n\u3000|\u6700|\u52c7|\u3000|\u61be|\u7684|\u7684\n\u3000|\u597d|\u6562|\u3000|\u5b64|\u6eab|\u65c5\n\u3000|\u7684|\u7684|\u3000|\u7368|\u5ea6|\u9014\n\u3000|\u8def|\u4eba|\u3000|\u3000|\u3000|\n```\n\n```\n$ python3 hor2vec -s '|' -ld r2l -wd b2t tests/data/chinese_test_data.txt\n\u3000|\u8def|\u4eba|\u3000|\u3000|\u3000|\n\u3000|\u7684|\u7684|\u3000|\u7368|\u5ea6|\u9014\n\u3000|\u597d|\u6562|\u3000|\u5b64|\u6eab|\u65c5\n\u3000|\u6700|\u52c7|\u3000|\u61be|\u7684|\u7684\n\u3000|\u662f|\u6700|\u3000|\u907a|\u4f34|\u751f\n\u3000|\u90fd|\u754c|\u3000|\u6700|\u966a|\u964c\n\u3000|\u6392|\u4e16|\u3000|\u4e2d|\u4f60|\u500b\n\u3000|\u5b89|\u5168|\u3000|\u5fc3|\u6709|\u4e00\n\u3000|\u5207|\u6210|\u798f|\u4e0b|\u8a18|\u4e0a\n\u3000|\u4e00|\u8b8a|\u795d|\u653e|\u5fd8|\u8e0f\n\u898b|\u4fe1|\u8981|\u8457|\u8457|\u6703|\u8981\n\u518d|\u76f8|\u6211|\u5b78|\u8a66|\u6211|\u6211\n```\n\n```\n$ python3 hor2vec -nr -ld r2l tests/data/chinese_test_data.txt\n\u3000\u9014\u65c5\u7684\u751f\u964c\u500b\u4e00\u4e0a\u8e0f\u8981\u6211\n\u3000\u5ea6\u6eab\u7684\u4f34\u966a\u4f60\u6709\u8a18\u5fd8\u6703\u6211\n\u3000\u7368\u5b64\u61be\u907a\u6700\u4e2d\u5fc3\u4e0b\u653e\u8457\u8a66\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u798f\u795d\u8457\u5b78\n\u4eba\u7684\u6562\u52c7\u6700\u754c\u4e16\u5168\u6210\u8b8a\u8981\u6211\n\u8def\u7684\u597d\u6700\u662f\u90fd\u6392\u5b89\u5207\u4e00\u4fe1\u76f8\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u898b\u518d\n```\n\n```\n$ python3 hor2vec -nr -ld r2l -wd b2t tests/data/chinese_test_data.txt\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u898b\u518d\n\u8def\u7684\u597d\u6700\u662f\u90fd\u6392\u5b89\u5207\u4e00\u4fe1\u76f8\n\u4eba\u7684\u6562\u52c7\u6700\u754c\u4e16\u5168\u6210\u8b8a\u8981\u6211\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u798f\u795d\u8457\u5b78\n\u3000\u7368\u5b64\u61be\u907a\u6700\u4e2d\u5fc3\u4e0b\u653e\u8457\u8a66\n\u3000\u5ea6\u6eab\u7684\u4f34\u966a\u4f60\u6709\u8a18\u5fd8\u6703\u6211\n\u3000\u9014\u65c5\u7684\u751f\u964c\u500b\u4e00\u4e0a\u8e0f\u8981\u6211\n```\n\n### English\n\n```\n$ cat tests/data/english_test_data.txt\nI\nwant\nto\nbe\nyour\nfriend.\n\nCan\nwe\n?\n```\n\n```\n$ python3 hor2vec tests/data/english_test_data.txt\nIwtbyf Cw?\n aoeor ae\n n ui n\n t re\n n\n d\n .\n```\n\n```\n$ python3 hor2vec -fw tests/data/english_test_data.txt\n\uff29\uff57\uff54\uff42\uff59\uff46 \uff23\uff57\uff1f\n\u3000\uff41\uff4f\uff45\uff4f\uff52 \uff41\uff45\n\u3000\uff4e\u3000\u3000\uff55\uff49 \uff4e\n\u3000\uff54\u3000\u3000\uff52\uff45\n\u3000\u3000\u3000\u3000\u3000\uff4e\n\u3000\u3000\u3000\u3000\u3000\uff44\n\u3000\u3000\u3000\u3000\u3000\uff0e\n```\n\n```\n$ python3 hor2vec -s ' ' tests/data/english_test_data.txt\nI w t b y f C w ?\n a o e o r a e\n n u i n\n t r e\n n\n d\n .\n```\n\n```\n$ python3 hor2vec -s ' ' -ld r2l tests/data/english_test_data.txt\n? w C f y b t w I\n e a r o e o a\n n i u n\n e r t\n n\n d\n .\n```\n\n```\n$ python3 hor2vec -s ' ' -ld r2l -wd b2t tests/data/english_test_data.txt\n .\n d\n n\n e r t\n n i u n\n e a r o e o a\n? w C f y b t w I\n```\n\n```\n$ python3 hor2vec -nr -ld r2l tests/data/english_test_data.txt\n I\n tnaw\n ot\n eb\n ruoy\n.dneirf\n\n naC\n ew\n ?\n```\n\n```\n$ python3 hor2vec -nr -ld r2l -wd b2t tests/data/english_test_data.txt\n ?\n ew\n naC\n\n.dneirf\n ruoy\n eb\n ot\n tnaw\n I\n```\n\n---\n\n## Development\n\n### Install dev dependencies\n\n`pipenv install --dev`\n\nor\n\n`pip install -r requirements-test.txt`\n\n### Testings\n\n`python -m pytest --cov hor2vec/ --cov-report html --cov-report term`\nor just\n`make test`\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/M157q/hor2vec", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "hor2vec", "package_url": "https://pypi.org/project/hor2vec/", "platform": "", "project_url": "https://pypi.org/project/hor2vec/", "project_urls": { "Homepage": "https://github.com/M157q/hor2vec" }, "release_url": "https://pypi.org/project/hor2vec/2.1.2/", "requires_dist": null, "requires_python": "", "summary": "Change your horizontal pure text to vertical with some options.", "version": "2.1.2" }, "last_serial": 5728767, "releases": { "2.1.0": [ { "comment_text": "", "digests": { "md5": "5a639bb8a063c3a33d7df3ca37b7a30b", "sha256": "920212719b91f276516c4eb4bfc9b16b0c11d1c27f7a6d95387db92392e3d95b" }, "downloads": -1, "filename": "hor2vec-2.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5a639bb8a063c3a33d7df3ca37b7a30b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 38219, "upload_time": "2018-09-24T08:32:25", "url": "https://files.pythonhosted.org/packages/e1/f7/fde786b9e402c0f3fb4dad3664c3229e3b6c0be9173be4bd0be815ec5edf/hor2vec-2.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "53dd5931cdd697fd1571386c8e0202e1", "sha256": "f63419c59912dc13b81b314de77cc6d96cd8f9cbbac8dc8f6406b560600dacf9" }, "downloads": -1, "filename": "hor2vec-2.1.0.tar.gz", "has_sig": false, "md5_digest": "53dd5931cdd697fd1571386c8e0202e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24075, "upload_time": "2018-09-24T08:32:40", "url": "https://files.pythonhosted.org/packages/a6/55/5f5dc5f6122d8916cdb094a88d8aae57509096c598f19acc3a28fe29424f/hor2vec-2.1.0.tar.gz" } ], "2.1.1": [ { "comment_text": "", "digests": { "md5": "cf2259836a23d88bc936941df295e197", "sha256": "fe095260aec54fc8711af3f6584e469b2565140482547551f0a916e4eaf88416" }, "downloads": -1, "filename": "hor2vec-2.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cf2259836a23d88bc936941df295e197", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 40401, "upload_time": "2018-09-24T09:07:21", "url": "https://files.pythonhosted.org/packages/05/db/864422639caa62751e2addc250351ffbd7fb781f3a707752d9d2846f1143/hor2vec-2.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d641e6071f48c41a009522dec18aac9a", "sha256": "cca3368a62b7e7607396bc2fbaeab353d08c9b116ffdbcb3966dc7b0ada37459" }, "downloads": -1, "filename": "hor2vec-2.1.1.tar.gz", "has_sig": false, "md5_digest": "d641e6071f48c41a009522dec18aac9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24116, "upload_time": "2018-09-24T09:07:28", "url": "https://files.pythonhosted.org/packages/c4/4c/9057f835a11cd611344934780fa398f42db25aa2a7d81528317c80ffbcb2/hor2vec-2.1.1.tar.gz" } ], "2.1.2": [ { "comment_text": "", "digests": { "md5": "9a6c955e9e9d8cbd04edfafb3298b2fa", "sha256": "3b5d3ceb8a57a404cd61fe9f17d7811a4b4362b175d61d2cc0ff879e870fa267" }, "downloads": -1, "filename": "hor2vec-2.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9a6c955e9e9d8cbd04edfafb3298b2fa", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 40367, "upload_time": "2019-08-26T03:36:56", "url": "https://files.pythonhosted.org/packages/30/3f/4380dea4c76a900daf05281b804e06e80e1eca96a7ad1cc45b731f811066/hor2vec-2.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "096deb69d499d9b6bb18ecc9109031c3", "sha256": "952fe7ca42ff6f2e991eeed1c76793279e2f896a4da91f86e8b1b8b7b043c95a" }, "downloads": -1, "filename": "hor2vec-2.1.2.tar.gz", "has_sig": false, "md5_digest": "096deb69d499d9b6bb18ecc9109031c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24225, "upload_time": "2019-08-26T03:37:11", "url": "https://files.pythonhosted.org/packages/11/73/201666e915858ae6b1e54bb3e3773db3019fd4fb768b14b8c8c461dde350/hor2vec-2.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9a6c955e9e9d8cbd04edfafb3298b2fa", "sha256": "3b5d3ceb8a57a404cd61fe9f17d7811a4b4362b175d61d2cc0ff879e870fa267" }, "downloads": -1, "filename": "hor2vec-2.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9a6c955e9e9d8cbd04edfafb3298b2fa", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 40367, "upload_time": "2019-08-26T03:36:56", "url": "https://files.pythonhosted.org/packages/30/3f/4380dea4c76a900daf05281b804e06e80e1eca96a7ad1cc45b731f811066/hor2vec-2.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "096deb69d499d9b6bb18ecc9109031c3", "sha256": "952fe7ca42ff6f2e991eeed1c76793279e2f896a4da91f86e8b1b8b7b043c95a" }, "downloads": -1, "filename": "hor2vec-2.1.2.tar.gz", "has_sig": false, "md5_digest": "096deb69d499d9b6bb18ecc9109031c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24225, "upload_time": "2019-08-26T03:37:11", "url": "https://files.pythonhosted.org/packages/11/73/201666e915858ae6b1e54bb3e3773db3019fd4fb768b14b8c8c461dde350/hor2vec-2.1.2.tar.gz" } ] }