{ "info": { "author": "Romero Galiza Jr", "author_email": "rgaliza@schubergphilis.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Text Processing" ], "description": "# ctrshif\n\nctrshif stands for _ctrl+shift+f_ (find and replace)\n\n## Usage\n\n```plaintext\nusage: ctrshif.py [-h] --section SECTION --values-file VALUES_FILE\n (--template-file TEMPLATE_FILE | --template-list TEMPLATE_LIST)\n [--prefix-delimiter PREFIX_DELIMITER]\n [--suffix-delimiter SUFFIX_DELIMITER] [--no-delimiters]\n [--dry-run]\n\noptional arguments:\n -h, --help show this help message and exit\n --section SECTION the section of your .ini values file\n --values-file VALUES_FILE\n the location of your .ini values file\n --template-file TEMPLATE_FILE\n file which will be rendered\n --template-list TEMPLATE_LIST\n file containing a list of files which will be rendered\n --prefix-delimiter PREFIX_DELIMITER\n templating prefix delimiter, default: <%=\n --suffix-delimiter SUFFIX_DELIMITER\n templating suffix delimiter, default: %>\n --no-delimiters no delimiters, only find and replace\n --dry-run outputs in the terminal instead of writing to file\n```\n\n## Examples\n\nPrint to stdout (`--dry-run`) the replacement of all occurences found in `data.xml` with values from the section `[production]` within `values.ini`, delimiters are always assumed to be `<%=` and `%>` unless otherwise specified:\n```bash\n./ctrshif.py --section=production --values=values.ini --template=data.xml --dry-run\n```\n\nReplace (write to file) all occurences found in each file (separeted by line) from `list_of_files.txt` with values from section `[production]` within `values.ini`:\n```bash\n./ctrshif.py --section=production --values=values.ini --template-list=list_of_files.txt\n```\n\nReplace (write to file) all occurences found in `users.json` with values from section `[acceptance]` within `values.ini` surrounded by the delimiters `{{` and `}}`:\n```bash\n./ctrshif.py --section=acceptance --values=values.ini --template=users.json --prefix-delimiter=\"{{\" --suffix-delimiter=\"}}\"\n```\n\nReplace (write to file) all occurences found in `script.sh` with values from section `[default]` within `bash.ini`, without delimiters (word replacement):\n```bash\n./ctrshif.py --section=default --values=bash.ini --template=script.sh --no-delimiters\n```\n\n## Values file\n\nThe values file follow .ini format, and needs at least one section defined between brackets, ex: `[section]`.\n\n```ini\n[acceptance]\nnode_hostname = acc-foobar.org\nnode_ipaddr = 192.168.0\nnode_path = /var/log/syslog\nnode_timeout = 120\n\n[development]\nnode_hostname = dev-foobar.org\nnode_ipaddr = 192.169.0\nnode_path = /var/log/syslog\nnode_timeout = 120\n```\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/romerojunior/ctrshif/archive/0.0.2.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/romerojunior/ctrshif", "keywords": "templating,configparse", "license": "Apache License Version 2.0", "maintainer": "", "maintainer_email": "", "name": "ctrshif", "package_url": "https://pypi.org/project/ctrshif/", "platform": "Any", "project_url": "https://pypi.org/project/ctrshif/", "project_urls": { "Download": "https://github.com/romerojunior/ctrshif/archive/0.0.2.tar.gz", "Homepage": "https://github.com/romerojunior/ctrshif" }, "release_url": "https://pypi.org/project/ctrshif/0.0.2/", "requires_dist": [ "colorama" ], "requires_python": "", "summary": "Find and replace command line tool", "version": "0.0.2" }, "last_serial": 4043309, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "22a0a2a906c5742230eddf60210eb8e3", "sha256": "bd444edf3e2e26523803a72b76cd745880088bc821dc3bd79b39617d87098cf8" }, "downloads": -1, "filename": "ctrshif-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "22a0a2a906c5742230eddf60210eb8e3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7434, "upload_time": "2018-05-25T14:48:02", "url": "https://files.pythonhosted.org/packages/fa/c4/0fd040d26fde889d5f81540c49487366c8b4d03a27da944c2396d30e7577/ctrshif-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "44d0c0a1ef4c8c3f72dbfa1290e81b2d", "sha256": "0a14de40ed6b567589ac334a36581d86d95d97c2a86234f5837fce1eb642f1f1" }, "downloads": -1, "filename": "ctrshif-0.0.1.tar.gz", "has_sig": false, "md5_digest": "44d0c0a1ef4c8c3f72dbfa1290e81b2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4644, "upload_time": "2018-05-25T14:48:03", "url": "https://files.pythonhosted.org/packages/86/f8/bc2f9f2c1f959a21b636777d94d08c3bc2533d6e3c2c7ac2cd6a01a40c02/ctrshif-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "1c403897cc16e3bfbdd181444c092734", "sha256": "364a42ea4ef4ac7be1b103e4c5e41b86cc2531c5f8064d84ffb7c0d8bc3ada24" }, "downloads": -1, "filename": "ctrshif-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "1c403897cc16e3bfbdd181444c092734", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9399, "upload_time": "2018-07-09T11:34:26", "url": "https://files.pythonhosted.org/packages/a3/60/84ee85b21af55535bec8877c34ec60cee6a168e7d5beefab8c0d6aeeb07d/ctrshif-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e7b34677fb7878678a3b2eaef076d52c", "sha256": "e8cc2fe6e321b93969cf8045c5eb5e86eedd00103444caed28250ab29f44978b" }, "downloads": -1, "filename": "ctrshif-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e7b34677fb7878678a3b2eaef076d52c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4738, "upload_time": "2018-07-09T11:39:35", "url": "https://files.pythonhosted.org/packages/bd/05/725cc4f9d767759d6a7b6f4e8f7c4f16bebd559e54a1581e462623b91856/ctrshif-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1c403897cc16e3bfbdd181444c092734", "sha256": "364a42ea4ef4ac7be1b103e4c5e41b86cc2531c5f8064d84ffb7c0d8bc3ada24" }, "downloads": -1, "filename": "ctrshif-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "1c403897cc16e3bfbdd181444c092734", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9399, "upload_time": "2018-07-09T11:34:26", "url": "https://files.pythonhosted.org/packages/a3/60/84ee85b21af55535bec8877c34ec60cee6a168e7d5beefab8c0d6aeeb07d/ctrshif-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e7b34677fb7878678a3b2eaef076d52c", "sha256": "e8cc2fe6e321b93969cf8045c5eb5e86eedd00103444caed28250ab29f44978b" }, "downloads": -1, "filename": "ctrshif-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e7b34677fb7878678a3b2eaef076d52c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4738, "upload_time": "2018-07-09T11:39:35", "url": "https://files.pythonhosted.org/packages/bd/05/725cc4f9d767759d6a7b6f4e8f7c4f16bebd559e54a1581e462623b91856/ctrshif-0.0.2.tar.gz" } ] }