{ "info": { "author": "Sebastian Bogan", "author_email": "sebogh@qibli.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3.5", "Topic :: Text Processing :: Markup" ], "description": "panache\n=======\n\n`build-status `__\n`codefactor `__\n`Pypi `__ `Known\nVulnerabilities `__\n\nOverview\n--------\n\npanache adds styles to `Pandoc `__.\n\nThe idea of panache is similar to that of\n`panzer `__ and\n`Pandocomatic `__.\nIt is yet another Pandoc wrapper, that allows to assemble\nPandoc-commandline options, -metadata and -filter into styles. Through\nthat, panache simplifies Pandoc calls and ensures consistency across\ndocuments.\n\npanache is similar to others in that cascading styles may be defined in\nseparate YAML-files and within documents.\n\npanache is different in that its styles may contain variables and that\ndocuments may specify multiple styles / context-dependable styles.\n\nContext Dependable Styles\n-------------------------\n\nOften a Markdown document is the source for different targets. For\nexample a single document may be converted to HTML as part of a Wiki, a\ndraft HTML file may be used while writing the document, and a standalone\nand self-contained HTML-file may be send via email. At the same time,\nall version should be rendered using the private style (as oposed to\n(for example) a company style).\n\nTo address this situation, panache allows documents to specify multiple\nstyles, which get selected depending on the selected medium.\n\nAssume, for example, a document with the following metadata-block:\n\n.. code:: yaml\n\n ---\n styles_:\n drafthtml: privatedrafthtml\n finalhtml: privatefinalhtml\n wiki: wikihtml\n ---\n\nDepending on the value of the command line option ``--medium``\n(``darfthtml``, ``finalhtml``, or ``wiki``), panache would select either\nthe ``privatedrafthtml``-, ``privatefinalhtml``- or ``wikihtml``-style.\nIt would then compute the commandline (options, filters and metadata)\nfor the selected style and finally call Pandoc.\n\nCascading Style Definition\n--------------------------\n\npanache allows to define styles in separate YAML-files and within\ndocuments. The definition for a style with the name ``wikihtml`` might\nlook like the following:\n\n.. code:: yaml\n\n ---\n styledef_:\n wikihtml:\n commandline:\n template: /home/sebastian/templates/wiki-en.html\n metadata:\n build-os: Linux\n filter:\n run: pandoc-citeproc\n ---\n\nA second \u2013 derived \u2013 style, that changes the template (``template``),\nmay be defined by adding:\n\n.. code:: yaml\n\n ---\n germanwikihtml:\n parent: wikihtml\n commandline:\n template: /home/sebastian/pandoc-templates/templates/wiki-de.html\n ---\n\nto the previous ``styledef_`` or by adding it to a separate\n``styledef_`` in another file.\n\nStyle Variables\n---------------\n\nObviously, the style definitions above may work for the user\n``sebastian`` but are likely to fail for a different user. This is where\nparameterized style definitions come into play.\n\npanache uses `{{ mustache\n}} `__ as template\nengine for style files. Through that, panache allows to use \u201ckeywords\u201d\nin style definitions, wich are substituted based on commandline options\nand some defaults. Using this, the above definition of the\n``germanwikihtml``-style may be rewritten as follows:\n\n.. code:: yaml\n\n ---\n germanwikihtml:\n parent: wikihtml\n commandline:\n template: {{home}}/pandoc-templates/wiki-de.html\n ---\n\nNow, if ``--style-var=home:/home/sebastian`` would be passed to panache,\nthen ``template`` would be resolved to\n``/home/sebastian/pandoc-templates/wiki-de.html`` (and as\n``--template=/home/sebastian/pandoc-templates/wiki-de.html`` passed to\nPandoc). Obviously, using ``--style-var=home:~`` makes the panache-call\nuser agnostic (in Bash).\n\nUsing regular `{{ mustache\n}}-syntax `__ one may express\nconditions and repetitions.\n\nInstallation\n============\n\nOptions\n-------\n\nThere are two options for using panache:\n\n- running the Python source\n- running a binary version\n\nBoth options will be described below.\n\nPython Source\n-------------\n\nMake sure the following requirements are satisfied:\n\n- `Pandoc `__ >= 2.1\n- Python >= 3.5\n\nUse ``pip`` to install panache:\n\n- globally\n\n .. code:: bash\n\n pip install panache\n # /usr/lib/python3/dist-packages/panache/panache.py --version\n\n or locally:\n\n .. code:: bash\n\n mkdir panache\n cd panache/\n virtualenv -p /usr/bin/python3 venv\n source venv/bin/activate\n pip install panache\n # python3 ./venv/lib/python3.6/site-packages/panache/panache.py --version\n\nBinary\n------\n\nMake sure the following requirement is satisfied:\n\n- `Pandoc `__ >= 2.1\n\nDowload an appropriate binary from the `releases\npage `__.\n\nDetails\n=======\n\nDefault Style- and Meta-Variables\n---------------------------------\n\nThe following Style- and Meta-Variables will be added by default, if\ninput comes from file or STDIN:\n\n+-------------+--------------------------------------------------------+\n| Variable | Description |\n+=============+========================================================+\n| ``panache_d | directory of the panache script |\n| ir`` | |\n+-------------+--------------------------------------------------------+\n| ``panache_v | panache version where ``X``, ``Y``, ``Z`` are major, |\n| ersion_X.Y. | minor and patch (see `Semantic |\n| Z`` | Versioning `__) |\n+-------------+--------------------------------------------------------+\n| ``os_X`` | os type where ``X`` is one of ``posix``, ``nt``, |\n| | ``ce``, ``java``. |\n+-------------+--------------------------------------------------------+\n| ``build_dat | the date and time when panache was invoked (in the |\n| e`` | form ``YYYY-mm-ddTHH:MM:SSZ``) |\n+-------------+--------------------------------------------------------+\n\nIf input comes from a file the following additional Style- and\nMeta-Variables will be added by default:\n\n+------------------------------+----------------------------------------------+\n| Variable | Description |\n+==============================+==============================================+\n| ``input_dir`` | directory of the input file |\n+------------------------------+----------------------------------------------+\n| ``input_basename`` | basename of the input file |\n+------------------------------+----------------------------------------------+\n| ``input_basename_root`` | basename without extension of the input file |\n+------------------------------+----------------------------------------------+\n| ``input_basename_extension`` | extension of the basename |\n+------------------------------+----------------------------------------------+\n| ``vcsreference`` | vcs reference of the file |\n+------------------------------+----------------------------------------------+\n| ``vcsdate`` | vcs date (last change) |\n+------------------------------+----------------------------------------------+\n\nMORE\n----\n\ntbd.\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/sebogh/panache", "keywords": "", "license": "BSD 3-Clause License", "maintainer": "", "maintainer_email": "", "name": "Panache", "package_url": "https://pypi.org/project/Panache/", "platform": "", "project_url": "https://pypi.org/project/Panache/", "project_urls": { "Homepage": "https://github.com/sebogh/panache" }, "release_url": "https://pypi.org/project/Panache/0.2.12/", "requires_dist": [ "pyyaml (>=4.2b1)", "pystache", "defusedxml" ], "requires_python": ">3.5.0", "summary": "Pandoc wrapped in styles", "version": "0.2.12" }, "last_serial": 4156059, "releases": { "0.2.11": [ { "comment_text": "", "digests": { "md5": "157c15bd1cfd6874e820de0f3ad82a22", "sha256": "f0fd92d4a34d12c51e67177eb2d56e386344f9b7a5914a999668632bb22a40cc" }, "downloads": -1, "filename": "Panache-0.2.11-py3-none-any.whl", "has_sig": false, "md5_digest": "157c15bd1cfd6874e820de0f3ad82a22", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.5.0", "size": 10471, "upload_time": "2018-07-25T13:32:16", "url": "https://files.pythonhosted.org/packages/22/ea/f002a06abfa8ae7d07a01d0a893694ee7281c8e14744c8223813a9158d26/Panache-0.2.11-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "499026b49915b40d332fea319bcf0163", "sha256": "af6c572ae8cbf949e2ce4577eb79132cf3e4af45847c38d4ca044ca371bcaa7a" }, "downloads": -1, "filename": "Panache-0.2.11.tar.gz", "has_sig": false, "md5_digest": "499026b49915b40d332fea319bcf0163", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5.0", "size": 10690, "upload_time": "2018-07-25T13:32:18", "url": "https://files.pythonhosted.org/packages/b8/f3/a974532483e407aabfa7a67cfbe7352325285edf139ea54f1e0d0cbb9f20/Panache-0.2.11.tar.gz" } ], "0.2.12": [ { "comment_text": "", "digests": { "md5": "f8915b2d78c64a6fbba2e673bd5f5f38", "sha256": "7e2384c0e886e0034eec439fb4d251b3f546dc3017b6742853773ea53e2b83b3" }, "downloads": -1, "filename": "Panache-0.2.12-py3-none-any.whl", "has_sig": false, "md5_digest": "f8915b2d78c64a6fbba2e673bd5f5f38", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.5.0", "size": 10554, "upload_time": "2018-08-10T09:29:09", "url": "https://files.pythonhosted.org/packages/08/22/8136d2ae99cb2d7309f19933cef66dc0c6c4d23699e80db4b8ea0c5d81ce/Panache-0.2.12-py3-none-any.whl" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "2e217107e8b7d8865fbe0e58da287059", "sha256": "b565dc6a0e4dc9bcf4a63af0efa241b0d185d6e5869ff56459806a484406e5fa" }, "downloads": -1, "filename": "Panache-0.2.6.tar.gz", "has_sig": false, "md5_digest": "2e217107e8b7d8865fbe0e58da287059", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11442, "upload_time": "2018-07-24T18:54:01", "url": "https://files.pythonhosted.org/packages/3c/64/e023da4fd304a0307f6de352b1a92d6e55205cb89646c00fde2d1068ed95/Panache-0.2.6.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "0b5134d52abb547f077fe6e11311f03f", "sha256": "c16d2dc26aa9dc3c57a90c7479b04647648517ca9f69098eb9a789bab6f99264" }, "downloads": -1, "filename": "Panache-0.2.7.tar.gz", "has_sig": false, "md5_digest": "0b5134d52abb547f077fe6e11311f03f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11620, "upload_time": "2018-07-24T19:16:26", "url": "https://files.pythonhosted.org/packages/4f/31/d90a2c83d3d10d148d34feb48dd9d4a57b6caae4245272c9e7b2129c1151/Panache-0.2.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f8915b2d78c64a6fbba2e673bd5f5f38", "sha256": "7e2384c0e886e0034eec439fb4d251b3f546dc3017b6742853773ea53e2b83b3" }, "downloads": -1, "filename": "Panache-0.2.12-py3-none-any.whl", "has_sig": false, "md5_digest": "f8915b2d78c64a6fbba2e673bd5f5f38", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.5.0", "size": 10554, "upload_time": "2018-08-10T09:29:09", "url": "https://files.pythonhosted.org/packages/08/22/8136d2ae99cb2d7309f19933cef66dc0c6c4d23699e80db4b8ea0c5d81ce/Panache-0.2.12-py3-none-any.whl" } ] }