{ "info": { "author": "Artur Barseghyan", "author_email": "artur.barseghyan@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3" ], "description": "==================================\nvishap\n==================================\nGenerate embed (HTML) code of services like Youtube or Vimeo from URLs given.\nRules are specified in the plugins.\n\nComes with plugins for the following services (listed in alphabetical order):\n\n- Vimeo\n- Youtube\n\nInstallation\n==================================\nInstall with latest stable version from PyPI:\n\n.. code-block::\n\n $ pip install vishap\n\nor install the latest stable version from bitbucket:\n\n.. code-block::\n\n $ pip install -e hg+https://bitbucket.org/barseghyanartur/vishap@stable#egg=vishap\n\nor install the latest stable version from github:\n\n.. code-block::\n\n $ pip install -e git+http://github.org/barseghyanartur/vishap@stable#egg=vishap\n\nThat's all. See the `Usage and examples` section for more.\n\nUsage and examples\n==================================\nSimple usage\n----------------------------------\nRequired imports\n\n.. code-block:: python\n\n from vishap import render_video\n\nRendering Vimeo code\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nThe following code:\n\n.. code-block:: python\n\n print render_video('http://vimeo.com/45655450', 500, 281)\n\nWould result the following output:\n\n.. code-block:: html\n\n \n\nRendering Youtube code\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nThe following code:\n\n.. code-block:: python\n\n print render_video('http://www.youtube.com/watch?v=LIPl7PtGXNI', 560, 315)\n\nWould result the following output:\n\n.. code-block:: html\n\n \n\nFilling available area\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nIf you want your embed code to fill the available area, render it without\n``width`` and ``height`` attributes and place it in a container to which it\nshall stretch.\n\nExample:\n\n.. code-block:: python\n\n s = \"\"\"
\n {embed_code}\n
\"\"\".format(\n embed_code = render_video('http://www.youtube.com/watch?v=LIPl7PtGXNI')\n )\n\nIt would then result the following output:\n\n.. code-block:: html\n\n \n\nYour CSS file should then look similar to the following\n\n.. code-block:: css\n\n .video-wrapper {\n width: 600px;\n height: 500px;\n padding: 0;\n }\n .video-wrapper iframe {\n position: absolute;\n width: 100%;\n height: 100%;\n }\n\nRegister a custom plugin\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n.. code-block:: python\n\n class ExamplePlugin(BaseVideoPlugin):\n uid = \"example\"\n name = \"Example\"\n url_pattern = \"^(?P(http\\:\\/\\/www\\.youtube\\.com\\/watch\\?v=)|(http\\:\\/\\/www\\.youtube\\.com\\/v\\/)|(http\\:\\/\\/youtu\\.be\\/))(?P[A-Za-z0-9\\-=_]{11})\"\n id_pattern = \"^(?P[A-Za-z0-9\\-=_]{11})\"\n thumbnail_pattern = \"//img.youtube.com/vi/{0}/{1}.jpg\"\n embed_code = \"\"\"\n \n \"\"\"\n\n plugin_registry.register(ExamplePlugin)\n\nReplacing existing plugin\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nIf you want to replace/update existing plugin, you can force register it in\nthe registry.\n\n.. code-block:: python\n\n class UpdatedYoutubePlugin(BaseVideoPlugin):\n uid = \"youtube\"\n name = \"Youtube\"\n url_pattern = \"^(?P(http\\:\\/\\/www\\.youtube\\.com\\/watch\\?v=)|(http\\:\\/\\/www\\.youtube\\.com\\/v\\/)|(http\\:\\/\\/youtu\\.be\\/))(?P[A-Za-z0-9\\-=_]{11})\"\n id_pattern = \"^(?P[A-Za-z0-9\\-=_]{11})\"\n thumbnail_pattern = \"//img.youtube.com/vi/{0}/{1}.jpg\"\n embed_code = \"\"\"\n \n \"\"\"\n\n plugin_registry.register(UpdatedYoutubePlugin, force=True)\n\nDjango integration\n==================================\nInstallation\n----------------------------------\nAdd `vishap.contrib.apps.django.vishap` to `INSTALLED_APPS`\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n # ...\n 'vishap.contrib.apps.django.vishap',\n # ...\n )\n\nUsage\n----------------------------------\nIn your template:\n\nExample #1:\n\n.. code-block:: html\n\n {% load vishap_tags %}\n {% render_video 'http://www.youtube.com/watch?v=LIPl7PtGXNI' 560 315 as rendered_video_example_1 %}\n {{ rendered_video_example_1|safe }}\n\nExample #2:\n\n.. code-block:: html\n\n {% load vishap_tags %}\n {% with video_url='http://vimeo.com/41055612' video_width='500' video_height='281' %}\n {% render_video video_url video_width video_height as rendered_video_example_2 %}\n {{ rendered_video_example_2|safe }}\n {% endwith %}\n\nMissing a plugin?\n==================================\nMissing a plugin for your favourite service? Contribute to the project by\nmaking one and it will appear in a new version (which will be released very\nquickly) or request a feature.\n\nLicense\n==================================\nGPL 2.0/LGPL 2.1\n\nSupport\n==================================\nFor any issues contact me at the e-mail given in the `Author` section.\n\nAuthor\n==================================\nArtur Barseghyan ", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/barseghyanartur/vishap", "keywords": "video,youtube,vimeo,video sharing services app", "license": "GPL 2.0/LGPL 2.1", "maintainer": null, "maintainer_email": null, "name": "vishap", "package_url": "https://pypi.org/project/vishap/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/vishap/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/barseghyanartur/vishap" }, "release_url": "https://pypi.org/project/vishap/0.1.5/", "requires_dist": null, "requires_python": null, "summary": "Generate embed (HTML) code of services like Youtube or Vimeo from URLs given. Rules are specified in the plugins.", "version": "0.1.5" }, "last_serial": 3472168, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "671f8f09f21d56c523964a11dbdf8ebe", "sha256": "7be7b698db19a633651d31a594c6632c08454dc12fe5561b2e9918c311f1af22" }, "downloads": -1, "filename": "vishap-0.1.tar.gz", "has_sig": false, "md5_digest": "671f8f09f21d56c523964a11dbdf8ebe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10661, "upload_time": "2013-09-27T18:02:01", "url": "https://files.pythonhosted.org/packages/53/9f/3477e05e316d39bfb99c42ef2ec354a364a1b66e4f47a04d6db37aa80f68/vishap-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ed769b4a3658beb5e470de5bf4150c22", "sha256": "537237c5ca560c48aa12e855f9dc5f18646ba1784fce01d4a08caf7cbb9ddb17" }, "downloads": -1, "filename": "vishap-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ed769b4a3658beb5e470de5bf4150c22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10411, "upload_time": "2014-05-21T21:57:09", "url": "https://files.pythonhosted.org/packages/61/17/71ef3ca6cb131cefef13a3f7a0e0a7d6fbe87bfd261449c9a2f9abae13ce/vishap-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "34fff1acec33908de20f37e1906ecdad", "sha256": "1eadfb03b585a39ed13da96445a7a56d6f292a8f5b13a03a79005e34fd05e59b" }, "downloads": -1, "filename": "vishap-0.1.2.tar.gz", "has_sig": false, "md5_digest": "34fff1acec33908de20f37e1906ecdad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10932, "upload_time": "2014-12-21T02:19:14", "url": "https://files.pythonhosted.org/packages/27/2e/ed954e076edd889bcd7b6e2c11d6fb23e846868365dc5e72baf643b716f3/vishap-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "573243344af43db8423e31fc09df4df8", "sha256": "c9d6460e843e6ada9eea46caca9424dc248c08dd14a05809eb673d3d509cb553" }, "downloads": -1, "filename": "vishap-0.1.3.tar.gz", "has_sig": false, "md5_digest": "573243344af43db8423e31fc09df4df8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10718, "upload_time": "2015-01-12T10:51:26", "url": "https://files.pythonhosted.org/packages/2e/ec/54fa5c83c89ea8756949b0f4bbc512d4d76b4740480fce9ee2868e72a757/vishap-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "0ba540799a3e97a7f7e86f284b1ad419", "sha256": "17330f12ab26f119780d30fff0046df2ae1f1b3c78d8a5bc49d5e3e120db4516" }, "downloads": -1, "filename": "vishap-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0ba540799a3e97a7f7e86f284b1ad419", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 19547, "upload_time": "2015-01-15T23:23:31", "url": "https://files.pythonhosted.org/packages/14/ce/bc3aeea34f8c35396ff79548afac8072ab57d7ea8575700f4907da04dac3/vishap-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5b7093579fb03454bdcd9a9d61d161b2", "sha256": "816d76dbfbaf00d27627f5f75ffa10f9c749d90a12cce7ac6784d03feeb73430" }, "downloads": -1, "filename": "vishap-0.1.4.tar.gz", "has_sig": false, "md5_digest": "5b7093579fb03454bdcd9a9d61d161b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29499, "upload_time": "2015-01-15T23:23:13", "url": "https://files.pythonhosted.org/packages/85/65/52c11433cc13ac4218cee35074c8c41bee894c72046d349dc5c446f5b68a/vishap-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "a9ebe79b8c54987c5cd022246d1391a3", "sha256": "05b396b7996c83acf127a2100ba022b0f1365d88ba066de7f28b5185351e1112" }, "downloads": -1, "filename": "vishap-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a9ebe79b8c54987c5cd022246d1391a3", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 19552, "upload_time": "2015-04-17T12:07:49", "url": "https://files.pythonhosted.org/packages/4e/05/ba296b996a424867d1e63aaeec20b90aa0b8f87ad31e89d6cc7064e546ec/vishap-0.1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bdc59f684efae4adbc8e1f3ed3ef0fab", "sha256": "5a2cb56c77cd40c8a9967ba9975a23667b765d4e2d216a8b3aea7ef70a0bae3a" }, "downloads": -1, "filename": "vishap-0.1.5.tar.gz", "has_sig": false, "md5_digest": "bdc59f684efae4adbc8e1f3ed3ef0fab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29578, "upload_time": "2015-04-17T12:07:46", "url": "https://files.pythonhosted.org/packages/cb/2f/62ac8855dc53db935210fea18edb7312dcb2c779f1391f5d9c1185991a99/vishap-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a9ebe79b8c54987c5cd022246d1391a3", "sha256": "05b396b7996c83acf127a2100ba022b0f1365d88ba066de7f28b5185351e1112" }, "downloads": -1, "filename": "vishap-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a9ebe79b8c54987c5cd022246d1391a3", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 19552, "upload_time": "2015-04-17T12:07:49", "url": "https://files.pythonhosted.org/packages/4e/05/ba296b996a424867d1e63aaeec20b90aa0b8f87ad31e89d6cc7064e546ec/vishap-0.1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bdc59f684efae4adbc8e1f3ed3ef0fab", "sha256": "5a2cb56c77cd40c8a9967ba9975a23667b765d4e2d216a8b3aea7ef70a0bae3a" }, "downloads": -1, "filename": "vishap-0.1.5.tar.gz", "has_sig": false, "md5_digest": "bdc59f684efae4adbc8e1f3ed3ef0fab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29578, "upload_time": "2015-04-17T12:07:46", "url": "https://files.pythonhosted.org/packages/cb/2f/62ac8855dc53db935210fea18edb7312dcb2c779f1391f5d9c1185991a99/vishap-0.1.5.tar.gz" } ] }