{ "info": { "author": "night-crawler", "author_email": "www@force.fm", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5" ], "description": "Wagtail Asciinema\n=================\n\nImplements\n`asciinema-player `__\nembedding block.\n\nRequirements (tested)\n---------------------\n\n- Python 3.5+\n- Wagtail 1.9+\n- Django 1.10\n\nInstallation\n------------\n\nInstall the library with pip:\n\n.. code:: bash\n\n $ pip install wagtail-asciinema\n\nAdd ``wagtail_asciinema`` to your INSTALLED\\_APPS setting like this:\n\n.. code:: python\n\n INSTALLED_APPS = [\n ...\n 'wagtail_asciinema',\n ]\n\nDownload ``asciinema-player`` sources from it's `release\npage `__ and\nthen place it in your STATIC directory.\n\nAdd ``AsciinemaBlock`` to your StreamField:\n\n.. code:: python\n\n from wagtail_asciinema.blocks import AsciinemaBlock\n asciinema = AsciinemaBlock(classname='full')\n\nYou can add a method to determine if you need to include asciinema code\ninto your static/js blocks:\n\n.. code:: python\n\n from wagtail.wagtailcore.models import Page\n class ArticlePage(Page):\n @property\n def has_asciinema(self):\n for stream_child in self.content:\n if stream_child.block.name == 'asciinema':\n return True\n return False\n\nAnd then add asciinema on your page on demand:\n\n.. code:: djangotemplate\n\n {% block extra_css %}\n {% if self.has_asciinema %}\n \n {% endif %}\n {% endblock %}\n {% block extra_js %}\n {% if self.has_asciinema %}\n \n {% endif %}\n {% endblock %}\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/night-crawler/wagtail-asciinema", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "wagtail-asciinema", "package_url": "https://pypi.org/project/wagtail-asciinema/", "platform": "", "project_url": "https://pypi.org/project/wagtail-asciinema/", "project_urls": { "Homepage": "https://github.com/night-crawler/wagtail-asciinema" }, "release_url": "https://pypi.org/project/wagtail-asciinema/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Implements Wagtail CMS asciinema integration", "version": "0.0.2" }, "last_serial": 2762495, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "473a1c31e2b95f18fbe0b0b54cbe76e1", "sha256": "f16254dbe6c4308ddb80f27a5cfe5750dcb9f7ee411faf4c1b59e371d248cfe3" }, "downloads": -1, "filename": "wagtail-asciinema-0.0.2.tar.gz", "has_sig": false, "md5_digest": "473a1c31e2b95f18fbe0b0b54cbe76e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3998, "upload_time": "2017-04-08T13:40:25", "url": "https://files.pythonhosted.org/packages/eb/d0/965513c9e13c98b704531a730120ce4f5ae8ba0cd44b97eb748df003379d/wagtail-asciinema-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "473a1c31e2b95f18fbe0b0b54cbe76e1", "sha256": "f16254dbe6c4308ddb80f27a5cfe5750dcb9f7ee411faf4c1b59e371d248cfe3" }, "downloads": -1, "filename": "wagtail-asciinema-0.0.2.tar.gz", "has_sig": false, "md5_digest": "473a1c31e2b95f18fbe0b0b54cbe76e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3998, "upload_time": "2017-04-08T13:40:25", "url": "https://files.pythonhosted.org/packages/eb/d0/965513c9e13c98b704531a730120ce4f5ae8ba0cd44b97eb748df003379d/wagtail-asciinema-0.0.2.tar.gz" } ] }