{ "info": { "author": "Will Roberts", "author_email": "wildwilhelm@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Bio-Informatics", "Topic :: Software Development :: Pre-processors", "Topic :: Text Processing :: Filters", "Topic :: Text Processing :: Indexing", "Topic :: Text Processing :: Linguistic", "Topic :: Utilities" ], "description": "================================================\n fsed - Aho-Corasick string replacement utility\n================================================\n\n.. image:: https://travis-ci.org/wroberts/fsed.svg?branch=master\n :target: https://travis-ci.org/wroberts/fsed\n :alt: Travis CI build status\n\n.. image:: https://coveralls.io/repos/wroberts/fsed/badge.svg?branch=master&service=github\n :target: https://coveralls.io/github/wroberts/fsed?branch=master\n :alt: Test code coverage\n\n.. image:: https://img.shields.io/pypi/v/fsed.svg\n :target: https://pypi.python.org/pypi/fsed/\n :alt: Latest Version\n\nCopyright (c) 2015 Will Roberts \n\nLicensed under the MIT License (see file ``LICENSE.rst`` for\ndetails).\n\nSearch and replace on file(s), with matching on fixed strings.\n\n``fsed`` is a tool specially designed for situations where you have to\ndo *many* string search-and-replace operations with fixed strings\n(that is, ``fsed`` doesn't do regular expressions). By doing all the\nsearching and replacing on all the patterns at the same time, ``fsed``\ncan be much faster than tools that do string rewriting one pattern at\na time (like one-liners in ``sed`` or ``perl``).\n\nTo do its searching, ``fsed`` uses the `Aho-Corasick algorithm`_,\nwhich is a very clever way of matching multiple patterns at the same\ntime, and was used to implement the original `fgrep`_ Unix utility\n(now accessed as ``grep -F``). This algorithm is capable of finding\nmatches which overlap each other, and in these cases, ``fsed`` must\nchoose which matches to rewrite. The policy adopted by ``fsed`` is to\nbe greedy, and always rewrite the shortest, leftmost match first.\n\nFor illustration, imagine a situation where we would like to rewrite\n``a`` with ``b``, ``aa`` with ``c``, and ``aaa`` with ``d``. What\nshould we do when we see the input string ``aaa``? Should we produce\n``bbb``, ``bc``, ``cb``, or ``d``? ``fsed`` produces ``bbb`` in this\ncase.\n\n.. _`Aho-Corasick algorithm`: https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm\n.. _fgrep: https://en.wikipedia.org/wiki/Grep#Variations\n\nInstall\n=======\n\n``fsed`` is written in Python_; you can install it with pip_::\n\n pip install fsed\n\n.. _Python: http://www.python.org/\n.. _pip: https://en.wikipedia.org/wiki/Pip_(package_manager)\n\nUsage\n=====\n\n::\n\n fsed [OPTIONS] PATTERN_FILE [INPUT_FILE [INPUT_FILE2 ...]]\n\nIf one or more ``INPUT_FILEs`` are specified, ``fsed`` reads and\nconcatenates these as its input; otherwise, ``fsed`` reads the\nstandard input.\n\nOptions:\n\n``--pattern-format=FMT``\n Set FMT to ``tsv`` or ``sed`` (default is ``sed``) to specify the\n format of ``PATTERN_FILE``.\n\n``-o/--output=OUTFILE``\n Specifies that the program output should be written to ``OUTFILE``.\n If this option is not used, ``fsed`` writes to standard output.\n\n``-w/--words``\n Makes ``fsed`` match only on word boundaries; this flag instructs\n ``fsed`` to append ``\\b`` to the beginning and end of every\n pattern in ``PATTERN_FILE``.\n\n``--by-line/--across-lines``\n Sets whether ``fsed`` should process the input line by line\n or character by character; the default is ``--across-lines``.\n\n``--slow``\n Indicates that ``fsed`` should try very hard to always find the\n longest matches on the input; this is very slow, and forces\n ``--by-line`` to be on.\n\n``-q``\n Quiet operation, do not emit warnings.\n\n``-v/--verbose``\n Turns on debugging output.\n\nNote: ``fsed`` runs even faster using PyPy_::\n\n pypy -m fsed.fsed [OPTIONS] PATTERN_FILE [INPUT_FILE [INPUT_FILE2 ...]]\n\n.. _PyPy: http://pypy.org/\n\nPattern File\n============\n\n``PATTERN_FILE`` contains a list of patterns to search and replace in\nthe input; each pattern is listed on a separate line. ``fsed``\nsupports two formats for specifying patterns. The default, ``sed``,\nspecifies strings and their replacements the way the ``sed`` utility\ndoes::\n\n s/SEARCH/REPLACE/\n\nThe character following the ``s`` character is the pattern delimiter,\nand can be any character (it does not have to be a forward slash).\n\nThe other format, ``tsv``, specifies patterns using ````\ncharacters as delimiters::\n\n SEARCHREPLACE\n\nIn this format, there must be only one ```` character per line.\n\nPatterns can contain escape characters:\n\n``\\\\``\n Backslash (\\\\)\n\n``\\a``\n ASCII bell (BEL)\n\n``\\b``\n Word boundary\n\n``\\f``\n ASCII formfeed (FF)\n\n``\\n``\n ASCII linefeed (LF)\n\n``\\r``\n Carriage Return (CR)\n\n``\\t``\n Horizontal Tab (TAB)\n\n``\\v``\n ASCII vertical tab (VT)\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/wroberts/fsed", "keywords": "string search replace rewrite", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "fsed", "package_url": "https://pypi.org/project/fsed/", "platform": "", "project_url": "https://pypi.org/project/fsed/", "project_urls": { "Homepage": "https://github.com/wroberts/fsed" }, "release_url": "https://pypi.org/project/fsed/0.5.4/", "requires_dist": [ "click" ], "requires_python": "", "summary": "Aho-Corasick string replacement utility", "version": "0.5.4" }, "last_serial": 5271940, "releases": { "0.5.0": [ { "comment_text": "", "digests": { "md5": "4b671dec34c5e624676744b23c19759e", "sha256": "1b70c3be0dd062c40dc5c1cc6703b9e8e0e6e883cef82976962e0eddd28380e9" }, "downloads": -1, "filename": "fsed-0.5.0-py2-none-any.whl", "has_sig": false, "md5_digest": "4b671dec34c5e624676744b23c19759e", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 18083, "upload_time": "2015-12-14T22:55:50", "url": "https://files.pythonhosted.org/packages/85/ce/307d09927068272d3a8878d26fdccef5b45eca3425b3087e88fde178c9d2/fsed-0.5.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "008a081aa42629b80db755a1e759517e", "sha256": "86c290a1cca7984b442c9a871dd4da607f89743477c7ef44d8799e5b9cfc21a7" }, "downloads": -1, "filename": "fsed-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "008a081aa42629b80db755a1e759517e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18078, "upload_time": "2015-12-14T22:55:57", "url": "https://files.pythonhosted.org/packages/61/6a/2ac2e3441f8733cfd973bb4a4baab1b4dce394d48f99bbe2edc67a56cea3/fsed-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2b14236321df75b9794190bcc7544571", "sha256": "0a5ce7fa4c8d6c863fe9a8af97c0e6406f12fa80f72a54fddec4a52bc71e2665" }, "downloads": -1, "filename": "fsed-0.5.0.tar.gz", "has_sig": false, "md5_digest": "2b14236321df75b9794190bcc7544571", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 558943, "upload_time": "2015-12-14T22:56:08", "url": "https://files.pythonhosted.org/packages/df/5f/fc71b06906f37486889738b5fbed26ab1872bdbe3f63306d5db3f96d1fa1/fsed-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "198fc12f3c4efb5aff16b4f881b99831", "sha256": "65e08c03a1cf45b6f4ccddd71aa76f1c1ac3248762d76102e37fc5b85df8b7f9" }, "downloads": -1, "filename": "fsed-0.5.1-py2-none-any.whl", "has_sig": false, "md5_digest": "198fc12f3c4efb5aff16b4f881b99831", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 19201, "upload_time": "2015-12-18T13:07:03", "url": "https://files.pythonhosted.org/packages/6a/45/bd9abba24f0db125bd4b365057254af3a8d482a042f486b4d3020db4435d/fsed-0.5.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f5f57cb12c21dd9b5ee668b38de08c38", "sha256": "6ef846762e98d073228350114fe7bed243bbc16fd836d31864b1fee6305331d2" }, "downloads": -1, "filename": "fsed-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f5f57cb12c21dd9b5ee668b38de08c38", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19199, "upload_time": "2015-12-18T13:07:19", "url": "https://files.pythonhosted.org/packages/29/4a/8ad263e46f9e1b482b1e525dcb589633a50eabbd4bdc81afe1d52f199e7e/fsed-0.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d012b670d8e38f62c0eac49633030a7", "sha256": "8276a46cabfb15632438f101101b466dbb9afcdcef440bef402480542a4c9724" }, "downloads": -1, "filename": "fsed-0.5.1.tar.gz", "has_sig": false, "md5_digest": "3d012b670d8e38f62c0eac49633030a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 503067, "upload_time": "2015-12-18T13:07:47", "url": "https://files.pythonhosted.org/packages/fc/b0/e3d7558cacb4a3716e0ce6992f9d6788300e4a0d2cc0cab0057065ff6deb/fsed-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "4d3882c5f997df76047bfaebbc241593", "sha256": "55c524d59d51da5a16a25601187c34a6731287d269a1d53a21b1144f064b46bd" }, "downloads": -1, "filename": "fsed-0.5.2-py2-none-any.whl", "has_sig": false, "md5_digest": "4d3882c5f997df76047bfaebbc241593", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 19207, "upload_time": "2015-12-19T17:11:56", "url": "https://files.pythonhosted.org/packages/10/33/afc86cf42c010433d77b7357e0aa5cc522ab8704cc4dff88ac91f46701ac/fsed-0.5.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "741d3886e89ec517d0d87df58d4b5881", "sha256": "08c30e9249a2f43afc41592148b17488019053d8bba4539541b180ece405e363" }, "downloads": -1, "filename": "fsed-0.5.2-py3-none-any.whl", "has_sig": false, "md5_digest": "741d3886e89ec517d0d87df58d4b5881", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19197, "upload_time": "2015-12-19T17:12:15", "url": "https://files.pythonhosted.org/packages/27/0a/c1239467229644ed305f204b78523a4469e2da2d94c5b4694126f059e187/fsed-0.5.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4418ec4f7a22dbb610ffd3bbe5d8bb8a", "sha256": "0a2a23fa2b0c17830ed17d662f897f355304e8dc37e4d969c32b4b5cb12b8773" }, "downloads": -1, "filename": "fsed-0.5.2.tar.gz", "has_sig": false, "md5_digest": "4418ec4f7a22dbb610ffd3bbe5d8bb8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 503064, "upload_time": "2015-12-19T17:12:26", "url": "https://files.pythonhosted.org/packages/f8/64/250abecf6a7c1f936af17f2374a4fefa8783fca3ebf521fd42f6653b4ffa/fsed-0.5.2.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "9a2594d1f1b63c1c0f8df39d060543ff", "sha256": "552ba42897523f3db5d2ccad4970eaef52bbc6a56bb902fd78cf70bea3842af6" }, "downloads": -1, "filename": "fsed-0.5.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9a2594d1f1b63c1c0f8df39d060543ff", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19258, "upload_time": "2017-05-31T12:47:37", "url": "https://files.pythonhosted.org/packages/a0/96/0c856326c3f80d15fe8b31fb667048514bce79651d3768c7b2d6e664970a/fsed-0.5.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f700fbf09a2a44b8bfa209d1a87a2b7e", "sha256": "3e4fd4d5d915b9d7892c038f488a6efe0341ed489c935cec55a314a80f138278" }, "downloads": -1, "filename": "fsed-0.5.3.tar.gz", "has_sig": false, "md5_digest": "f700fbf09a2a44b8bfa209d1a87a2b7e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 503155, "upload_time": "2017-05-31T12:47:40", "url": "https://files.pythonhosted.org/packages/1b/bd/cea63a3c864b6190df4ae8b3735e5e4ec8595fe7453351fdc6e9f20ddca4/fsed-0.5.3.tar.gz" } ], "0.5.4": [ { "comment_text": "", "digests": { "md5": "6202be944ea466b7b6a8349a19b6feb7", "sha256": "0f703b6bfab0991903c94886fd6143979963c28594e3fb96add1ef9afd69231b" }, "downloads": -1, "filename": "fsed-0.5.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6202be944ea466b7b6a8349a19b6feb7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19259, "upload_time": "2019-05-15T11:30:15", "url": "https://files.pythonhosted.org/packages/fd/3f/5237395ff72c641b3739bb24ccf7b7a5059f5df6c235d8b56569edaf962e/fsed-0.5.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da339aa7c852d35f71276b7ca800f3fc", "sha256": "2eb1b0788aa366f77624b8e4a190724391698afb6160e313e7779ffbb04c3e53" }, "downloads": -1, "filename": "fsed-0.5.4.tar.gz", "has_sig": false, "md5_digest": "da339aa7c852d35f71276b7ca800f3fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 558704, "upload_time": "2019-05-15T11:30:17", "url": "https://files.pythonhosted.org/packages/fa/83/86e7f332d01dca2c72e1717a4457fe8fe107cedcf95d3ea9be761012bc81/fsed-0.5.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6202be944ea466b7b6a8349a19b6feb7", "sha256": "0f703b6bfab0991903c94886fd6143979963c28594e3fb96add1ef9afd69231b" }, "downloads": -1, "filename": "fsed-0.5.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6202be944ea466b7b6a8349a19b6feb7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19259, "upload_time": "2019-05-15T11:30:15", "url": "https://files.pythonhosted.org/packages/fd/3f/5237395ff72c641b3739bb24ccf7b7a5059f5df6c235d8b56569edaf962e/fsed-0.5.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da339aa7c852d35f71276b7ca800f3fc", "sha256": "2eb1b0788aa366f77624b8e4a190724391698afb6160e313e7779ffbb04c3e53" }, "downloads": -1, "filename": "fsed-0.5.4.tar.gz", "has_sig": false, "md5_digest": "da339aa7c852d35f71276b7ca800f3fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 558704, "upload_time": "2019-05-15T11:30:17", "url": "https://files.pythonhosted.org/packages/fa/83/86e7f332d01dca2c72e1717a4457fe8fe107cedcf95d3ea9be761012bc81/fsed-0.5.4.tar.gz" } ] }