{ "info": { "author": "Marcin Sztolcman", "author_email": "marcin@urzenia.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development", "Topic :: System", "Topic :: Utilities" ], "description": "ff\n==\n\nEasily search and process files.\n\nIf you need to search files by their contents, *or* search for their\ncontents, please look at `ack `__ or\n`pss `__. These are better suited for\nthis kind of task.\n\nCurrent stable version\n----------------------\n\n1.0.5\n\nWhy ``ff`` and not ``find``?\n----------------------------\n\nJust because I find that most of my searches was:\n\n::\n\n find . -iname '*name*'\n\nAnd it's easier to me to enter:\n\n::\n\n ff name\n\nAlso, my ``find`` have sometimes problems with non ascii names:\n\n::\n\n % find /tmp -name '*G\u00d6S*'\n % \n\nAnd with ``ff``:\n\n::\n\n % ff '*G\u00d6S*' /tmp\n /tmp/eee_G\u00d6S_fr\u00e5n_f\u00f6rst\u00e5r_pas\n /tmp/eee_G\u00d6S_fr\u00e5n_pas_f\u00f6rst\u00e5r_qq\n /tmp/pas_G\u00d6S_fr\u00e5n_f\u00f6rst\u00e5r\n %\n\nit just works! :)\n\nBasic usage\n-----------\n\n::\n\n ff passwd\n\nSearch for all files and directories in current directory and below,\nwhich is match to pattern: ``*passwd*``.\n\n::\n\n ff -B passwd\n\nSearch for all files and directories in current directory and below,\nwhich is match to pattern: ``*passwd``.\n\n::\n\n ff -E passwd\n\nSearch for all files and directories in current directory and below,\nwhich is match to pattern: ``passwd*``.\n\n::\n\n ff -EB passwd\n\nAdvanced usage\n--------------\n\n::\n\n ff -p pa -s /tmp --shell-exec -x '[ -f \"{path}\" ] && mkdir -p /tmp{dirname}; cp -r \"{path}\" \"/tmp{path}\"'\n\nFind all files and directories in /tmp that match expression: ``*pa*``,\nand copy them (with original directories hierarchy!) to /tmp.\n\nSo powerful!\n\nMagic pattern\n-------------\n\nIt's form of pattern known good for Perl or AWK lovers :)\n\nIf patterns is in general form:\n\n::\n\n mode/pattern/modifier\n\n(decribed more in full usage below), then it is parsed and used in a\nlittle other manner.\n\nInstead of arguments ``--regexp`` or ``--fuzzy``, you can pass it in\n``mode`` part of pattern. Next there is delimiter, which usually is\n``/`` (backslash), but there can be more characters, described in Usage\nsection.\n\nAfter that is a pattern, next delimiter again, and then modifiers\n(again, modifiers are described in Usage section).\n\nSome examples:\n\nSearch for all files and directories in current directory and below,\nwhich is match to pattern: ``passwd``.\n\n::\n\n ff f/pwd/\n\nSearch for all files and directories in current directory and below,\nwhich name contains letters 'p', 'w', 'd', with any other characters\nbetween them.\n\n::\n\n ff g/^(chk)?passwd/\n\nSearch for all files and directories in current directory and below,\nwhich name starts from 'chkpasswd' or 'passwd'.\n\nConfiguration file\n------------------\n\n``ff`` recognizes 2 configuration files: user-wide and project-wide.\nBoth can specify the same things and have identical syntax (ini files).\nUser-wide one is located in ``$HOME/.ff.rc``, and project-wide is\nlocated in current directory (ie. projects root). Example file is\nlocated at (github)[https://github.com/mysz/ff/blob/master/ff.rc].\n\nPlugins\n-------\n\nPlugins are the way to easily extend capabilities of ``ff``. Currently\nthere is only support for plugins allowing to extend tests made on files\nlist. In future, there is plan to add support for plugins allowing to\nmake some actions on found files (currently is *built-in plugin*:\n``--shell``), for example modifying, copying or anything else).\n\n``ff`` search for plugins in user's home directory, but there is\nposibility to tell him about the other.. By default, ``ff`` search for\nplugins in:\n\n- ``~/.ff/plugins``\n\nAnd using switch ``--plugins-path`` you can tell ``ff`` about other\nplugins location.\n\nYou can also pass argument to plugins. For example, in ``size`` plugin\n(bundled with ``ff``), You must to tell the plugin what size of file You\nexpect:\n\n::\n\n `ff pas --test size:=5k`\n\nAbove example will find every file with *pas* part in its name, and its\nsize is *exactly* 5\n`kibibytes `__.\nMore about ``size`` plugin in `projects\nwiki `__.\n\nWriting plugins\n---------------\n\nPlugins are written in `Python `__, and are simple\nPython modules with at least ``plugin_action`` callable specified.\nPlugins are imported, and ``plugin_action`` must return ``True`` or\n``False`` to tell ``ff`` that given found object meets expectations, and\nshould be returned.\n\n``ff`` recognize and use only 3 objects in plugin:\n\n- ``plugin_action`` - (REQUIRED) [callable] must return ``True`` od\n ``False``. Must recognize 3 arguments:\n\n - ``name`` - name of plugin\n - ``argument`` - argument passed by user\n - ``path`` - absolute path to tested object\n\n- ``PLUGIN_DESCR`` - (OPTIONAL) [string or callable] short descr of\n plugin, printed when ``ff`` is called with switch\n ``--help-test-plugins``\n- ``PLUGIN_HELP`` - (OPTIONAL) [string or callable] full help for\n plugin, printed when ``ff`` is called with switch\n ``--help-test-plugins TEST_NAME``\n\nPlugin file also must have special name, and be placed in directory\nrecognized by ``ff`` (see: [plugins][plugins]). Name of file is built\nwith three parts, connected with underscore: \\* ``ffplugin`` - fixed\nprefix \\* ``test`` - type of plugin (currently only ``test`` plugins are\nrecignized) \\* ``NAME`` - name of plugin\n\nAnd as Python module, must and with ``.py`` extension :)\n\nPlugin must validate input data (``argument``), and raise\n``FFPluginError`` exception with approbiate message on any error. Plugin\nshouldn't raise any other exceptions. There is one caveat with this:\n``FFPluginError`` exception is declared *inside* ``ff``! When given\nplugin is imported, it is *monkeypatched* and ``FFPluginError``\nexception is injected into it.\n\nThere is an example plugin, which allow us to search for files in\nspecified size. Is in `project\nrepository `__ in\ndirectory plugins. You can use it as a base for your own plugins :)\n\nInstallation\n------------\n\n``ff`` should work on any platform where `Python `__\nis available, it means Linux, Windows, MacOS X etc. There is no\ndependencies, plain Python power :)\n\nTo install, you can use ``pip``:\n\n::\n\n pip install ff\n\nVoila!\n\nUsage\n-----\n\n::\n\n usage: ff [-h] [--print0] [--ignorecase] [--source source] [--pattern PATTERN]\n [--regexp] [--fuzzy] [--depth DEPTH] [--path-search]\n [--regex-multiline] [--regex-dotall] [--begin] [--end]\n [--invert-match] [--mode MODE] [--exec COMMAND] [--prefix]\n [--prefix-dirs PREFIX_DIRS] [--prefix-files PREFIX_FILES]\n [--no-display] [--no-colorize] [--verbose-exec] [--interactive-exec]\n [--shell-exec] [--vcs] [--exclude-path EXCLUDED_PATH] [--test TESTS]\n [--plugins-path PLUGINS_PATH] [--version]\n [--help-test-plugins [TEST_NAME[,TEST2_NAME]]]\n [--show-plugins-paths]\n [pattern] [source [source ...]]\n\n Easily search and process files.\n\n positional arguments:\n pattern pattern to search\n source optional source (if missing, use current directory)\n\n optional arguments:\n -h, --help show this help message and exit\n --print0, -0 split results by binary zero instead of new line\n (useful to work with xargs)\n --ignorecase, -i, --ignore-case\n ignore case when match pattern to paths\n --source source, -s source\n optional, see: source above\n --pattern PATTERN, -p PATTERN\n optional, see: pattern above\n --regexp, -g treat pattern as regular expression (uses Python\n regexp engine)\n --fuzzy, -f pattern defines only set and order of characters used\n in filename\n --depth DEPTH, -D DEPTH\n how deep we should search (default: -1, means\n infinite)\n --path-search, -q search in full path, instead of bare name of item\n --regex-multiline, -l\n modify meta characters: \"^\" and \"$\" behaviour when\n pattern is regular expression. See:\n http://docs.python.org/2/library/re.html#re.MULTILINE\n --regex-dotall, -d modify meta character: \".\" behaviour when pattern is\n regular expression. See:\n http://docs.python.org/2/library/re.html#re.DOTALL\n --begin, -B match pattern to begin of item name (ignored in regexp\n mode)\n --end, -E match pattern to end of item name (ignored in regexp\n mode)\n --invert-match, -v, -r\n find objects that do *not* match pattern\n --mode MODE, -m MODE allow to choose to search for \"files\" only, \"dirs\", or\n \"all\"\n --exec COMMAND, -x COMMAND\n execute some command on every found item. In command,\n placeholders: {path}, {dirname}, {basename} are\n replaced with correct value\n --prefix add prefix \"dr: \" (directory) or \"fl: \" (file) to\n every found item\n --prefix-dirs PREFIX_DIRS\n prefix for matched directories\n --prefix-files PREFIX_FILES\n prefix for matched files\n --no-display don't display element (useful with --exec argument)\n --no-colorize Colorize output\n --verbose-exec show command before execute it\n --interactive-exec ask before execute command on every item\n --shell-exec execute command from --exec argument in shell (with\n shell expansion etc)\n --vcs do not skip VCS directories (.git, .svn etc)\n --exclude-path EXCLUDED_PATH, -c EXCLUDED_PATH\n skip given paths from scanning\n --test TESTS, -t TESTS\n additional tests, available by plugins (see\n annotations below or --help-test-plugins)\n --plugins-path PLUGINS_PATH\n additional path where to search plugins (see\n annotations below)\n --version show program's version number and exit\n --help-test-plugins [TEST_NAME[,TEST2_NAME]]\n display help for installed test plugins\n --show-plugins-paths Show recognized plugins paths and exit\n\n Pattern, provided as positional argument (not with --pattern) can be provided\n in special form (called: magic pattern). It allows to more \"nerdish\"\n (or \"perlish\" :) ) way to control `ff` behavior.\n\n The general pattern for magic pattern is:\n\n mode/pattern/modifier\n\n where:\n mode - is one of 'p' (--pattern), 'g' - (--regexp) or 'f' (--fuzzy)\n / - is delimiter:\n * one of: '/', '!', '@', '#', '%', '|', and then start and end\n delimiter must be the same\n * one of: '{', '[', '(', '<', and the end delimiter must be the\n closing one (ex. '}' if start is '{')\n pattern - any pattern, processed in a way specified with 'mode'\n modifier - one of: 'i' (--ignore-case), 'm' (--regex-multiline),\n 's' (--regex-dotall), 'v' (not used currently), 'r' (--invert-match)\n\n There is also ability to extend capabilities of `ff` by plugins. Plugins are\n run with switch --test and then plugin name with optional plugin argument:\n\n --test plugin_name:plugin_arg\n\n There can be used more then one plugin at once.\n\n Authors:\n Marcin Sztolcman // http://urzenia.net\n\n HomePage:\n http://mysz.github.io/ff/\n\nAuthors\n-------\n\nMarcin Sztolcman marcin@urzenia.net\n\nContact\n-------\n\nIf you like or dislike this software, please do not hesitate to tell me\nabout this me via email (marcin@urzenia.net).\n\nIf you find bug or have an idea to enhance this tool, please use\nGitHub's `issues `__.\n\nLicense\n-------\n\nThe MIT License (MIT)\n\nCopyright (c) 2013 Marcin Sztolcman\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nChangeLog\n---------\n\nv1.0.5\n~~~~~~\n\n- use README.rst for Pypi\n\nv1.0.4\n~~~~~~\n\n- fixes for Pypi\n\nv1.0.3\n~~~~~~\n\n- fixes for Pypi\n\nv1.0.2\n~~~~~~\n\n- fixes for Pypi\n\nv1.0.1\n~~~~~~\n\n- fixes for Pypi\n\nv1.0.0\n~~~~~~\n\n- backward incompatible: magic pattern doesn't recognize 'q' flag for\n 'path-search' mode, flag --path-search must be passed explicitly\n- new option: --depth - limit searching to this depth\n- new option: --colorize\n- new: parse and recognize configuration files\n- new: added ability to install via pip\n- changed versioning format: use `SemVer `__\n- code cleanups and many refactorizations/rewrites\n- paths are now normalized before comparisons of excluded paths\n- parse regexps with UNICODE flag\n- '?' and '+' are now valid delimiters in magic pattern\n- ignore case of --mode option\n- documentation improvements\n- more tests\n- improved fuzzy search\n- better validation of arguments\n- improved error messages\n- improved help\n- better interoperability: do not hardcode new line characters or path\n delimiters\n- do not allow for duplicating modifiers\n- FIX: do not crash on unknown characters, just replace them\n- FIX: do not crash on printing unknown characters\n- added simple Makefile\n- improved config for pylint\n- added config for `versionner `__\n\nv0.5\n~~~~\n\n- ability to run plugins for tests (with first plugin: size)\n- many improvements to proper handling UTF-8\n- many improvements for work in Python3\n- improved PEP8 compatibility\n- refactored code\n- added --version switch\n- removed expanding shell variables when execute external command if no\n --shell-exec is given\n\nv.0.4\n~~~~~\n\n- added changelog\n- added fuzzy-search mode\n- added 'magic pattern' mode\n- -r argument is now an alias to -v\n- better handling unicode characters in paths\n- handling CTRL-C\n- added modifier: --path-search\n\nv0.3\n~~~~\n\n- use argparse instead of getopt to parse options\n- allow to exclude path from search\n- improved help and documentation\n\nv0.2\n~~~~\n\n- added option 'shell-exec' - allow to exec programs with shell\n expansion\n- exec: add shell variables expansion\n- by default, skip VCS directories\n- added option 'print0' - delimit entries with binary 0, as for xargs\n- added options 'interactive-exec' - ask before every exec\n- much more powerfull exec engine\n- added option 'no-display' - do not display results (useful with\n --exec)\n- added option 'verbose-exec' - show executed command\n- added option 'invert-match' - like in grep\n- improved help and documentation\n- cleanups in code\n\nv0.1\n~~~~\n\n- initial version", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://mysz.github.io/ff/", "keywords": "search,find,filesystem,files,directories", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "ff-find", "package_url": "https://pypi.org/project/ff-find/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ff-find/", "project_urls": { "Homepage": "http://mysz.github.io/ff/" }, "release_url": "https://pypi.org/project/ff-find/1.0.5/", "requires_dist": [ "argparse", "tmcolors (==0.1.1)" ], "requires_python": null, "summary": "Easily search and process files by names.", "version": "1.0.5" }, "last_serial": 1577480, "releases": { "0.5.1": [], "1.0.2": [ { "comment_text": "", "digests": { "md5": "5e1664b98fe929bb9d90fa8731aa50b0", "sha256": "2e9c37769251fa00f837f594085db97081b11a5408cdce388131a228baa73d32" }, "downloads": -1, "filename": "ff_find-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5e1664b98fe929bb9d90fa8731aa50b0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 32013, "upload_time": "2015-06-03T22:20:57", "url": "https://files.pythonhosted.org/packages/30/10/243d7e00f372648e2c8930bb631a01c966f4858856d83a35a13617a149ae/ff_find-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2f340ea2857f97b93d535bbd7fccecd4", "sha256": "300b20a35d3c1102f510dfa1bfe2402bbff9c2b2dfd5a876672a78863843fe97" }, "downloads": -1, "filename": "ff-find-1.0.2.tar.gz", "has_sig": false, "md5_digest": "2f340ea2857f97b93d535bbd7fccecd4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37066, "upload_time": "2015-06-03T22:21:01", "url": "https://files.pythonhosted.org/packages/b8/93/7e3cc2940fef99795b377591a6f662ee58eca72e493fcf4a65439379a007/ff-find-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "a2cfe1a73fe2304f8732a2b4f5c90cac", "sha256": "3232f4254e7ec06fcdbc98b9d914371448d1c55fb2171983344c091eaff93336" }, "downloads": -1, "filename": "ff_find-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a2cfe1a73fe2304f8732a2b4f5c90cac", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 31542, "upload_time": "2015-06-03T22:25:39", "url": "https://files.pythonhosted.org/packages/f3/82/8a7836b5880453a5171997401c633af328956c00988cdbc6ea9313be327f/ff_find-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "920ebfd82fa7008a9aaa0d580a52de86", "sha256": "7b06d54eed535fd459fc5804a572720f3c681edc177b78da8a118f30f6f9c15b" }, "downloads": -1, "filename": "ff-find-1.0.3.tar.gz", "has_sig": false, "md5_digest": "920ebfd82fa7008a9aaa0d580a52de86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31560, "upload_time": "2015-06-03T22:25:43", "url": "https://files.pythonhosted.org/packages/28/e4/fdac2e45d9c3a2536ac6f353ccafd9aa3f3c79cff091f96de0d14cdcfd52/ff-find-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "03c151e8a8588fc0f6257fc22d96bb57", "sha256": "0d5f080b7c1e3d0c39057f5beecacc2243cee02c7a0ab42ce38ec3f5e5cf02ae" }, "downloads": -1, "filename": "ff_find-1.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "03c151e8a8588fc0f6257fc22d96bb57", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 30422, "upload_time": "2015-06-03T22:28:32", "url": "https://files.pythonhosted.org/packages/6d/bb/875cf5c5d7e1f88a218d0887d3464d6e0d48f2c9b07aa400f38750c545c0/ff_find-1.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "916e33d614c743ee5b3f9d8e9239f207", "sha256": "f31a3a1e7ef35913d1577bc89d13f7562c238d6ed8ebd3d8d56faacb5476ad6b" }, "downloads": -1, "filename": "ff-find-1.0.4.tar.gz", "has_sig": false, "md5_digest": "916e33d614c743ee5b3f9d8e9239f207", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31517, "upload_time": "2015-06-03T22:28:35", "url": "https://files.pythonhosted.org/packages/1a/2f/e75fa2eb6f8e4be9a443a10144a8b8ecd31fed31e3763bcb2cf47db1355a/ff-find-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "35ddcd900378c66822e4575d683bd652", "sha256": "f0ef12b52c07270699e7de96253f944eb26316cace123d3255f3a26accc8eec7" }, "downloads": -1, "filename": "ff_find-1.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "35ddcd900378c66822e4575d683bd652", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 30680, "upload_time": "2015-06-03T22:31:39", "url": "https://files.pythonhosted.org/packages/f9/e6/3fcb4e900fb8be7cfe56d5fd38e0f35822029897b426b18aaf5acecc731b/ff_find-1.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "67c40a96595c089df3bf661e07e0a6ab", "sha256": "cdf21c19e03f57c4fa01ccbd47ce55794eae9fd76d1eb7ff9d24126f6ea0426e" }, "downloads": -1, "filename": "ff-find-1.0.5.tar.gz", "has_sig": false, "md5_digest": "67c40a96595c089df3bf661e07e0a6ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31253, "upload_time": "2015-06-03T22:31:43", "url": "https://files.pythonhosted.org/packages/6d/d2/0d7b4f4c407ccd2f2070d3fb150082e56cb0a4240513e5e9cd485beb91f7/ff-find-1.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "35ddcd900378c66822e4575d683bd652", "sha256": "f0ef12b52c07270699e7de96253f944eb26316cace123d3255f3a26accc8eec7" }, "downloads": -1, "filename": "ff_find-1.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "35ddcd900378c66822e4575d683bd652", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 30680, "upload_time": "2015-06-03T22:31:39", "url": "https://files.pythonhosted.org/packages/f9/e6/3fcb4e900fb8be7cfe56d5fd38e0f35822029897b426b18aaf5acecc731b/ff_find-1.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "67c40a96595c089df3bf661e07e0a6ab", "sha256": "cdf21c19e03f57c4fa01ccbd47ce55794eae9fd76d1eb7ff9d24126f6ea0426e" }, "downloads": -1, "filename": "ff-find-1.0.5.tar.gz", "has_sig": false, "md5_digest": "67c40a96595c089df3bf661e07e0a6ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31253, "upload_time": "2015-06-03T22:31:43", "url": "https://files.pythonhosted.org/packages/6d/d2/0d7b4f4c407ccd2f2070d3fb150082e56cb0a4240513e5e9cd485beb91f7/ff-find-1.0.5.tar.gz" } ] }