{ "info": { "author": "Konstantin Molchanov", "author_email": "moigagoo@live.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": "# Macros for Foliant\n\n*Macro* is a string with placeholders that is replaced with predefined content during documentation build. Macros are defined in the config.\n\n\n## Installation\n\n```shell\n$ pip install foliantcontrib.macros\n```\n\n\n## Config\n\nEnable the preprocessor by adding it to `preprocessors` and listing your macros in `macros` dictionary:\n\n```yaml\npreprocessors:\n - macros:\n macros:\n foo: This is a macro definition.\n bar: \"This is macro with a parameter: {0}\"\n```\n\n\n## Usage\n\nHere's the simplest usecase for macros:\n\n```yaml\npreprocessors:\n - macros:\n macros:\n support_number: \"8 800 123-45-67\"\n```\n\nNow, every time you need to insert your support phone number, you put a macro instead:\n\n```markdown\nCall you support team: <support_number.\n\nHere's the number again: <support_number.\n```\n\nMacros are useful in documentation that should be built into multiple targets, e.g. site and pdf, when the same thing is done differently in one target than in the other.\n\nFor example, to reference a page in MkDocs, you just put the Markdown file in the link:\n\n```markdown\nHere is [another page](another_page.md).\n```\n\nBut when building documents with Pandoc all sources are flattened into a single Markdown, so you refer to different parts of the document by anchor links:\n\n```markdown\nHere is [another page](#another_page).\n```\n\nThis can be implemented using `<` tag:\n\n```markdown\nHere is [another page](#another_pageanother_page.md).\n```\n\nThis bulky construct quickly gets old when you use many cross-references in your documentation.\n\nTo make your sources cleaner, move this construct to the config as a reusable macro:\n\n```yaml\npreprocessors:\n - macros:\n macros:\n ref: <{0}{1}\n```\n\nAnd use it in the source:\n\n```markdown\nHere is [another page](<ref).\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/foliant-docs/foliantcontrib.macros", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "foliantcontrib.macros", "package_url": "https://pypi.org/project/foliantcontrib.macros/", "platform": "any", "project_url": "https://pypi.org/project/foliantcontrib.macros/", "project_urls": { "Homepage": "https://github.com/foliant-docs/foliantcontrib.macros" }, "release_url": "https://pypi.org/project/foliantcontrib.macros/1.0.4/", "requires_dist": null, "requires_python": "", "summary": "Macros for Foliant.", "version": "1.0.4" }, "last_serial": 4493662, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "521ef57c502fbebc7b7abe65a5d1c326", "sha256": "afa484172000c3eaa49f1b742fc6481db69a607a803910a403b74278e5369653" }, "downloads": -1, "filename": "foliantcontrib.macros-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "521ef57c502fbebc7b7abe65a5d1c326", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 4444, "upload_time": "2018-01-15T19:24:45", "url": "https://files.pythonhosted.org/packages/53/da/031a0de5df7c419dcb2392fa97ded70c8d296480c30672500a01c11c0542/foliantcontrib.macros-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "09067d40c8d218f582af9619e58fd439", "sha256": "fe7c92dd246d435ce9afc77b7cd13331f3cc1249dc83eddab40c56eb6f1bc220" }, "downloads": -1, "filename": "foliantcontrib.macros-1.0.0.tar.gz", "has_sig": false, "md5_digest": "09067d40c8d218f582af9619e58fd439", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2567, "upload_time": "2018-01-15T19:24:59", "url": "https://files.pythonhosted.org/packages/c4/9a/49462da202c759e0cd1a3db6632b4be7133b700c9a901d1fafcf6991c8cf/foliantcontrib.macros-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b6e2b2ad545832222afd751c0823b367", "sha256": "d8b998f6bf4e1c21a13c73fb1c7715316356aa3b7a42996f438c6001848cad22" }, "downloads": -1, "filename": "foliantcontrib.macros-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b6e2b2ad545832222afd751c0823b367", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 4686, "upload_time": "2018-01-15T19:55:17", "url": "https://files.pythonhosted.org/packages/6c/a9/376077bad93fac3aad80525a61d0edd5eac3c229866c31859f3c828acfd0/foliantcontrib.macros-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a0bd1707666cf1e86bc20c1647087186", "sha256": "378eeeb2ce2c9c0f9f5de8099de7b6a0df579bd7027c1336759a6440985cc2db" }, "downloads": -1, "filename": "foliantcontrib.macros-1.0.1.tar.gz", "has_sig": false, "md5_digest": "a0bd1707666cf1e86bc20c1647087186", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2714, "upload_time": "2018-01-15T19:55:19", "url": "https://files.pythonhosted.org/packages/f7/b0/c47310ffde788a3613330ab9b25f115cf4b28aa9c200c80b5ad3971625f0/foliantcontrib.macros-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "00edae0a7441612510951a0d51253a7c", "sha256": "4961cc9412a2aaf0a38845955b5c1b9e9d3cfa6615cacc78d579477fa157eb2c" }, "downloads": -1, "filename": "foliantcontrib.macros-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "00edae0a7441612510951a0d51253a7c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4554, "upload_time": "2018-01-18T07:25:39", "url": "https://files.pythonhosted.org/packages/7c/7f/66b6332aee9de4383d4f175a291ddabef51ba12a537c51e6b17b19ed269b/foliantcontrib.macros-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ff2c1282fdf0e6dde7470c7cbfc1d243", "sha256": "ff20bf27457917d1c1a3d2f8c411cf93428bf41a08acf5f8727a741f3b6427d0" }, "downloads": -1, "filename": "foliantcontrib.macros-1.0.2.tar.gz", "has_sig": false, "md5_digest": "ff2c1282fdf0e6dde7470c7cbfc1d243", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2406, "upload_time": "2018-01-18T07:25:41", "url": "https://files.pythonhosted.org/packages/ca/92/71f079c4460eb79ade883d481269915edd4cc818182cc68949d1fb9160d5/foliantcontrib.macros-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "c16c84b26488996f6b807b37e7ab51e5", "sha256": "e44f2f0c55cdc7033ecd844f8ea0f76e69b94013fbba39411013a946e437587c" }, "downloads": -1, "filename": "foliantcontrib.macros-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "c16c84b26488996f6b807b37e7ab51e5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4586, "upload_time": "2018-02-01T17:33:32", "url": "https://files.pythonhosted.org/packages/e7/52/57b9476a0c33caf5fdb43924aa0b7eec8a07f2c17f3028e8d62094cd85d4/foliantcontrib.macros-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2e9f0c9d1838311a2e8bde17db4a3ea2", "sha256": "922127fdcfc97a8aa799563904713b2f257d7e4efdc1fd925ee1abbe8ce0608f" }, "downloads": -1, "filename": "foliantcontrib.macros-1.0.3.tar.gz", "has_sig": false, "md5_digest": "2e9f0c9d1838311a2e8bde17db4a3ea2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2418, "upload_time": "2018-02-01T17:33:34", "url": "https://files.pythonhosted.org/packages/78/ea/c535f30593a1e412b8c447dc5ff1b43ffe0b85c2066748419cf0a1bdb933/foliantcontrib.macros-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "31c7da20506f968e03cf8d4eff1d25a3", "sha256": "cf3d08f8d2dc8a96609c003ce8f2871859968b7dc7d1b63fec2b366f2bc2a3a7" }, "downloads": -1, "filename": "foliantcontrib.macros-1.0.4.tar.gz", "has_sig": false, "md5_digest": "31c7da20506f968e03cf8d4eff1d25a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2645, "upload_time": "2018-11-16T13:19:06", "url": "https://files.pythonhosted.org/packages/0a/cb/d41be8e69b5e55039cfa6a4ce56993938fa7a5c8e4af8244d584cee94bff/foliantcontrib.macros-1.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "31c7da20506f968e03cf8d4eff1d25a3", "sha256": "cf3d08f8d2dc8a96609c003ce8f2871859968b7dc7d1b63fec2b366f2bc2a3a7" }, "downloads": -1, "filename": "foliantcontrib.macros-1.0.4.tar.gz", "has_sig": false, "md5_digest": "31c7da20506f968e03cf8d4eff1d25a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2645, "upload_time": "2018-11-16T13:19:06", "url": "https://files.pythonhosted.org/packages/0a/cb/d41be8e69b5e55039cfa6a4ce56993938fa7a5c8e4af8244d584cee94bff/foliantcontrib.macros-1.0.4.tar.gz" } ] }