{ "info": { "author": "Dirk Weise", "author_email": "code@dirk-weise.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Markup :: XML" ], "description": "PyMediaRSS2Gen\r\n==============\r\n\r\nA Python library for generating Media RSS 2.0 feeds.\r\n\r\n\r\nAbout\r\n-----\r\n\r\nThis module intents to implement the `Media Feed specification`_ from Yahoo.\r\nThe Media RSS specification is a namespace for `RSS 2.0`_. To accomplish this\r\ntask it relies heavily on the `PyRSS2Gen module`_. As you might guess this\r\nMedia RSS module is even nameded after its role model.\r\n\r\nRight now this is considered **ALPHA**! *Breaking backwards compatibility is\r\npossible at any time*, I will **try** to avoid it though. I started off with a\r\nbase which can be extended as needed or as we (you and me) have time. See below\r\nfor a list with specification details and their current implementation status.\r\nThis way I keep track of what needs to be done and users can see what they can\r\naccomplish out of the box and what requires some contributions. Feel free to\r\nfork the project, implement a missing feature and send a pull request.\r\n\r\nPyMediaRSS2Gen is so far tested to work with Python versions 2.6, 2.7 and 3.4.\r\n\r\n\r\nUsage\r\n-----\r\n\r\nThe base class for a media feed is ``MediaRSS2``. It's attributes represent sub\r\nelements, e.g. ``MediaRSS2.copyright`` represents the ```` element\r\nand ``MediaRSS2.lastBuildDate`` the ```` element.\r\n\r\nFor simple elements which contain just a string, boolean or integer just use\r\nthe according data type. More complicated elements, typically those with\r\nattributes and / or sub elements like ```` or\r\n````, (will) have their own classes defined.\r\n\r\nProbably you will want to import PyRSS2Gen to make use some of it's helper\r\nclasses, e.g. for adding a channel image (``PyRSS2Gen.Image``) or GUIDs to\r\nitems (``PyRSS2Gen.Guid``).\r\n\r\nUage is shown by example. For more details check the code and the\r\n`PyRSS2Gen documentation`_.\r\n\r\n.. code:: python\r\n\r\n import datetime\r\n\r\n import PyMediaRSS2Gen\r\n\r\n\r\n mediaFeed = PyMediaRSS2Gen.MediaRSS2(\r\n title=\"A sample Media RSS Feed\",\r\n link=\"https://github.com/wedi/PyMediaRSS2Gen/\",\r\n description=\"Description for a feed with media elements\"\r\n )\r\n mediaFeed.copyright = \"Copyright (c) 2014 Foo Inc. All rights reserved.\"\r\n mediaFeed.lastBuildDate = datetime.datetime.now()\r\n mediaFeed.items = [\r\n PyMediaRSS2Gen.MediaRSSItem(\r\n title=\"First item with media element\",\r\n description=\"An image of foo attached in a media:content element\",\r\n media_content=PyMediaRSS2Gen.MediaContent(\r\n url=\"http://example.com/assets/foo1.jpg\",\r\n fileSize=123456,\r\n medium=\"image\",\r\n width=\"480\",\r\n height=\"640\"\r\n )\r\n ),\r\n PyMediaRSS2Gen.MediaRSSItem(\r\n title=\"Second item with media element\",\r\n description=\"A video with multiple resolutions\",\r\n media_content=[\r\n PyMediaRSS2Gen.MediaContent(\r\n url=\"http://example.com/assets/foo_HD.mp4\",\r\n fileSize=8765432,\r\n type=\"video/mp4\",\r\n width=\"1920\",\r\n height=\"1080\"\r\n ),\r\n PyMediaRSS2Gen.MediaContent(\r\n url=\"http://example.com/assets/foo_SD.mp4\",\r\n fileSize=2345678,\r\n type=\"video/mp4\",\r\n width=\"1280\",\r\n height=\"720\"\r\n ),\r\n ]\r\n ),\r\n PyMediaRSS2Gen.MediaRSSItem(\r\n title=\"And an item with no media element at all\",\r\n description=\"An image of foo attached in an media:content element\",\r\n link=\"http://example.com/article/important-story.html\"\r\n )\r\n ]\r\n mediaFeed.write_xml(open(\"rss2.xml\", \"w\"))\r\n\r\n\r\n\r\nInstallation\r\n------------\r\n\r\n1. Easiest way to install this module is using pip (as soon as it\u2019s\r\n uploaded to the PyPI)::\r\n\r\n % pip install PyMediaRSS2Gen\r\n\r\n2. If you want to install the module manually, download the package,\r\n unzip it and run::\r\n\r\n % cd where/you/put/PyMediaRSS2Gen/\r\n % python setup.py install\r\n\r\n which uses the standard Python installer. `Read the documentation`_ for\r\n more details about installing Python modules.\r\n\r\n\r\nHow To Contribute\r\n-----------------\r\n\r\nEvery open source project lives from the generous help by contributors\r\nthat sacrifice their time and PyMediaRSS2Gen is no different.\r\n\r\nThis project lives on `GitHub`_. You are very welcome to fork this\r\nproject and submit a pull requests! If you don\u2019t know how to do this\r\nyou can still report errors by `opening an issue`_.\r\n\r\nLook here for more details about `contributing to PyMediaRSS2Gen`_.\r\n\r\n\r\nStatus and Todo\r\n---------------\r\n\r\nTests are missing completely so automated testing with tox is a todo item! I'm\r\nstill new to python and haven't figured out testing yet.\r\n\r\nBelow you find the implementation status of the Media RSS elements\r\naccording to the `Media Feed specification`_.\r\n\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| Feature | Status | Issue on GitHub |\r\n+==================================+=========================+==================================================================================+\r\n| media:content | Ready | |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:text | Ready | |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:title | Ready | |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:group | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| Enable elements on channel level | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:rating | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:description | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:keywords | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:thumbnail | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:category | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:hash | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:player | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:credit | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:copyright | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:restriction | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:community | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:comments | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:embed | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:responses | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:backLinks | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:status | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:price | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:license | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:subTitle | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:peerLink | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:location | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:rights | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| media:scenes | Not implemented | `See issue `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n| **Summary** | **3 of 28 implemented** | `See all issues `__ |\r\n+----------------------------------+-------------------------+----------------------------------------------------------------------------------+\r\n\r\n\r\nCopyright and license\r\n---------------------\r\n\r\n| Copyright (c) 2014 Dirk Weise. Code released under the `MIT license`_.\r\n| I\u2019m happy if you drop me a line if this module was usefull for you.\r\n\r\n\r\n.. _Media Feed specification: http://www.rssboard.org/media-rss\r\n.. _RSS 2.0: http://www.rssboard.org/rss-specification\r\n.. _PyRSS2Gen module: https://pypi.python.org/pypi/PyRSS2Gen/\r\n.. _OrderedDict Backport by Raymond Hettinger: http://code.activestate.com/recipes/576693/\r\n.. _download the package: https://pypi.python.org/pypi/PyMediaRSS2Gen/\r\n.. _PyRSS2Gen documentation: https://pypi.python.org/pypi/PyRSS2Gen/\r\n.. _Read the documentaion: https://docs.python.org/install/index.html\r\n.. _pet project on GitHub: https://github.com/wedi/PyMediaRSS2Gen\r\n.. _open an issue: https://github.com/wedi/PyMediaRSS2Gen/issues\r\n.. _Read the documentation: https://docs.python.org/install/\r\n.. _GitHub: https://github.com/wedi/PyMediaRSS2Gen/\r\n.. _contributing to PyMediaRSS2Gen: https://github.com/wedi/PyMediaRSS2Gen/blob/master/CONTRIBUTING.md\r\n.. _opening an issue: https://github.com/wedi/PyMediaRSS2Gen/issues/\r\n.. _MIT license: https://github.com/wedi/PyMediaRSS2Gen/blob/master/LICENSE.txt\r\n\r\n\r\nChangelog\r\n---------\r\n\r\nVersion 0.1.1 (2014-10-08)\r\n^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\n- Fix setup.py to correctly install required modules\r\n\r\n\r\nVersion 0.1.0 (2014-10-06)\r\n^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\n- Initial release\r\n- Support for media\\_content, media\\_title and media\\_text\r\n\r\n\r\nCredits\r\n-------\r\n\r\nPyMediaRSS2Gen is written and maintained as a hobby project by `Dirk\r\nWeise`_.\r\n\r\nThis project would not be possible without the work of `Andrew Dalke`_\r\nwho wrote `PyRSS2Gen`_ upon which this module is built.\r\n\r\n\r\n\r\n.. _Dirk Weise: http://www.dirk-weise.de/\r\n.. _Andrew Dalke: http://dalkescientific.com/\r\n.. _PyRSS2Gen: https://pypi.python.org/pypi/PyRSS2Gen/", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/wedi/PyMediaRSS2Gen/archive/v0.1.1.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wedi/PyMediaRSS2Gen", "keywords": "RSS,Feed", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "PyMediaRSS2Gen", "package_url": "https://pypi.org/project/PyMediaRSS2Gen/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PyMediaRSS2Gen/", "project_urls": { "Download": "https://github.com/wedi/PyMediaRSS2Gen/archive/v0.1.1.tar.gz", "Homepage": "https://github.com/wedi/PyMediaRSS2Gen" }, "release_url": "https://pypi.org/project/PyMediaRSS2Gen/0.1.1/", "requires_dist": [ "PyRSS2Gen" ], "requires_python": null, "summary": "A Python library for generating Media RSS 2.0 feeds.", "version": "0.1.1" }, "last_serial": 1252011, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e487203b49eb9e7874ff79554157eb7b", "sha256": "1b17ee17f660bbcb2d92c5a8385a0ab196018426d42528957c02281d2b782ed1" }, "downloads": -1, "filename": "PyMediaRSS2Gen-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e487203b49eb9e7874ff79554157eb7b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11284, "upload_time": "2014-10-06T12:45:20", "url": "https://files.pythonhosted.org/packages/a6/e6/fb6b8d3858d05885461b9b0e3113b4d1671d6de923d9606ca649a08f181b/PyMediaRSS2Gen-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f4d3af2370c36dc3df4e09970d4b0c5", "sha256": "b225f340ffc2a500497e4c1afc6415cbbf2a982c1daba260a33ca7c87d26f445" }, "downloads": -1, "filename": "PyMediaRSS2Gen-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6f4d3af2370c36dc3df4e09970d4b0c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8830, "upload_time": "2014-10-06T12:45:23", "url": "https://files.pythonhosted.org/packages/45/ef/a0278979ccac6195dfb5e5f64096e728bcfaf4457c15c2155685ba3a02cc/PyMediaRSS2Gen-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "76e625693402a0d1405ba9f3c2bffe0e", "sha256": "e4b765dbb364171d2cca75d363dba094b76988319255734686dc3b82aeb0d0ad" }, "downloads": -1, "filename": "PyMediaRSS2Gen-0.1.1.tar.gz", "has_sig": false, "md5_digest": "76e625693402a0d1405ba9f3c2bffe0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9882, "upload_time": "2014-10-08T17:17:22", "url": "https://files.pythonhosted.org/packages/d3/58/7fd2ed50ea37088c2e0f7cced74377c7d470970df83258017d8cc4793ef8/PyMediaRSS2Gen-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "76e625693402a0d1405ba9f3c2bffe0e", "sha256": "e4b765dbb364171d2cca75d363dba094b76988319255734686dc3b82aeb0d0ad" }, "downloads": -1, "filename": "PyMediaRSS2Gen-0.1.1.tar.gz", "has_sig": false, "md5_digest": "76e625693402a0d1405ba9f3c2bffe0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9882, "upload_time": "2014-10-08T17:17:22", "url": "https://files.pythonhosted.org/packages/d3/58/7fd2ed50ea37088c2e0f7cced74377c7d470970df83258017d8cc4793ef8/PyMediaRSS2Gen-0.1.1.tar.gz" } ] }