{ "info": { "author": "James C. Palmer", "author_email": "james@pgmny.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.7" ], "description": "CSV Cleaner\r\n===========\r\n\r\nCSV Cleaner is an Apache 2.0 licensed Python library that removes rows\r\ncontaining blacklisted words from a CSV file.\r\n\r\nInstructions\r\n------------\r\n\r\n```python\r\n>>> import csvcleaner\r\n>>> f = csvcleaner.CSVCleaner()\r\n>>> f.run('/path/to/file.csv')\r\n```\r\n\r\nWhen ``run`` is called, CSV Cleaner will loop through each row within the CSV file and search for blacklisted words.\r\n\r\nWhen a row is rejected because it contains a blacklisted word, it's moved to a ``[name]-rejected.csv`` file. Accepted rows are moved to a ``[name]-accepted.csv`` file. Both files are saved in the same directory as the original CSV file.\r\n\r\nInstallation\r\n------------\r\n\r\nTo install CSV Cleaner, simply run:\r\n\r\n```bash\r\n$ pip install csvcleaner\r\n```\r\n\r\nParmateres\r\n----------\r\n\r\n``CSVCleaner`` accepts several parameters:\r\n\r\n```python\r\n>>> import csvcleaner\r\n>>> f = csvcleaner(blacklist=[], replace_chars=[], configure=True, lowercase=True, strict=False)\r\n```\r\n\r\n#### blacklist\r\n\r\nA ``list`` of characters or words that are used to determine if a row is rejected.\r\n\r\nDefault: ``[]`` (unless ``configure`` is ``True``)\r\n\r\n#### replace_chars\r\n\r\nA ``list`` of words or characters that are replaced by a space in order to make word detection more accurate and effective.\r\n\r\nDefault: ``[]`` (unless ``configure`` is ``True``)\r\n\r\n#### configure\r\n\r\nWhen ``True``, CSV Cleaner will use recommended lists for ``blacklist`` and ``replace_chars``. These recommended lists will only be used if ``blacklist`` and ``replace_chars`` are ommitted during class instantiation or contain an empty list. Set to ``False`` if you intend to supply custom lists for ``blacklist`` and ``replace_chars``.\r\n\r\nDefault: ``True``.\r\n\r\n#### lowercase\r\n\r\nWhen ``True``, all characters and strings will be converted to lowercase for more accurate word detection. When a row is inserted into ``[name]-accepted.csv`` or ``[name]-rejected.csv``, its original case remains. Set to ``False`` if case matching is important.\r\n\r\nDefault: ``True``.\r\n\r\n#### strict\r\n\r\nWhen ``True``, rows that *may* contain (e.g., fuzzy matches) blacklisted words or characters are rejected.\r\n\r\nDefault: ``False``.\r\n\r\nBlacklist\r\n---------\r\n\r\nCSV Cleaner includes a blacklist that's used when ``configure`` is ``True`` and\r\n``blacklist`` is left empty. This blacklist is maintained by [Shutterstock](https://github.com/shutterstock/)\r\non [Github](https://github.com/shutterstock/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words).", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/palmer/csvcleaner", "keywords": "", "license": "Apache 2.0", "maintainer": "Palmer Group Media, LLC", "maintainer_email": "github@pgmny.com", "name": "csvcleaner", "package_url": "https://pypi.org/project/csvcleaner/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/csvcleaner/", "project_urls": { "Homepage": "https://github.com/palmer/csvcleaner" }, "release_url": "https://pypi.org/project/csvcleaner/1.0.6/", "requires_dist": null, "requires_python": null, "summary": "Removes rows containing blacklisted words from a CSV file.", "version": "1.0.6" }, "last_serial": 1249840, "releases": { "1.0.6": [ { "comment_text": "", "digests": { "md5": "41c5d0746c8e12722e95ecfcbcd3a891", "sha256": "bf7467a2c7af2316341ebb5f4cfabb235d69d37498032326922245da93693330" }, "downloads": -1, "filename": "csvcleaner-1.0.6.tar.gz", "has_sig": false, "md5_digest": "41c5d0746c8e12722e95ecfcbcd3a891", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12385, "upload_time": "2014-10-05T03:21:10", "url": "https://files.pythonhosted.org/packages/d0/39/a3576c74dc4160f0225ce858751d4905a98d9f3230f444042a002484d54f/csvcleaner-1.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "41c5d0746c8e12722e95ecfcbcd3a891", "sha256": "bf7467a2c7af2316341ebb5f4cfabb235d69d37498032326922245da93693330" }, "downloads": -1, "filename": "csvcleaner-1.0.6.tar.gz", "has_sig": false, "md5_digest": "41c5d0746c8e12722e95ecfcbcd3a891", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12385, "upload_time": "2014-10-05T03:21:10", "url": "https://files.pythonhosted.org/packages/d0/39/a3576c74dc4160f0225ce858751d4905a98d9f3230f444042a002484d54f/csvcleaner-1.0.6.tar.gz" } ] }