{ "info": { "author": "Daniil Minukhin", "author_email": "ddddsa@gmail.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": "![](https://img.shields.io/pypi/v/foliantcontrib.meta.svg)\n\n# Metadata for Foliant\n\nThis extension adds the `meta generate` command to Foliant, which generates the yaml-file with project metadata. It also allows to add other meta commands `meta ` which use the generated metadata.\n\nIt also adds the preprocessor `meta` which removes metadata blocks from the documents before builds and allows inserting formatted strings on the place of meta blocks, based on specific metadata keys.\n\n## Installation\n\n```bash\n$ pip install foliantcontrib.meta\n```\n\n## Specifying metadata\n\nMetadata may be specified in the beginning of a Markdown-file using [YAML Front Matter](http://www.yaml.org/spec/1.2/spec.html#id2760395) format:\n\n```yaml\n---\nid: MAIN_DOC\ntitle: Description of the product\nkey: value\n---\n```\n\n## `meta generate` command\n\n### Usage\n\nTo generate meta file run the `meta generate` command:\n\n```bash\n$ foliant meta generate\n```\n\nMetadata for the document will appear in the `meta.yml` file.\n\n### Config\n\nMeta generate command has just one option right now. It is specified under `meta` section in config:\n\n```yaml\nmeta:\n filename: meta.yml\n```\n\n`filename`\n: name of the YAML-file with generated project metadata.\n\n## `meta` preprocessor\n\n`meta` preprocessor allows you to remove metadata from your Markdown source files before build. It may be necessary if some backend doesn't accept the YAML Front Matter syntax.\n\nThis preprocessor also offers you a feature which we call *seeds*:\n\nSeeds are little string templates which will may be used to add some text after the metadata block in the resulting document, if specific keys were mentioned in the metadata. Details in the **Seeds** section.\n\n### Usage\n\nAdd `meta` preprocessor to your `preprocessors` section of foliant.yml and specify all your seeds:\n\n```yaml\npreprocessors:\n - meta:\n delete_meta: true\n seeds:\n section: '*Section \"{value}\"*'\n id: {value}\n```\n\n`delete_meta`\n: If set to `true` \u2014 metadata block will be deleted from the document before build. Default: `false`\n\n`seeds`\n: Seeds dictionary. Details in the next section.\n\n### Seeds\n\nSeeds allow you to add small chunks of text based on specific keys mentioned in the metadata block. For example, if you wish to add a small subcaption at the beginning of the document, which will use this document's title, add the `title` seed:\n\n```yaml\npreprocessors:\n - meta:\n seeds:\n title: '*Section \"{value}\"*'\n```\n\nIf we have a meta block like this in our document:\n\n```yaml\n---\nID: legal_info\nrelates: index.md\ntitle: Legal information\n---\n\n# Terms of use\n```\n\nPreprocessor will notice that `title` key was used in the meta block, and will add the seed with `{value}` placeholder replaced by the value of the `title` field:\n\n```\n*Section \"Legal information\"\n\n# Terms of use\n```\n\n\n", "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/foliant-docs/foliantcontrib.meta", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "foliantcontrib.meta", "package_url": "https://pypi.org/project/foliantcontrib.meta/", "platform": "any", "project_url": "https://pypi.org/project/foliantcontrib.meta/", "project_urls": { "Homepage": "https://github.com/foliant-docs/foliantcontrib.meta" }, "release_url": "https://pypi.org/project/foliantcontrib.meta/1.1.0/", "requires_dist": [ "foliant (>=1.0.4)" ], "requires_python": "", "summary": "Metadata for Foliant.", "version": "1.1.0" }, "last_serial": 5790240, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "caab2313cde293b530de068358212ca6", "sha256": "e8d1420279ba237e09af3fe59a8246d97f07808e94a862817280ae17fa6f6d3d" }, "downloads": -1, "filename": "foliantcontrib.meta-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "caab2313cde293b530de068358212ca6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7963, "upload_time": "2019-06-28T14:39:48", "url": "https://files.pythonhosted.org/packages/ac/ae/07e4fd3e6622d4b4189c634ab57ccd7bce28a3e034b29b4e051734af71a5/foliantcontrib.meta-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f8af8a8b7e41209994b8c355ecec6de7", "sha256": "0847d1d92f45486e687ca9125730f48a6f461df5820e1efa82b57ece28ac4f7a" }, "downloads": -1, "filename": "foliantcontrib.meta-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f8af8a8b7e41209994b8c355ecec6de7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5994, "upload_time": "2019-06-28T14:39:51", "url": "https://files.pythonhosted.org/packages/fd/2e/9f39eea13468d1de8bd837a88e22e093fc48b83f7dc64ce661bdab2216ee/foliantcontrib.meta-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "d3ba9aa2a2292519920718344eb554ab", "sha256": "293cf28e80aba3d3eee13c457c8077076ce1aa7a65ab827ba88d1d0d7f7698e7" }, "downloads": -1, "filename": "foliantcontrib.meta-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d3ba9aa2a2292519920718344eb554ab", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8042, "upload_time": "2019-07-01T11:32:56", "url": "https://files.pythonhosted.org/packages/5f/aa/14d2f515b134a49645b782080542c235be4caf67827268f63715bb3b3cc3/foliantcontrib.meta-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "68553bbacc729364ccbfcbaa5d1d84b7", "sha256": "30258bb04ed5ee8e8b723b356693f8b883a599bf36b17795499e1356e2e21314" }, "downloads": -1, "filename": "foliantcontrib.meta-1.0.1.tar.gz", "has_sig": false, "md5_digest": "68553bbacc729364ccbfcbaa5d1d84b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6081, "upload_time": "2019-07-01T11:32:57", "url": "https://files.pythonhosted.org/packages/1a/99/18bedd465daf0d72a58e394c086da2511c26c15ba13927db51037759d4fd/foliantcontrib.meta-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "c5654fdb2c0ac2a313d55439d46716f9", "sha256": "673c8ca42a2facf6991382b6e31dfc4ccb91000bcc85a26c13a6f433bfa905c6" }, "downloads": -1, "filename": "foliantcontrib.meta-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c5654fdb2c0ac2a313d55439d46716f9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8262, "upload_time": "2019-07-01T15:58:02", "url": "https://files.pythonhosted.org/packages/93/67/4026c450e676c1cc256d84223df1f6a4866a72724a53f95d325e33238286/foliantcontrib.meta-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ef50a973addbfdd4e545fd0e32e225d7", "sha256": "6477b821c841e8688568520a183b87883f511c11353d6296512b8c6be23f051b" }, "downloads": -1, "filename": "foliantcontrib.meta-1.0.2.tar.gz", "has_sig": false, "md5_digest": "ef50a973addbfdd4e545fd0e32e225d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6284, "upload_time": "2019-07-01T15:58:03", "url": "https://files.pythonhosted.org/packages/b4/b8/74ac48e8ac448c06488c63de875e4383ac3aaa64a0786cae9818783ea401/foliantcontrib.meta-1.0.2.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "172fe25521d2a6289cfd35e106aaf01b", "sha256": "e0d73d4d33565754357ac9302d484ded8b66f6372c903c1df4c5328c33c29843" }, "downloads": -1, "filename": "foliantcontrib.meta-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "172fe25521d2a6289cfd35e106aaf01b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9105, "upload_time": "2019-08-22T11:40:23", "url": "https://files.pythonhosted.org/packages/db/24/3f84f5f2a07f2882cf2d1ce0ad5ddf7e696f9b30bfcce17905a8cb82e204/foliantcontrib.meta-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "824c39db6a46da98b05b989e2549b0ed", "sha256": "9bc5f8facb6e33e3cd2782c4183b59603dabd30161187789f2762602875008e2" }, "downloads": -1, "filename": "foliantcontrib.meta-1.1.0.tar.gz", "has_sig": false, "md5_digest": "824c39db6a46da98b05b989e2549b0ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6825, "upload_time": "2019-08-22T11:40:25", "url": "https://files.pythonhosted.org/packages/e6/85/59139e99809332d7e5de20cfa0060d646b1108da6568c7b151572f4f8259/foliantcontrib.meta-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "172fe25521d2a6289cfd35e106aaf01b", "sha256": "e0d73d4d33565754357ac9302d484ded8b66f6372c903c1df4c5328c33c29843" }, "downloads": -1, "filename": "foliantcontrib.meta-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "172fe25521d2a6289cfd35e106aaf01b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9105, "upload_time": "2019-08-22T11:40:23", "url": "https://files.pythonhosted.org/packages/db/24/3f84f5f2a07f2882cf2d1ce0ad5ddf7e696f9b30bfcce17905a8cb82e204/foliantcontrib.meta-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "824c39db6a46da98b05b989e2549b0ed", "sha256": "9bc5f8facb6e33e3cd2782c4183b59603dabd30161187789f2762602875008e2" }, "downloads": -1, "filename": "foliantcontrib.meta-1.1.0.tar.gz", "has_sig": false, "md5_digest": "824c39db6a46da98b05b989e2549b0ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6825, "upload_time": "2019-08-22T11:40:25", "url": "https://files.pythonhosted.org/packages/e6/85/59139e99809332d7e5de20cfa0060d646b1108da6568c7b151572f4f8259/foliantcontrib.meta-1.1.0.tar.gz" } ] }