{ "info": { "author": "Randy May", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# Overview\n\ntplate is a Jinja2 based templating tool which is designed to enable the creation of projects templates or \"starters\". \n\nTo use tplate you simply provide a context file containing values for the placeholders in the project template, the\nproject template directory itself, and the desired output directory. An example is show below:\n\n```sh\ntplate template/dir output/dir --context=context.json\n```\n\nOR\n\n```sh\ntplate github-url output/dir --context=context.json\n```\n\nIf a \"--context\" file is not provided, the user will be prompted to provide values.\n\n# Installation\n\n```sh\npip install tplate\n```\n\n# Project Templates\n\nA project template is simply a directory containing the files and directories that make up the project. Files\nthat do not end with \".j2\" are simply copied to the output directory. Files ending with the \".j2\" suffix are treated\nas Jinja2 templates and rendered into the output directory via Jinja2. For \".j2\" files, the file name in the output \ndirectory will be the template file name minus the \".j2\" suffix. For example, README.md.j2 would be copied to\nREADME.md in the output directory. See the [Jinja2 template designer documentation](http://jinja.palletsprojects.com/en/2.10.x/templates/) \nfor details on the templating language.\n\nThe template directory must contain a file named tplate.json or tplate.yaml, which contains all of the variables\nthat are referenced in the template. The purpose of this file is to document the variables that are in the\ntemplates and to provide default values. If it exists, the user provided context file will be merged with the\ndefault file provided by the project. Also, note that if a context file is not provided, tplate will generate \nthe list of variable to prompt for based on this file.\n\nIn order to avoid accidentally overwriting existing files, tplate will not do anything if there are any files in the\noutput directory. This can be overridden by passing the --update flag\n\nThere are some cases when it is desirable for the output directory structure to be determined by a variable. Most\nnotably, java package names. To accomplish this, add a file named `tplate_directives.json.j2` or\n`tplate_directives.yaml.j2` to the project template similar to the one shown below. This will look for a\ndirectory named 'src/main/java/com/example' in the output directory and rename it to 'src/main/java/new/package/name'.\n\n```json\n[\n\t['java_package_rename','com.example','{{ user_package_name | replace('.','/') }}']\n]\n```\n\nThe structure of this file is a list. Each list entry is another list with the first argument being the\nname of a directive and the remaining arguments being the arguments to the directive. Note that in the example\nabove, {{ user_package_name }} is a Jinja2 variable reference. It assumes that, at run time, a variable called\n\"user_package_name\" will be provided in the \"tplate.json\" file. This file will initially be rendered to the output\ndirectory so that the user supplied information can be incorporated. tplate will then execute the directives and\nremove the file.\n\nThe template directory argument may also be a git url. If this is the case, tplate will issue a \"git clone\" \ncommand to copy the repository into a temporary directory. For this to work, the git client must be installed \nand on the path. \n\n# Additional Notes\n\n- When copying files into the output directory, tplate will ignore (not copy) files and directories with the\n following names: \".git\", \"tplate.json\", \"tplate.yaml\", \".DS_Store\"\n\n# Release Notes\n\n## v1.2\n\n- The template can now be pulled from github by specifying a github project URL instead of an input directory.\n- Now supports renaming more than one java packages (e.g. src/main/java and src/test/java).\n\n## v1.1\n\n- The context file no longer needs to be in the output directory. It can be specified via a separate argument or\n interactively.\n- Updated documentation.\n- The support for package renaming is more elegantly integrated via the tplate_directives file \n\n## v1.0.3\n\n- added the \"--update\" flag to allow overwriting files in the output directory", "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/wrmay/tplate", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tplate", "package_url": "https://pypi.org/project/tplate/", "platform": "", "project_url": "https://pypi.org/project/tplate/", "project_urls": { "Homepage": "https://github.com/wrmay/tplate" }, "release_url": "https://pypi.org/project/tplate/1.2.1/", "requires_dist": null, "requires_python": "", "summary": "A project templating tool that based on Jina2", "version": "1.2.1", "yanked": false, "yanked_reason": null }, "last_serial": 8165089, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "bf2044745ede621d48db0a7ac77dc673", "sha256": "87c305f005e81ed2d8f38b2bd2c57db852c6b63b83dc8d3bc57c3352a587dcbf" }, "downloads": -1, "filename": "tplate-0.0.0.tar.gz", "has_sig": false, "md5_digest": "bf2044745ede621d48db0a7ac77dc673", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2262, "upload_time": "2019-05-07T23:55:50", "upload_time_iso_8601": "2019-05-07T23:55:50.042868Z", "url": "https://files.pythonhosted.org/packages/8e/1b/1a2bfba77819bb96cace628198a711744b5fee6fa9f227c88026fb37eb29/tplate-0.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0": [ { "comment_text": "", "digests": { "md5": "f6ea12b526f5c1cf8a6ce5d35b4cf431", "sha256": "fa719abb3db8e1e863ee2308f680111a9514bc047b636b50f156acb51b3b87a9" }, "downloads": -1, "filename": "tplate-1.0.tar.gz", "has_sig": false, "md5_digest": "f6ea12b526f5c1cf8a6ce5d35b4cf431", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3213, "upload_time": "2019-05-07T23:55:51", "upload_time_iso_8601": "2019-05-07T23:55:51.815875Z", "url": "https://files.pythonhosted.org/packages/9a/d3/cd908fa6914986fc03814cf4e484c9d34f8877085598fbea0fbd2ceafc3d/tplate-1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "cf311e2da1b9f5ea7b8813c8466b7771", "sha256": "5c7fdf6933f996f12f62b261220b5d2f9156ed23a11e8902120afe7598108dec" }, "downloads": -1, "filename": "tplate-1.0.1.tar.gz", "has_sig": false, "md5_digest": "cf311e2da1b9f5ea7b8813c8466b7771", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3523, "upload_time": "2019-05-08T00:01:30", "upload_time_iso_8601": "2019-05-08T00:01:30.966601Z", "url": "https://files.pythonhosted.org/packages/82/3a/f29d7cb08a1c9273e6dd35a907aa2e561115dd16214a713e2d9bc3abcbe1/tplate-1.0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "ce277bfc54f064a042142c0027d40357", "sha256": "6166607eadda7e9d62736f973af5679301a96ae296ceb41131cda43bdd1d6af2" }, "downloads": -1, "filename": "tplate-1.0.2.tar.gz", "has_sig": false, "md5_digest": "ce277bfc54f064a042142c0027d40357", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3523, "upload_time": "2019-05-10T15:29:14", "upload_time_iso_8601": "2019-05-10T15:29:14.536856Z", "url": "https://files.pythonhosted.org/packages/c6/80/404d4dfa9f48df4256408139ba9ec7acdd73eee5dd421828d0ed563c3926/tplate-1.0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "557aa6bf1964f1156903491fc2cdac90", "sha256": "42a858f4550cdbced342d32254663837ecff11c3b8d7a27804a72a49cbc16729" }, "downloads": -1, "filename": "tplate-1.0.3.tar.gz", "has_sig": false, "md5_digest": "557aa6bf1964f1156903491fc2cdac90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3733, "upload_time": "2019-06-05T21:39:11", "upload_time_iso_8601": "2019-06-05T21:39:11.613333Z", "url": "https://files.pythonhosted.org/packages/84/c2/9ede11cbf7203e924520c07899e24a3a2eb77552345be4ca50abb459cfb3/tplate-1.0.3.tar.gz", "yanked": false, "yanked_reason": null } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "ffa8f0aaa657ca2ced8653359975f13e", "sha256": "789588bdd62311c5c6ec86dae0e247578b42e1440c2d9b72928b6d0150475c72" }, "downloads": -1, "filename": "tplate-1.1.0.tar.gz", "has_sig": false, "md5_digest": "ffa8f0aaa657ca2ced8653359975f13e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4495, "upload_time": "2019-08-17T00:16:32", "upload_time_iso_8601": "2019-08-17T00:16:32.948746Z", "url": "https://files.pythonhosted.org/packages/4e/68/db8124b219a2d11ad94bb69eb17a066dcce577f0fb41c4c27b071d214c8a/tplate-1.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "4fae8bc030eeee4f529b554bc496c11e", "sha256": "0e0d6ea81be74bf3048bcd0c8fc3d5b312afb57c28f4b7c908f4481fe0a63e31" }, "downloads": -1, "filename": "tplate-1.2.0.tar.gz", "has_sig": false, "md5_digest": "4fae8bc030eeee4f529b554bc496c11e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4884, "upload_time": "2019-10-23T19:00:15", "upload_time_iso_8601": "2019-10-23T19:00:15.680877Z", "url": "https://files.pythonhosted.org/packages/66/11/fbb35b9ac569f31a0e67642e5180083eeb0adccee6e5152ce1143d1e9b16/tplate-1.2.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "05866fa134e2883f91a043f215708f6a", "sha256": "232c3b2ca75fa9191abff32fdf2d72eddcf106ea97e6ce8437dcee83e184f2b9" }, "downloads": -1, "filename": "tplate-1.2.1.tar.gz", "has_sig": false, "md5_digest": "05866fa134e2883f91a043f215708f6a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5187, "upload_time": "2020-09-11T14:19:19", "upload_time_iso_8601": "2020-09-11T14:19:19.473464Z", "url": "https://files.pythonhosted.org/packages/77/84/85e9d00e47fd04f2fd9fa34dba2eb1e79a71bef697cdc638f5954910ca91/tplate-1.2.1.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "05866fa134e2883f91a043f215708f6a", "sha256": "232c3b2ca75fa9191abff32fdf2d72eddcf106ea97e6ce8437dcee83e184f2b9" }, "downloads": -1, "filename": "tplate-1.2.1.tar.gz", "has_sig": false, "md5_digest": "05866fa134e2883f91a043f215708f6a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5187, "upload_time": "2020-09-11T14:19:19", "upload_time_iso_8601": "2020-09-11T14:19:19.473464Z", "url": "https://files.pythonhosted.org/packages/77/84/85e9d00e47fd04f2fd9fa34dba2eb1e79a71bef697cdc638f5954910ca91/tplate-1.2.1.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }