{ "info": { "author": "Niels Boehm", "author_email": "blubberdiblub@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: End Users/Desktop", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: System :: Systems Administration", "Topic :: Text Processing :: General", "Topic :: Utilities" ], "description": "eztemplate\n==========\n\nSimple templating program to generate plain text (like config files)\nfrom name-value pairs.\n\nLets you create text files from templates in a versatile way. It's\ndesigned with easy operation from the command line or scripts,\nMakefiles, etc. in mind. You can make use of several third party\ntemplating engines like **mako** or **empy** as well as simple built-in\nones.\n\nInstallation\n------------\n\nfrom PyPI into a virtualenv (recommended)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nWith **virtualenv** you create a separate python environment without\naffecting the rest of your system, therefore this approach is\nrecommended for playing around.\n\nInstall virtualenv\n^^^^^^^^^^^^^^^^^^\n\non Debian-based distributions (such as Ubuntu)\n''''''''''''''''''''''''''''''''''''''''''''''\n\n.. code:: sh\n\n $ sudo apt-get install virtualenv\n\non Fedora\n'''''''''\n\n.. code:: sh\n\n $ sudo yum install python-virtualenv\n\nInstall eztemplate\n^^^^^^^^^^^^^^^^^^\n\n.. code:: sh\n\n $ virtualenv myvenv # create a new environment in a subdirectory\n $ . myvenv/bin/activate # switch to virtualenv (important)\n $ pip install eztemplate # install eztemplate from PyPI\n $ eztemplate --version # check if the correct version was installed\n\nUpgrade eztemplate\n^^^^^^^^^^^^^^^^^^\n\n.. code:: sh\n\n $ . myvenv/bin/activate # switch to virtualenv (if not there already)\n $ pip install --upgrade eztemplate # upgrade eztemplate from PyPI\n $ eztemplate --version # check if the corrent version was installed\n\nfrom a git repository into a virtualenv\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis is a good approach if you work on the repository and want to test\nthe changes.\n\nInstall eztemplate\n^^^^^^^^^^^^^^^^^^\n\n.. code:: sh\n\n $ git clone https://github.com/blubberdiblub/eztemplate.git\n $ cd eztemplate # change into the cloned repository\n $ virtualenv venv # create a new environment in a subdirectory\n $ . venv/bin/activate # switch to virtualenv (important)\n $ pip install . # just specify the directory to install from\n $ eztemplate --version # check if the correct version was installed\n\nUpgrade eztemplate\n^^^^^^^^^^^^^^^^^^\n\n.. code:: sh\n\n $ git pull # pull latest commits from remote repository\n $ . venv/bin/activate # switch to virtualenv (if not there already)\n $ pip install --upgrade --force-reinstall . # force upgrade eztemplate\n $ eztemplate --version # check if the correct version was installed\n\nfrom PyPI as system command\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nInstall eztemplate\n^^^^^^^^^^^^^^^^^^\n\n.. code:: sh\n\n $ pip install eztemplate # install eztemplate from PyPI\n $ eztemplate --version # check if the correct version was installed\n\nUpgrade eztemplate\n^^^^^^^^^^^^^^^^^^\n\n.. code:: sh\n\n $ pip install --upgrade eztemplate # upgrade eztemplate from PyPI\n $ eztemplate --version # check if the corrent version was installed\n\nUsage\n-----\n\nGetting quick help\n~~~~~~~~~~~~~~~~~~\n\nUse the help option:\n\n.. code:: sh\n\n $ eztemplate --help\n\nYou can also call the package explictly with Python (and thereby choose\nwhich Python installation to use):\n\n.. code:: sh\n\n $ python -m eztemplate --help\n\nRunning without arguments\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nWhen you run ``eztemplate`` without arguments, it will expect a template\non standard input, possibly waiting forever:\n\n.. code:: sh\n\n $ eztemplate\n Hello, world!\n \n Hello, world!\n $\n\nOn \\_\\_\\*ix\\_\\_ terminals you can manually cause an end of file by\npressing ``Ctrl-D``.\n\nQuick demonstration\n~~~~~~~~~~~~~~~~~~~\n\nYou can check that substitution is working by piping a template into the\nprogram and specifying a name-value pair (make sure to protect the\nstring with single quotes, otherwise the shell believes you want to\nsubstitute a shell variable, replacing it by an empty string):\n\n.. code:: sh\n\n $ echo 'Hello, $entity.' | eztemplate entity=world\n Hello, world.\n $\n\nWhen you're calling ``eztemplate`` from a script or similar - i. e.\nnon-interactively - you should specify everything as explicitly as\npossible (in particular all input files or *stdin* as well as name-value\npairs) and refrain from using positional arguments. Everything can be\nspecified using options, which avoids ambiguities:\n\n.. code:: sh\n\n $ echo 'Hello, $entity.' | eztemplate --stdin --arg entity=world\n Hello, world.\n $\n\nTemplating engines\n------------------\n\n**eztemplate** supports several templating engines. You select the one\nyou want to use with the ``-e`` or ``--engine`` option. Specifying\n``help`` instead of a name will list all currently available engines:\n\n.. code:: sh\n\n $ eztemplate -e help\n Available templating engines:\n empy - Empy templating engine.\n mako - Mako templating engine.\n string.Template - String.Template engine.\n $\n\nEngines missing the required packages, modules or libraries will not be\ndisplayed. For instance to be able to use the ``mako`` or the ``empy``\nengine, you need to have the respective python packages installed and\nworking.\n\nHowever, **eztemplate** comes with simple built-in engines which are\navailable at all times. The ``string.Template`` engine is the default\nwhen you don't explicitly specify one.\n\nstring.Template engine\n~~~~~~~~~~~~~~~~~~~~~~\n\nThis engine is named after the `string.Template\nclass `__\nin the Python standard library. It substitutes identifiers beginning\nwith a dollar sign. To resolve ambiguities, you can also enclose the\nidentifier in curly braces. It's similar to shell variable subsitution\nminus the more sophisticated features. It suffices for simple cases\nwhere you just need to insert some values into a text:\n\n.. code:: bash\n\n $ eztemplate --stdin \\\n > --arg user=\"$( getent passwd \"$USER\" | cut -d: -f5 | cut -d, -f1 )\" \\\n > --arg food=cake --arg vendor=cafeteria --arg price=\"$RANDOM\" \\\n > <<\\EOF\n > Hello, $user.\n >\n > If you're hungry, get some ${food}s from the $vendor.\n > They're only $$$price per piece.\n > EOF\n Hello, Niels Boehm.\n\n If you're hungry, get some cakes from the cafeteria.\n They're only $29993 per piece.\n $", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/blubberdiblub/eztemplate/", "keywords": "templating,text", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "eztemplate", "package_url": "https://pypi.org/project/eztemplate/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/eztemplate/", "project_urls": { "Homepage": "https://github.com/blubberdiblub/eztemplate/" }, "release_url": "https://pypi.org/project/eztemplate/0.3.0/", "requires_dist": [ "argparse", "empy; extra == 'empy'", "mako; extra == 'mako'" ], "requires_python": null, "summary": "Simple templating program to generate plain text (like config files) from name-value pairs.", "version": "0.3.0" }, "last_serial": 1981646, "releases": { "0.2.6": [ { "comment_text": "", "digests": { "md5": "4938a93c09682d9490036b2c8cfa5a5a", "sha256": "08b190de63b9296de7e2366f3603e078e740d815584c9612ef6a2aba258fee03" }, "downloads": -1, "filename": "eztemplate-0.2.6.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "4938a93c09682d9490036b2c8cfa5a5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17782, "upload_time": "2016-02-28T20:38:08", "url": "https://files.pythonhosted.org/packages/de/c0/5717c62b00ee31ec4f807e59f5802716e95238fee99ce2f14731b50628f3/eztemplate-0.2.6.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "be3afb5487a8fbde7c102e08ca6addd2", "sha256": "6c6676e21e97aa9ef190abeef23db4bcbbba69d10d0c62ff02503e4e41b062c2" }, "downloads": -1, "filename": "eztemplate-0.2.6-py2-none-any.whl", "has_sig": false, "md5_digest": "be3afb5487a8fbde7c102e08ca6addd2", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 41252, "upload_time": "2016-02-28T20:37:56", "url": "https://files.pythonhosted.org/packages/22/fa/10f8bdb143a0e25a1dc3a33e045ee963f526c42774dbddbf683b696860ff/eztemplate-0.2.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fb7c5e8c458f06fd2907443790672605", "sha256": "fa2c8967074e716e9c02c05da5899852afb9d2cb1acad697cb8733b89fd58e7a" }, "downloads": -1, "filename": "eztemplate-0.2.6-py3-none-any.whl", "has_sig": false, "md5_digest": "fb7c5e8c458f06fd2907443790672605", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 41252, "upload_time": "2016-02-28T20:40:38", "url": "https://files.pythonhosted.org/packages/58/cb/fd66ebc8177bc9f08a0623d4bc79fa9be4ae463b2d44e86d03c4826f508c/eztemplate-0.2.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "81a55fb784ed468c4046db04b7fd32d0", "sha256": "cd8aab34b79a252bb92647b92d9262ceb264ca47c8774d45cfd5b8ec2a0f171d" }, "downloads": -1, "filename": "eztemplate-0.2.6.tar.gz", "has_sig": false, "md5_digest": "81a55fb784ed468c4046db04b7fd32d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16013, "upload_time": "2016-02-28T20:38:17", "url": "https://files.pythonhosted.org/packages/ce/2b/86167c57108cb82c4a7066a87a478975833d965abd162fb33e0bcd59d117/eztemplate-0.2.6.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "2f057ece5387ffeec965e7418234f7bb", "sha256": "f9e1525883f23233fff4143c729b785584e16afb7ee569d106c6117e16d456f3" }, "downloads": -1, "filename": "eztemplate-0.3.0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "2f057ece5387ffeec965e7418234f7bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19580, "upload_time": "2016-02-29T06:59:24", "url": "https://files.pythonhosted.org/packages/3d/50/509e8c19b2d9c5f6cdefe760d6b6e97eac888355a96356ca1f31e6786b47/eztemplate-0.3.0.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "b187e6707c8b6249739ed56da84596ee", "sha256": "7437f7bd6687dfb77e2e9417867dea722ab896a7968f1095466e5724ffdc293c" }, "downloads": -1, "filename": "eztemplate-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "b187e6707c8b6249739ed56da84596ee", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 44645, "upload_time": "2016-02-29T06:58:44", "url": "https://files.pythonhosted.org/packages/04/94/f0c92b4ec9945cd5e45910cb98c420640893e3ab109a41ce1791c28fb5a5/eztemplate-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e607b2e1049b74e0e1757fd980e826a5", "sha256": "666b2f4033dc71d4ed835ed28be316b0f3ca6d9fea8b0ffd506a89efe23f87fb" }, "downloads": -1, "filename": "eztemplate-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e607b2e1049b74e0e1757fd980e826a5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 44645, "upload_time": "2016-02-29T06:59:06", "url": "https://files.pythonhosted.org/packages/9c/9b/db5e5fa5e8c3ac728b8ac568d381ff9dbd1a27f5612d228929f67a41a51e/eztemplate-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ddfa2cf632ad1d9324e14b00503fe8ff", "sha256": "b5faa08567157184c980a0864d19c0402b0aecd4c37ee7301740a6f14c16fbc6" }, "downloads": -1, "filename": "eztemplate-0.3.0.tar.gz", "has_sig": false, "md5_digest": "ddfa2cf632ad1d9324e14b00503fe8ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15445, "upload_time": "2016-02-29T06:59:34", "url": "https://files.pythonhosted.org/packages/27/5f/3a6b5c7155dc04dc19165059e053b0b5db7e43636299e4dd228244140182/eztemplate-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2f057ece5387ffeec965e7418234f7bb", "sha256": "f9e1525883f23233fff4143c729b785584e16afb7ee569d106c6117e16d456f3" }, "downloads": -1, "filename": "eztemplate-0.3.0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "2f057ece5387ffeec965e7418234f7bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19580, "upload_time": "2016-02-29T06:59:24", "url": "https://files.pythonhosted.org/packages/3d/50/509e8c19b2d9c5f6cdefe760d6b6e97eac888355a96356ca1f31e6786b47/eztemplate-0.3.0.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "b187e6707c8b6249739ed56da84596ee", "sha256": "7437f7bd6687dfb77e2e9417867dea722ab896a7968f1095466e5724ffdc293c" }, "downloads": -1, "filename": "eztemplate-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "b187e6707c8b6249739ed56da84596ee", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 44645, "upload_time": "2016-02-29T06:58:44", "url": "https://files.pythonhosted.org/packages/04/94/f0c92b4ec9945cd5e45910cb98c420640893e3ab109a41ce1791c28fb5a5/eztemplate-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e607b2e1049b74e0e1757fd980e826a5", "sha256": "666b2f4033dc71d4ed835ed28be316b0f3ca6d9fea8b0ffd506a89efe23f87fb" }, "downloads": -1, "filename": "eztemplate-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e607b2e1049b74e0e1757fd980e826a5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 44645, "upload_time": "2016-02-29T06:59:06", "url": "https://files.pythonhosted.org/packages/9c/9b/db5e5fa5e8c3ac728b8ac568d381ff9dbd1a27f5612d228929f67a41a51e/eztemplate-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ddfa2cf632ad1d9324e14b00503fe8ff", "sha256": "b5faa08567157184c980a0864d19c0402b0aecd4c37ee7301740a6f14c16fbc6" }, "downloads": -1, "filename": "eztemplate-0.3.0.tar.gz", "has_sig": false, "md5_digest": "ddfa2cf632ad1d9324e14b00503fe8ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15445, "upload_time": "2016-02-29T06:59:34", "url": "https://files.pythonhosted.org/packages/27/5f/3a6b5c7155dc04dc19165059e053b0b5db7e43636299e4dd228244140182/eztemplate-0.3.0.tar.gz" } ] }