{ "info": { "author": "Anton Bukhtiyarov", "author_email": "apkraft@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Documentation", "Topic :: Utilities" ], "description": "# Replace text for Foliant\n\nReplace preprocessor reads the dictionary (yaml format) placed in foliant project folder and changes one word to another in created document.\n\n\n## Installation\n\n```shell\n$ pip install foliantcontrib.replace\n```\n\n\n## Config\n\nTo enable the preprocessor, add `replace` to `preprocessors` section in the project config:\n\n```yaml\npreprocessors:\n - replace\n```\n\nThe preprocessor has two options (default values stated):\n\n```yaml\npreprocessors:\n - replace:\n dictionary_filename: replace_dictionary.yml\n with_confirmation: false\n\n```\n\n`dictionary_filename`\n: File in foliant project folder with dictionary in it (*replace_dictionary.yml* by default).\n\n`with_confirmation`\n: if `true` you will be prompted to confirm any changes.\n\n### Dictionary format\n\nDictionary stores data in yaml format. It has two sections \u2014 with words and with regular expressions. You can pass the lambda function in `regexs` section. For example:\n\n```yaml\nwords:\n cod: CoD\n epg: EPG\n vod: VoD\nregexs:\n '!\\w*!': ''\n '\\. *(\\w)': 'lambda x: x.group(0).upper()'\n```\n\n\n## Usage\n\nJust add the preprocessor to the project config, set the dictionary and enjoy the result.\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/foliant-docs/foliantcontrib.replace", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "foliantcontrib.replace", "package_url": "https://pypi.org/project/foliantcontrib.replace/", "platform": "any", "project_url": "https://pypi.org/project/foliantcontrib.replace/", "project_urls": { "Homepage": "https://github.com/foliant-docs/foliantcontrib.replace" }, "release_url": "https://pypi.org/project/foliantcontrib.replace/1.0.3/", "requires_dist": [ "foliant (>=1.0.8)", "PyYAML" ], "requires_python": "", "summary": "Replace text by dictionary.", "version": "1.0.3" }, "last_serial": 5618318, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "c17c152912591dce8ee2853bf44dafdc", "sha256": "d5633f684e2c6e8d2cd81656d0f75b2fd77565b3e6637a1eba0acd1fed63a0a4" }, "downloads": -1, "filename": "foliantcontrib.replace-1.0.0.tar.gz", "has_sig": false, "md5_digest": "c17c152912591dce8ee2853bf44dafdc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2358, "upload_time": "2018-09-13T11:49:00", "url": "https://files.pythonhosted.org/packages/03/5a/8f082ad3dcc5598b9037c2db4e42cbff510b014ae6b201c2b2d39e09bb0c/foliantcontrib.replace-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b8669b54124fb4b11dfa723d1f196135", "sha256": "13cd4b1651d13fa71220e289e32b7d4d9ab0a19e108910243ade6ef47c6ec548" }, "downloads": -1, "filename": "foliantcontrib.replace-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b8669b54124fb4b11dfa723d1f196135", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2377, "upload_time": "2018-10-02T10:15:51", "url": "https://files.pythonhosted.org/packages/8c/22/7454cf6b04fb664cd30e049b5b18143afca52aabb1db9e4f72b2bb51369c/foliantcontrib.replace-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "b39dd658a8b9500ffc2c57b99203d88c", "sha256": "317b8560bd20166c4e2c485ee06c57b72801de8421b1ea995c7a2ab6f39982be" }, "downloads": -1, "filename": "foliantcontrib.replace-1.0.2.tar.gz", "has_sig": false, "md5_digest": "b39dd658a8b9500ffc2c57b99203d88c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2768, "upload_time": "2019-02-18T10:59:04", "url": "https://files.pythonhosted.org/packages/1d/f9/0349f22d19bfdb2a40e9fa32502deaa316cbf94e9192347340b04d886d27/foliantcontrib.replace-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "20025b89753e4e45396919dd16a9cf8e", "sha256": "72df38d8f8a8cbf170c42f60d1fb564e12ec732d84f53797f514bfeb8f16a3b9" }, "downloads": -1, "filename": "foliantcontrib.replace-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "20025b89753e4e45396919dd16a9cf8e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3829, "upload_time": "2019-08-01T11:36:05", "url": "https://files.pythonhosted.org/packages/56/66/8045b2fbd7d0a62a5169b33e923e03669a5b6b18211f6148f80f12ee67a7/foliantcontrib.replace-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8bb1d2ef80100323f8970918a8075797", "sha256": "4f0fe170c173fdc1bd2e9bd89bb3944b340267061fc9314d6fde2a29a9d7a658" }, "downloads": -1, "filename": "foliantcontrib.replace-1.0.3.tar.gz", "has_sig": false, "md5_digest": "8bb1d2ef80100323f8970918a8075797", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2766, "upload_time": "2019-08-01T11:36:07", "url": "https://files.pythonhosted.org/packages/95/62/ddc2026ad92aa1aa54cc9464f44398b4e955069fe821ac886a07d3459a73/foliantcontrib.replace-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "20025b89753e4e45396919dd16a9cf8e", "sha256": "72df38d8f8a8cbf170c42f60d1fb564e12ec732d84f53797f514bfeb8f16a3b9" }, "downloads": -1, "filename": "foliantcontrib.replace-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "20025b89753e4e45396919dd16a9cf8e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3829, "upload_time": "2019-08-01T11:36:05", "url": "https://files.pythonhosted.org/packages/56/66/8045b2fbd7d0a62a5169b33e923e03669a5b6b18211f6148f80f12ee67a7/foliantcontrib.replace-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8bb1d2ef80100323f8970918a8075797", "sha256": "4f0fe170c173fdc1bd2e9bd89bb3944b340267061fc9314d6fde2a29a9d7a658" }, "downloads": -1, "filename": "foliantcontrib.replace-1.0.3.tar.gz", "has_sig": false, "md5_digest": "8bb1d2ef80100323f8970918a8075797", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2766, "upload_time": "2019-08-01T11:36:07", "url": "https://files.pythonhosted.org/packages/95/62/ddc2026ad92aa1aa54cc9464f44398b4e955069fe821ac886a07d3459a73/foliantcontrib.replace-1.0.3.tar.gz" } ] }