{ "info": { "author": "Kal Sze (twitter.com/k_sze, github.com/ksze)", "author_email": "swordangel@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: System :: Filesystems", "Topic :: Utilities" ], "description": "filename-sanitizer\n==================\n\nA Python 2.7/3.2+ module that aims to sanitize filenames in a cross-platform, cross-filesystem manner.\n\nDedicated to Nadia Mahmood, my good friend Jawaad's newborn daughter. Maybe this module will be useful to her if she ever decides to follow her father's footsteps in becoming a hacker. ;-)\n\nThis is only a beginning; much work needs to be done to deal with the various filesystems' under-documented aspects.\n\nUnlike most of the extremely na\u00efve, whitelist-based solutions found on the Internet, this solution deals much better with Unicode filenames.\n\nHow to use\n----------\n\n```py3\n >>> from filename_sanitizer import sanitize_path_fragment\n >>> crazy_filename = u'\"foo/baryada*meow?.'\n >>> sanitized_filename = sanitize_path_fragment(\n ... crazy_filename,\n ... target_file_systems = {'ntfs_win32'},\n ... replacement = u'-'\n ... )\n ...\n >>> print(sanitized_filename)\n -foo-bar-bla-yada-meow--\n >>>\n```\n\nRead the file [`filename_sanitizer/__init__.py`](filename_sanitizer/__init__.py) for details of how the function deals with various file systems.\n\nLicense\n-------\n\nBSD 2-Clause License. See the file [LICENSE](LICENSE).\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ksze/filename-sanitizer", "keywords": "filename sanitization", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "filename-sanitizer", "package_url": "https://pypi.org/project/filename-sanitizer/", "platform": "", "project_url": "https://pypi.org/project/filename-sanitizer/", "project_urls": { "Homepage": "https://github.com/ksze/filename-sanitizer" }, "release_url": "https://pypi.org/project/filename-sanitizer/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "A Python 2.7/3.2+ package to sanitize filenames in a (hopefully) cross-platform, cross-filesystem manner.", "version": "0.1.0" }, "last_serial": 4500138, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ab9262194437312286ba2f83a7ec2019", "sha256": "6dc70ebef9167deed735a73ea2033066707331c504400aa0de2f221b75d2cd84" }, "downloads": -1, "filename": "filename_sanitizer-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ab9262194437312286ba2f83a7ec2019", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5793, "upload_time": "2018-11-18T16:06:07", "url": "https://files.pythonhosted.org/packages/49/c6/5972f7810b3ccf8e6809d8c01ba872678f816ed23e41619487c454496569/filename_sanitizer-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5062be25106435e31934a5c90988aa91", "sha256": "4b79ef7b46ffc60bf51cd1dd623e6ff39af7f88e6a583b0d02653aea17994dc4" }, "downloads": -1, "filename": "filename-sanitizer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5062be25106435e31934a5c90988aa91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4582, "upload_time": "2018-11-18T16:06:09", "url": "https://files.pythonhosted.org/packages/66/73/11ce0d3978aaac29daeb2cd84d9c7788747f7951b65b9029afa7e45c0c71/filename-sanitizer-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ab9262194437312286ba2f83a7ec2019", "sha256": "6dc70ebef9167deed735a73ea2033066707331c504400aa0de2f221b75d2cd84" }, "downloads": -1, "filename": "filename_sanitizer-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ab9262194437312286ba2f83a7ec2019", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5793, "upload_time": "2018-11-18T16:06:07", "url": "https://files.pythonhosted.org/packages/49/c6/5972f7810b3ccf8e6809d8c01ba872678f816ed23e41619487c454496569/filename_sanitizer-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5062be25106435e31934a5c90988aa91", "sha256": "4b79ef7b46ffc60bf51cd1dd623e6ff39af7f88e6a583b0d02653aea17994dc4" }, "downloads": -1, "filename": "filename-sanitizer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5062be25106435e31934a5c90988aa91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4582, "upload_time": "2018-11-18T16:06:09", "url": "https://files.pythonhosted.org/packages/66/73/11ce0d3978aaac29daeb2cd84d9c7788747f7951b65b9029afa7e45c0c71/filename-sanitizer-0.1.0.tar.gz" } ] }