{ "info": { "author": "Aviser LLP, Singapore; wolfhong", "author_email": "hongxucai1991@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "Formic: Apache Ant FileSet and Globs in Python\n==============================================\n\n.. |v| image::\n https://img.shields.io/pypi/v/formic2.svg\n :target: https://pypi.python.org/pypi/formic2\n :alt: Last stable version (PyPI)\n\n.. [doc] image::\n https://readthedocs.org/projects/formic/badge/?version=latest\n :target: https://formic.readthedocs.io/\n :alt: ReadTheDocs\n\nHistory\n-------\n\nFormic is forked from https://bitbucket.org/aviser/formic. The original project only supports python2.7 and has not been maintained for a long time.\n\nI added Python3 supports and fixed some issues.\nFormic now can work on any Python 2.6+ or Python 3.4+ system. If not, please `file an issue `_. Yet not tested on other Python version.\n\nFormic has no runtime dependencies outside the Python system libraries.\n\nInstall\n--------\n\nFormic can be installed from the Cheeseshop with easy_install::\n\n $ easy_install formic2\n\nOr pip::\n\n $ pip install formic2\n\nQuickstart\n----------\n\nOnce installed, you can use Formic either from the command line to find from the current directory::\n\n $ formic -i \"*.py\" -e \"__init__.py\" \"**/*test*/\" \"test_*\"\n\nThis will search for files all Python files under the current directory\nexcluding all `__init__.py` files, any file in directories whose name contains\nthe word 'test', and any files that start `test_`.\n\nYou can also find from the specified directory like below::\n\n $ formic /specified/directory/can/ignore/ -i \"*.py\" \"**/test/**/*.txt\" \"*.ini\"\n\nOutput from Formic is formatted like the Unix find command, and so can easily be combined with other executables, eg::\n\n $ formic -i \"**/*.bak\" | xargs rm\n\nwill delete all `.bak` files in or under the current directory (but excluding VCS directories such as `.svn` and `.hg`).\n\nFormic can also be integrated right into your Python project::\n\n import formic\n fileset = formic.FileSet(include=\"**.py\",\n exclude=[\"**/*test*/**\", \"test_*\"],\n directory=\"./\",\n symlinks=False, )\n\n for file_name in fileset:\n # Do something with file_name\n ...\n\nFormic is always case-insensitive on NT, but can be either case-sensitive or case-insensitive on POSIX.\n\nOn NT::\n\n $ formic ./test/ -i \"upp*\" \"upp*/\"\n /some/where/formic/test/lower/UPPER.txt\n /some/where/formic/test/UPPER/lower.txt\n /some/where/formic/test/UPPER/UPPER.txt\n\nOn POSIX with case-insensitive::\n\n $ formic ./test/ --insensitive -i \"upp*\" \"upp*/\"\n /some/where/formic/test/lower/UPPER.txt\n /some/where/formic/test/UPPER/lower.txt\n /some/where/formic/test/UPPER/UPPER.txt\n\nwith case-sensitive::\n\n $ formic ./test/ -i \"upp*\" \"upp*/\"\n $\n\n\nThat's about it :)\n\nFeatures\n--------\n\nFormic is a Python implementation of Apache Ant `FileSet and Globs\n`_ including the directory wildcard `**`.\n\nFileSet provides a terse way of specifying a set of files without having to enumerate individual files. It:\n\n1. **Includes** files from one or more Ant Globs, then\n2. Optionally **excludes** files matching further Ant Globs.\n\nAnt Globs are a superset of ordinary file system globs. The key differences:\n\n* They match whole paths, eg ``/root/myapp/*.py``\n* \\*\\* matches *any* directory or *directories*, eg ``/root/**/*.py`` matches\n ``/root/one/two/my.py``\n* You can match the topmost directory or directories, eg ``/root/**``, or\n* The parent directory of the file, eg ``**/parent/*.py``, or\n* Any parent directory, eg ``**/test/**/*.py``\n\nThis approach is the de-facto standard in several other languages and tools,\nincluding Apache Ant and Maven, Ruby (Dir) and Perforce (...).\n\nPython has built-in support for simple globs in `fnmatcher\n`_ and `glob\n`_, but Formic:\n\n* Can recursively scan subdirectories\n* Matches arbitrary directories *in* the path (eg ``/1/**/2/**/3/**/*.py``).\n* Has a high level interface:\n\n * Specify one or more globs to find files\n * Globs can be used to exclude files\n * Ant, and Formic, has a set of *default excludes*. These are files and\n directories that, by default, are automatically excluded from all searches.\n The majority of these are files and directories related to VCS (eg .svn\n directories). Formic adds ``__pycache__``.\n * Iterate through all matches in the sub-tree\n\n* Is more efficient with many common patterns; it runs relatively faster on large directory trees with large numbers of files.\n\nAbout\n-----\n\nFormic is originally written and maintained by `Andrew Alcock `_ of `Aviser LLP `_, Singapore.\n\nBut now, I forked it on GitHub and will maintain this project voluntarily for a long time.\n\n* `Origin Homepage `_\n* `Current Issue tracker `_\n* `Current Source `_ on GitHub\n* `PyPI `_\n* `ReadTheDocs `_\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/wolfhong/formic", "keywords": "Apache Ant,glob,recurse,FileSet,file utilities,find,fnmatcher", "license": "GPLv3+", "maintainer": "", "maintainer_email": "", "name": "formic2", "package_url": "https://pypi.org/project/formic2/", "platform": "", "project_url": "https://pypi.org/project/formic2/", "project_urls": { "Homepage": "https://github.com/wolfhong/formic" }, "release_url": "https://pypi.org/project/formic2/1.0.3/", "requires_dist": null, "requires_python": ">=2.6, <4", "summary": "An implementation of Apache Ant FileSet and Globs", "version": "1.0.3" }, "last_serial": 3904757, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "941bf63e44592440e2e3dae30d6c5fe5", "sha256": "5ee4d705934657c58315f230de4a36422bdeb70d9f9c3fe1b535a0c64ab039e4" }, "downloads": -1, "filename": "formic2-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "941bf63e44592440e2e3dae30d6c5fe5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.6, <4", "size": 31992, "upload_time": "2018-05-23T04:41:06", "url": "https://files.pythonhosted.org/packages/22/af/21fd4cbbe5c0757ab9640f15742c264e284e2644517118c53756dc019484/formic2-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aeab71763a26de1a6a834517245e5979", "sha256": "a245aedeb10f9118cdd9f64d18756d9dc3d7484a09c5c99691dbb1ae492a40fe" }, "downloads": -1, "filename": "formic2-1.0.1.tar.gz", "has_sig": false, "md5_digest": "aeab71763a26de1a6a834517245e5979", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, <4", "size": 45409, "upload_time": "2018-05-23T04:41:08", "url": "https://files.pythonhosted.org/packages/ca/f0/db68a8afb7ec81fde0f4634f2ac0a2eadc0761d249371c9b606bdeb75446/formic2-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "fe6ef155d019fa14fc56aff9c9730b4a", "sha256": "639dc1a57da47991f01b5127a55e931ae6fc7ef6c0bc6619fd56c8d0775e5936" }, "downloads": -1, "filename": "formic2-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "fe6ef155d019fa14fc56aff9c9730b4a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.6, <4", "size": 32086, "upload_time": "2018-05-24T03:39:10", "url": "https://files.pythonhosted.org/packages/eb/ba/7d96e43298bc9dfe389eb7be7dc94fdc2973f0f8cdd7115a31e0f3ebb6d1/formic2-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac5edf371d5fce20dad6c53010755ff3", "sha256": "1a1c5a8f3137370dea8eea39066f4b4d56409e7a1338de32059f49801dba4a47" }, "downloads": -1, "filename": "formic2-1.0.2.tar.gz", "has_sig": false, "md5_digest": "ac5edf371d5fce20dad6c53010755ff3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, <4", "size": 46014, "upload_time": "2018-05-24T03:39:12", "url": "https://files.pythonhosted.org/packages/e2/97/f59d6a17346bd71de2de8f7afb4f59db7c766365cbacda2e4e8a3f75ef4b/formic2-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "99602e9ad74713e799b52e7a1c53f59f", "sha256": "94abc00d86403585ad4991dd59a66cadbc9a49143e965e20319d1e44ef030a87" }, "downloads": -1, "filename": "formic2-1.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "99602e9ad74713e799b52e7a1c53f59f", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.6, <4", "size": 32721, "upload_time": "2018-05-28T06:36:04", "url": "https://files.pythonhosted.org/packages/f3/b0/aca6e113afccc52e56732ee17878beeb75dbef394b06553acf1a9b0abb47/formic2-1.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "af2885d454d9fceb4b0d1038396530e8", "sha256": "0897c188b7d182525de12bc9c0c1472b88856a9d87884f7c38717f8393366c61" }, "downloads": -1, "filename": "formic2-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "af2885d454d9fceb4b0d1038396530e8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.6, <4", "size": 32698, "upload_time": "2018-05-25T01:32:14", "url": "https://files.pythonhosted.org/packages/1c/8a/d637ab862578f5c3975f237a99ad3a6ca0130306dd46870a0e57159d3b5f/formic2-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c24db49c0f6f5a1aff8eef0363e85cb8", "sha256": "21bedd18fbd9010638b7449c7ce008b424a5f8835c224b81fbd07f666bfc6808" }, "downloads": -1, "filename": "formic2-1.0.3.tar.gz", "has_sig": false, "md5_digest": "c24db49c0f6f5a1aff8eef0363e85cb8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, <4", "size": 46622, "upload_time": "2018-05-25T01:32:16", "url": "https://files.pythonhosted.org/packages/da/64/ac788d2757dcc9a20a7662da53ec51e1cce4b4400be55716e0bd4f30ec7b/formic2-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "99602e9ad74713e799b52e7a1c53f59f", "sha256": "94abc00d86403585ad4991dd59a66cadbc9a49143e965e20319d1e44ef030a87" }, "downloads": -1, "filename": "formic2-1.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "99602e9ad74713e799b52e7a1c53f59f", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.6, <4", "size": 32721, "upload_time": "2018-05-28T06:36:04", "url": "https://files.pythonhosted.org/packages/f3/b0/aca6e113afccc52e56732ee17878beeb75dbef394b06553acf1a9b0abb47/formic2-1.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "af2885d454d9fceb4b0d1038396530e8", "sha256": "0897c188b7d182525de12bc9c0c1472b88856a9d87884f7c38717f8393366c61" }, "downloads": -1, "filename": "formic2-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "af2885d454d9fceb4b0d1038396530e8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.6, <4", "size": 32698, "upload_time": "2018-05-25T01:32:14", "url": "https://files.pythonhosted.org/packages/1c/8a/d637ab862578f5c3975f237a99ad3a6ca0130306dd46870a0e57159d3b5f/formic2-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c24db49c0f6f5a1aff8eef0363e85cb8", "sha256": "21bedd18fbd9010638b7449c7ce008b424a5f8835c224b81fbd07f666bfc6808" }, "downloads": -1, "filename": "formic2-1.0.3.tar.gz", "has_sig": false, "md5_digest": "c24db49c0f6f5a1aff8eef0363e85cb8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, <4", "size": 46622, "upload_time": "2018-05-25T01:32:16", "url": "https://files.pythonhosted.org/packages/da/64/ac788d2757dcc9a20a7662da53ec51e1cce4b4400be55716e0bd4f30ec7b/formic2-1.0.3.tar.gz" } ] }