{ "info": { "author": "krakozaure", "author_email": "", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: System :: Filesystems", "Topic :: Terminals", "Topic :: Utilities" ], "description": "# fsscan\n\nQuickly scan a directory and yield matching entries, based on patterns and/or entry type.\n\n### Requirements\n\n* Python 3.4+ (Python 3.6+ is preferred)\n* scandir (for Python 3.4)\n\nThe module is tested on Python 3.4 to 3.7 (included).\n\n### Installation\n\nFrom [PyPI](https://pypi.org/)\n\n* Open a terminal\n* Type `pip3 install fsscan` \n
or `pip3 install --user fsscan` on Linux\n\nFrom [GitHub](https://github.com)\n\n* Download the archive from [GitHub](https://github.com/krakozaure/fsscan)\n* Unzip the archive\n* Open a terminal\n* Move to the directory containing `setup.py`\n* Type `pip3 install .`\n
or `pip3 install --user .` on Linux\n\n### Usage\n\n#### From command line\n\n```sh\n$ python3 -m fsscan\n```\n\nor\n\n```sh\n$ fsscan\n```\n\n```sh\nusage: fsscan [-h] [-d directory] [-i] [-r] [-t {f,d,b,FILE,DIR,BOTH}] [-f]\n [patterns [patterns ...]]\n\nQuickly scan a directory and yield matching entries.\n\npositional arguments:\n patterns Patterns to look for in entries names\n\noptional arguments:\n -h, --help show this help message and exit\n -d directory Directory to scan\n -i Ignore case\n -r Recursive scan\n -t {f,d,b,FILE,DIR,BOTH}\n Type of entry to return\n -f Follow symlinks of directories\n```\n\n#### From script\n\nUsing this directory tree sample\n```\n \n |-- dir1/\n | |-- logs/\n | | |-- file11.log\n | |-- file11.py\n |-- dir2/\n | |-- logs/\n | | |-- file21.log\n | | |-- file22.log\n | |-- file21.py\n | |-- file22.py\n |-- file1.py\n```\n\n**Example 1 - without parameters**\n```Python\nfor entry in fsscan.run(temp_dir):\n print(entry)\n```\nOutput*:\n```\n/dir1\n/dir2\n/file1.py\n```\n\n**Example 2 - with parameters**\n```Python\nparameters = {\n \"patterns\": \"*LOG*\",\n \"ignore_case\": True,\n \"wanted_type\": fsscan.DIR_TYPE,\n \"recursive\": True,\n}\nfor entry in fsscan.run(, **parameters):\n print(entry)\n```\nOutput*:\n```\n/dir1/logs\n/dir2/logs\n```\n\n* : The outputs may differ for you OS\n\n\n### Documentation\n\n```\nrun(directory='.',\n patterns=None, ignore_case=True, wanted_type=BOTH_TYPES,\n recursive=False, on_error=None, follow_links=False, callback=None):\n\nParameters\n----------\ndirectory : (str or Path)\n Directory to scan\npatterns : (str or sequence of str)\n Patterns to look for in entries names\nignore_case : bool\n Ignore case\nwanted_type : int\n Type of entry to return (file, directory or both)\nrecursive : bool\n Recursive scan\non_error : (None or callable)\n Callable to use when an error occured in scandir\nfollow_links : bool\n Follow symlinks of directories\ncallback : (None or callable)\n Callable to use after the scan (e.g. entries cast)\n\nReturns\n-------\nGenerator\n Entries paths as string or callback result\n```\n\nFor callbacks, see `fsscan/callbacks.py`.\n\n### Thanks\n\nI would say a big thank you to the people listed below :\n* [Guido van Rossum (@gvanrossum)](https://github.com/gvanrossum) and other Python contributors for their great work on [Python](https://github.com/Python/Python).\n* [Ben Hoyt (@benhoyt)](https://github.com/benhoyt) and other contributors for their great work on [scandir](https://github.com/benhoyt/scandir)\n* People from the #python-fr channel on IRC for their advices and feedbacks\n* My friends (ABR & AM) for their advices and feedbacks\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/krakozaure/fsscan", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "fsscan", "package_url": "https://pypi.org/project/fsscan/", "platform": "", "project_url": "https://pypi.org/project/fsscan/", "project_urls": { "Homepage": "https://github.com/krakozaure/fsscan" }, "release_url": "https://pypi.org/project/fsscan/0.0.4/", "requires_dist": [ "scandir; python_version == \"3.4\"" ], "requires_python": "", "summary": "Directory scanner", "version": "0.0.4" }, "last_serial": 4098219, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "17e153762bfc48bdd5cc1882633eea1f", "sha256": "0210fc446b1f41459d2719c09c705d14efff1b24705073f1afb36b432ea5957b" }, "downloads": -1, "filename": "fsscan-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "17e153762bfc48bdd5cc1882633eea1f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2444, "upload_time": "2018-07-10T21:43:21", "url": "https://files.pythonhosted.org/packages/db/7a/f4fefcabd8f34aaebca58b7430c2e8b17e8a97a625567da892560fc67055/fsscan-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "79ed384e3a7af126b9aa92ffb7b8ca80", "sha256": "dda14156bbcb4ddf5ade0c8484111e64b3fde82c9d0115716cfc5ac6fbf9643e" }, "downloads": -1, "filename": "fsscan-0.0.1.tar.gz", "has_sig": false, "md5_digest": "79ed384e3a7af126b9aa92ffb7b8ca80", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2082, "upload_time": "2018-07-10T21:43:22", "url": "https://files.pythonhosted.org/packages/34/5e/b2dade924835342fe5cf3265ed1d1ab98ee3afcc0332c845ccc467c67576/fsscan-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "5049812d6f354cea13e6dd6e2e89f7ba", "sha256": "86d9bab8f35259318cf96fa84a202b78060554c709036f13b72cc175873fcb3c" }, "downloads": -1, "filename": "fsscan-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "5049812d6f354cea13e6dd6e2e89f7ba", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3225, "upload_time": "2018-07-11T20:22:21", "url": "https://files.pythonhosted.org/packages/1b/da/da9ae250e30f8fe63eaefd1db7966b0d7428d75a2f583780b8b59591b116/fsscan-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "27197d9650f79168e3044cde0b521b0a", "sha256": "182483cedc2ff680a33cc630e89b034f958249ba1c71995d4abe004ffb0e3ef5" }, "downloads": -1, "filename": "fsscan-0.0.2.tar.gz", "has_sig": false, "md5_digest": "27197d9650f79168e3044cde0b521b0a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2735, "upload_time": "2018-07-11T20:22:22", "url": "https://files.pythonhosted.org/packages/aa/de/d6727a1cc5d9995c50adf82982a3eae4582816e0bc18b33bcc87301c114b/fsscan-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "661798dcd96950c7cd0be94ffa0082ce", "sha256": "6d0205d46efa41033195055df5096864486fd0188580f604b4104dbfd4ba2ae5" }, "downloads": -1, "filename": "fsscan-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "661798dcd96950c7cd0be94ffa0082ce", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6189, "upload_time": "2018-07-15T00:49:20", "url": "https://files.pythonhosted.org/packages/47/58/923c95d4154e88b76c03bfd2da45015e748625c24cd145062dc2216a749c/fsscan-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "59668522c2dff173182aa87a06fdb68f", "sha256": "a509ced2f054e3fc812106540aa1927e12f3b9502667c19970f97f3f983725f0" }, "downloads": -1, "filename": "fsscan-0.0.3.tar.gz", "has_sig": false, "md5_digest": "59668522c2dff173182aa87a06fdb68f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5023, "upload_time": "2018-07-15T00:49:21", "url": "https://files.pythonhosted.org/packages/f1/91/171fe3a74533b4bff6cdd35d16f34c05e1b36ce527a84418c8999f4e685f/fsscan-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "cbc33018f9bda31f9cc218e14dfc4d8d", "sha256": "e126325615f865bcd33821d9a32826a1b26ea36a06596ece3afb491a9d9f36a7" }, "downloads": -1, "filename": "fsscan-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "cbc33018f9bda31f9cc218e14dfc4d8d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6439, "upload_time": "2018-07-24T19:27:54", "url": "https://files.pythonhosted.org/packages/fd/63/ba550e7bcd2940d69738755cbddad1d56ab585797b6240c515ac080e1ad2/fsscan-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "06ae967aca86af0cf7ef5f955fd54875", "sha256": "e782b95cd01a70b50325d7e2a5fa05a339989d78080b4d0ab78d1475f51f0a62" }, "downloads": -1, "filename": "fsscan-0.0.4.tar.gz", "has_sig": false, "md5_digest": "06ae967aca86af0cf7ef5f955fd54875", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5209, "upload_time": "2018-07-24T19:27:55", "url": "https://files.pythonhosted.org/packages/f7/d4/bc828e299ab7e8ae0abb9e0e01297f7a73da4de194c1120e9b3d4fe21e30/fsscan-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cbc33018f9bda31f9cc218e14dfc4d8d", "sha256": "e126325615f865bcd33821d9a32826a1b26ea36a06596ece3afb491a9d9f36a7" }, "downloads": -1, "filename": "fsscan-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "cbc33018f9bda31f9cc218e14dfc4d8d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6439, "upload_time": "2018-07-24T19:27:54", "url": "https://files.pythonhosted.org/packages/fd/63/ba550e7bcd2940d69738755cbddad1d56ab585797b6240c515ac080e1ad2/fsscan-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "06ae967aca86af0cf7ef5f955fd54875", "sha256": "e782b95cd01a70b50325d7e2a5fa05a339989d78080b4d0ab78d1475f51f0a62" }, "downloads": -1, "filename": "fsscan-0.0.4.tar.gz", "has_sig": false, "md5_digest": "06ae967aca86af0cf7ef5f955fd54875", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5209, "upload_time": "2018-07-24T19:27:55", "url": "https://files.pythonhosted.org/packages/f7/d4/bc828e299ab7e8ae0abb9e0e01297f7a73da4de194c1120e9b3d4fe21e30/fsscan-0.0.4.tar.gz" } ] }