{ "info": { "author": "Yngve H\u00f8iseth", "author_email": "yngve@hoiseth.net", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# paytext\n\n[![Build Status](https://scrutinizer-ci.com/g/yhoiseth/paytext/badges/build.png?b=master)](https://scrutinizer-ci.com/g/yhoiseth/paytext/build-status/master)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/yhoiseth/paytext/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/yhoiseth/paytext/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/yhoiseth/paytext/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/yhoiseth/paytext/?branch=master)\n[![PyPI version](https://badge.fury.io/py/paytext.svg)](https://badge.fury.io/py/paytext)\n\nPython package to generalize texts from payments.\n\n## Motivation\n\nWhen categorizing payments, I want to avoid categorizing the same type of expense multiple times. Often, the only information we have about a payment is the date, amount and a slightly cryptic string. For example, I recently bought some plane tickets using [Ticket](https://www.ticket.no/). On my account statement, that produced a string similar to this one: `*4274 25.06 NOK 4101.00 WWW.TICKET.NO Kurs: 1.0000`.\n\nNow, when I put this payment in the _Travel_ category, I'd like all future payments to the same vendor to be automatically put in the same category. But the next time I buy a plane ticket from them, the date and amount will be different. Also, the leading card number may be different, too. So, in order to automate the categorization, we need to _generalize_ the text. In other words, `*4274 25.06 NOK 4101.00 WWW.TICKET.NO Kurs: 1.0000` needs to become `WWW.TICKET.NO`. That's what this tiny package does.\n\n## Installation\n\nUse [Pipenv](https://docs.pipenv.org/): `pipenv install paytext`\n\n## Usage\n\n```python\nfrom paytext import PaymentText\n\npayment_text: PaymentText = PaymentText(\n '*4274 25.06 NOK 4101.00 WWW.TICKET.NO Kurs: 1.0000',\n)\n\nprint(payment_text) # Output: '*4274 25.06 NOK 4101.00 WWW.TICKET.NO Kurs: 1.0000' \n\npayment_text.generalize()\n\nprint(payment_text) # Output: 'WWW.TICKET.NO'\n\n```\n\n## Known limitations\n\nI've mostly had strings from transactions with Norwegian merchants and banks to work with, so this package probably won't work as well with other languages/locales. If you find strings that it doesn't handle well, please [open an issue on GitHub](https://github.com/yhoiseth/payment-card-text/issues/new).\n\n## Running tests\n\nRun the command `nosetests`.\n\n## Upload new release to the Python Package Index\n\n1. Update version number in [setup.py](setup.py).\n2. Make new distribution: `python setup.py sdist bdist_wheel`\n3. Upload to PyPI: `twine upload dist/*`\n\n\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/yhoiseth/paytext", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "paytext", "package_url": "https://pypi.org/project/paytext/", "platform": "", "project_url": "https://pypi.org/project/paytext/", "project_urls": { "Homepage": "https://github.com/yhoiseth/paytext" }, "release_url": "https://pypi.org/project/paytext/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Generalize texts from payment card transactions", "version": "0.0.2" }, "last_serial": 4090573, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "23834c9332e8e361badaf2f24c1a9364", "sha256": "53882480c85762b79740106cd4080249fc5cf38b90479e15e95609cd6b3997e3" }, "downloads": -1, "filename": "paytext-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "23834c9332e8e361badaf2f24c1a9364", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5359, "upload_time": "2018-07-22T16:13:19", "url": "https://files.pythonhosted.org/packages/43/a7/dc52aacde77edef8dbfd34aedeca424745eb0e4c50added535d1d462acc2/paytext-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1345e186bb27c676bee1a875e1385b2f", "sha256": "fffb71bceca44e1a1ea19398fd0bc1734c74e1a83e4f68b9da482d8662f056ec" }, "downloads": -1, "filename": "paytext-0.0.1.tar.gz", "has_sig": false, "md5_digest": "1345e186bb27c676bee1a875e1385b2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4118, "upload_time": "2018-07-22T16:13:20", "url": "https://files.pythonhosted.org/packages/62/11/a72757c115f0c6143508b653a9c36e5bbcece906fe387c5fe144de708169/paytext-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "25db2e8d910042bf4decb2c258d849a3", "sha256": "86a9f7bc740530ee9f9be0770f124568708fa8b593ed9e023da3a77a6f48be79" }, "downloads": -1, "filename": "paytext-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "25db2e8d910042bf4decb2c258d849a3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5489, "upload_time": "2018-07-22T16:41:42", "url": "https://files.pythonhosted.org/packages/1c/87/85128562f9438045e45e4cb53d20b6e439be0b8814f901b36b6da61d4a71/paytext-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "091ba3f0bde8e05b308c2ddf5471cc15", "sha256": "72e9b0edc661a9624f00f45f7f8e7ca74a26b0b76246197f3bcd221cf5f2d5e8" }, "downloads": -1, "filename": "paytext-0.0.2.tar.gz", "has_sig": false, "md5_digest": "091ba3f0bde8e05b308c2ddf5471cc15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4320, "upload_time": "2018-07-22T16:41:44", "url": "https://files.pythonhosted.org/packages/53/dc/61d75e14abb404d114baa75139686adf1b7d07535b3301c21baa0421fecc/paytext-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "25db2e8d910042bf4decb2c258d849a3", "sha256": "86a9f7bc740530ee9f9be0770f124568708fa8b593ed9e023da3a77a6f48be79" }, "downloads": -1, "filename": "paytext-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "25db2e8d910042bf4decb2c258d849a3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5489, "upload_time": "2018-07-22T16:41:42", "url": "https://files.pythonhosted.org/packages/1c/87/85128562f9438045e45e4cb53d20b6e439be0b8814f901b36b6da61d4a71/paytext-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "091ba3f0bde8e05b308c2ddf5471cc15", "sha256": "72e9b0edc661a9624f00f45f7f8e7ca74a26b0b76246197f3bcd221cf5f2d5e8" }, "downloads": -1, "filename": "paytext-0.0.2.tar.gz", "has_sig": false, "md5_digest": "091ba3f0bde8e05b308c2ddf5471cc15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4320, "upload_time": "2018-07-22T16:41:44", "url": "https://files.pythonhosted.org/packages/53/dc/61d75e14abb404d114baa75139686adf1b7d07535b3301c21baa0421fecc/paytext-0.0.2.tar.gz" } ] }