{ "info": { "author": "Philipp Trommler", "author_email": "yafg@philipp-trommler.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Plugins", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Documentation", "Topic :: Text Processing :: Markup" ], "description": "# yafg - Yet Another Figure Generator\n\n*yafg* is yet another figure generator plugin for Python's Markdown. It's\nwritten and tested with Python 2.7 and Python 3.6 as well as Markdown 3.1.1, but\naims at supporting as many versions as possible. If you encounter any problems\nwith the given versions or find yourself using *yafg* without problems with any\nothers, please give me a hint using the e-mail address listed below.\n\nIt uses the `title` attribute given to an image within Markdown to generate a\n`
` environment with a `
` containing the `title`'s text,\ne.g.:\n\n```markdown\n![Alt text](/path/to/image.png \"This is the title of the image.\")\n```\n\nbecomes\n\n```html\n
\n\"Alt\n
This is the title of the image.
\n
\n```\n\n## How?\n\n### Install\n\n*yafg* can be installed via PyPI using:\n\n```\npip install yafg\n```\n\n### Standard Usage\n\nWhen parsing your input, you can add *yafg* to Markdown as follows:\n\n```python\nimport yafg\n\n# ...\n\noutputString = markdown.markdown(inputString, extensions = [yafg.YafgExtension(stripTitle=False)])\n```\n\n### Pelican\n\nPelican users can add *yafg* to their generator process by adding it to the\n`MARKDOWN` variable in the `pelicanconf.py` as follows:\n\n```python\nMARKDOWN = {\n 'extensions_configs': {\n 'yafg': {\n 'stripTitle': 'False',\n },\n },\n}\n```\n\n### Options\n\nCurrently supported options are listed below:\n\n* `stripTitle` (default: `False`):\n\n Removes the original `title` attribute from the `` element. Since its\n usage is discouraged anyways (see below), this may be an option worth\n considering.\n\n* `figureClass` (default: `\"\"`):\n\n The CSS class to add to the generated `
` element.\n\n* `figcaptionClass` (default: `\"\"`):\n\n The CSS class to add to the generated `
` element.\n\n## Why?\n\nyafg arose from the dissatisfaction with the existing solutions, namely:\n\n* [markdown\\_captions](https://github.com/evidlo/markdown_captions) which uses\n the `alt` attribute for the `
`.\n* [markdown-figcap](https://github.com/funk1d/markdown-figcap) which uses a\n cryptic syntax that doesn't integrate well into Markdown, IMHO.\n* [figureAltCaption](https://github.com/jdittrich/figureAltCaption) which\n cannot handle multi-line descriptions and uses the `alt` attribute for the\n `
`.\n\nUsing the `alt` attribute to fill the `
` is not correct, because [as\nthe standard states](https://www.w3.org/wiki/Html/Elements/img)\n\n> [...] the alternative text is a replacement for the image, not a description\n> [...]\n\nfor the most common case of a text accompanied by an augmenting image. It should\nbe used for an exact reproduction of what can be seen on the image for those who\ncannot see it, for example because they're blind or their internet connection is\ntoo slow. A figure's caption in turn should provide a description helping to\nunderstand the content of the image.\n\nThe `title` attribute on the other hand should contain \"[a]dvisory information\nassociated with the element ([W3C Core Attribute\nList](https://www.w3.org/wiki/Html/Attributes/_Global)). This is rather vague\nand often used by browser vendors to show tooltips containing the title. Since\ntooltips are highly problematic for a11y reasons and the browser support varies,\n\"[r]elying on the title attribute is currently discouraged\" ([HTML Living\nStandard](https://html.spec.whatwg.org/multipage/dom.html#the-title-attribute)).\nThis makes it an ideal candidate to store the wanted `figcaption` inside of the\nstandard Markdown syntax.\n\n## Author\n\n*yafg* has been written by:\n\n* Philipp Trommler \n\n## License\n\n*yafg* has been published under a GPL 3.0 or later license. See the `LICENSE`\nfile for more information.\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://git.sr.ht/~ferruck/yafg", "keywords": "markdown image figure caption html a11y", "license": "GPLv3+", "maintainer": "Philipp Trommler", "maintainer_email": "yafg@philipp-trommler.me", "name": "yafg", "package_url": "https://pypi.org/project/yafg/", "platform": "", "project_url": "https://pypi.org/project/yafg/", "project_urls": { "Homepage": "https://git.sr.ht/~ferruck/yafg" }, "release_url": "https://pypi.org/project/yafg/0.2/", "requires_dist": [ "Markdown (==3.1.1)" ], "requires_python": ">=2.7.15, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4", "summary": "Figure and figcaption generator markdown extension", "version": "0.2" }, "last_serial": 5982120, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "a8248f520b15129b0c45ee165e210f64", "sha256": "28f2ffb383f3f9148497fc46d48c19ed1952fdb92299d02d89d276b940763c35" }, "downloads": -1, "filename": "yafg-0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "a8248f520b15129b0c45ee165e210f64", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.7.15", "size": 17565, "upload_time": "2019-09-12T10:40:55", "url": "https://files.pythonhosted.org/packages/e0/83/867f05ac03686a57611d133c9378f149c203b3f910df43a4fa916a2ff297/yafg-0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7101aca535d2557c3f6429fb1b3a0947", "sha256": "56d5015d66ca5e7b146e295ebaaddf13d7c9c6e80f660c4fa0412711adf9faf2" }, "downloads": -1, "filename": "yafg-0.1.tar.gz", "has_sig": false, "md5_digest": "7101aca535d2557c3f6429fb1b3a0947", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7.15", "size": 4435, "upload_time": "2019-09-12T10:40:58", "url": "https://files.pythonhosted.org/packages/f0/6e/2b4297e5199cafd401cac18b2f425121550fa880aa59d290e33b40f7ab76/yafg-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "f9120db9dfe8c7b40c3c1b5c59c568f9", "sha256": "5f4a549fceff843ecac41252e6de46a767c4b18796bfdaf6e6c55501786a8b0c" }, "downloads": -1, "filename": "yafg-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f9120db9dfe8c7b40c3c1b5c59c568f9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.15, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4", "size": 17945, "upload_time": "2019-10-16T09:09:48", "url": "https://files.pythonhosted.org/packages/2c/fb/55ff724b96ab3d4d664a4947a269ee78fc0aacd635561a29a06d0f9c181b/yafg-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "85722a19b918c7e5eadbf0cbb4e89fec", "sha256": "d730d5fb35a3e4cc197bfa0c18694bb69801d513fc561033838a0e6887183b50" }, "downloads": -1, "filename": "yafg-0.2.tar.gz", "has_sig": false, "md5_digest": "85722a19b918c7e5eadbf0cbb4e89fec", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7.15, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4", "size": 4899, "upload_time": "2019-10-16T09:09:49", "url": "https://files.pythonhosted.org/packages/e9/61/763d8dccefc14bcd6629df553d99ef084e9c064c99fd0b037ec6bd50be5f/yafg-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f9120db9dfe8c7b40c3c1b5c59c568f9", "sha256": "5f4a549fceff843ecac41252e6de46a767c4b18796bfdaf6e6c55501786a8b0c" }, "downloads": -1, "filename": "yafg-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f9120db9dfe8c7b40c3c1b5c59c568f9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.15, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4", "size": 17945, "upload_time": "2019-10-16T09:09:48", "url": "https://files.pythonhosted.org/packages/2c/fb/55ff724b96ab3d4d664a4947a269ee78fc0aacd635561a29a06d0f9c181b/yafg-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "85722a19b918c7e5eadbf0cbb4e89fec", "sha256": "d730d5fb35a3e4cc197bfa0c18694bb69801d513fc561033838a0e6887183b50" }, "downloads": -1, "filename": "yafg-0.2.tar.gz", "has_sig": false, "md5_digest": "85722a19b918c7e5eadbf0cbb4e89fec", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7.15, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4", "size": 4899, "upload_time": "2019-10-16T09:09:49", "url": "https://files.pythonhosted.org/packages/e9/61/763d8dccefc14bcd6629df553d99ef084e9c064c99fd0b037ec6bd50be5f/yafg-0.2.tar.gz" } ] }