{ "info": { "author": "Matthew T. Kennerly (mtkennerly)", "author_email": "mtkennerly@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Communications :: Email", "Topic :: Utilities" ], "description": "Clingy lets you save attachments from plain text emails.\n\nFrom the command line, you can use it like this:\n\n```\nclingy email1.txt email2.txt email3.txt\n```\n\nBy default, the attachments will be saved into the current directory.\nYou can specify a different directory using `-d` or `--directory` like so,\nand the directory will be created if it does not exist:\n\n```\nclingy email.txt -d out\n```\n\nYou can save specific attachments using glob patterns (`-g` or `--glob`)\nand regular expressions (`-r` or `--regex`):\n\n```\nclingy email.txt -g \"*.txt\"\nclingy email.txt -r \"^.+\\.txt$\"\n```\n\nWhen you `pip install clingy`, Python will create a platform-appropriate\nexecutable in the Python Scripts directory. Assuming you have that directory\nin your path, you can just run `clingy` from the console.\n\nYou can also use it as a library:\n\n```python\nimport clingy\n\n# List all attachments from an email file\nclingy.find(\"email.txt\")\n\n# List all attachments from an email string\nwith open(\"email.txt\") as file:\n clingy.find(file.read())\n\n# Save all attachments by filename\nclingy.save(\"email.txt\")\n\n# Save all attachments by string\nwith open(\"email.txt\") as file:\n clingy.save(file.read())\n\n# Save single attachment from email.message.Message object\nattachments = clingy.find(\"email.txt\")\nclingy.save(attachments[0])\n\n# Find all TXT files via glob pattern:\nclingy.find(\"email.txt\", glob=\"*.txt\")\n\n# Save all TXT files via regular expression:\nclingy.save(\"email.txt\", regex=r\"^.+\\.txt$\")\n```\n\nThe combo glob/regex matcher is also available for good measure:\n\n```python\nimport clingy\n\nclingy.match(\"foo.txt\", glob=\"*.txt\")\nclingy.match(\"foo.txt\", regex=\"\\.txt$\")\n````", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mtkennerly/clingy", "keywords": "email attachment", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "clingy", "package_url": "https://pypi.org/project/clingy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/clingy/", "project_urls": { "Homepage": "https://github.com/mtkennerly/clingy" }, "release_url": "https://pypi.org/project/clingy/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "A tool to save attachments from plain text emails", "version": "1.0.0" }, "last_serial": 2725267, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "5276cca7387b9a438392b63ea846e1d1", "sha256": "bad8b60fb9ffe3b152075225da4723d882113894a17567b4816ab43659a4424a" }, "downloads": -1, "filename": "clingy-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5276cca7387b9a438392b63ea846e1d1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4979, "upload_time": "2017-03-23T09:28:39", "url": "https://files.pythonhosted.org/packages/36/e9/6080e922f491c42213d0be6c337d165b9b87cc5d5e817588fd518490a1c5/clingy-1.0.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5276cca7387b9a438392b63ea846e1d1", "sha256": "bad8b60fb9ffe3b152075225da4723d882113894a17567b4816ab43659a4424a" }, "downloads": -1, "filename": "clingy-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5276cca7387b9a438392b63ea846e1d1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4979, "upload_time": "2017-03-23T09:28:39", "url": "https://files.pythonhosted.org/packages/36/e9/6080e922f491c42213d0be6c337d165b9b87cc5d5e817588fd518490a1c5/clingy-1.0.0-py2.py3-none-any.whl" } ] }