{ "info": { "author": "OpenMultimedia", "author_email": "contacto@openmultimedia.biz", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Plone", "Framework :: Plone :: 4.1", "Framework :: Plone :: 4.2", "Framework :: Plone :: 4.3", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "******************\r\ncollective.weather\r\n******************\r\n\r\n.. contents:: Table of Contents\r\n\r\nLife, the Universe, and Everything\r\n----------------------------------\r\n\r\nA Plone package to display the current weather at selected locations inside a\r\nportlet or viewlet.\r\n\r\nMostly Harmless\r\n---------------\r\n\r\n.. image:: https://secure.travis-ci.org/collective/collective.weather.png?branch=master\r\n :target: http://travis-ci.org/collective/collective.weather\r\n\r\n.. image:: https://coveralls.io/repos/collective/collective.weather/badge.png?branch=master\r\n :target: https://coveralls.io/r/collective/collective.weather\r\n\r\nGot an idea? Found a bug? Let us know by `opening a support ticket`_.\r\n\r\nDon't Panic\r\n-----------\r\n\r\nInstallation\r\n^^^^^^^^^^^^\r\n\r\nTo enable this package on a buildout-based installation:\r\n\r\n#. Edit your buildout.cfg and add ``collective.weather`` to the list of eggs\r\n to install::\r\n\r\n [buildout]\r\n ...\r\n eggs =\r\n collective.weather\r\n\r\n#. If you are using Plone 4.1, you may need to extend a Dexterity known good\r\n set (KGS) to make sure that you get the right versions of the packages that\r\n make up Dexterity::\r\n\r\n [buildout]\r\n ...\r\n extends =\r\n https://good-py.appspot.com/release/dexterity/1.2.1?plone=4.1.6\r\n\r\nAfter updating the configuration you need to run ''bin/buildout'', which will\r\ntake care of updating your system.\r\n\r\nGo to the 'Site Setup' page in a Plone site and click on the 'Add-ons' link.\r\n\r\nCheck the box next to ''collective.weather'' and click the 'Activate' button.\r\n\r\n.. Note::\r\n You may have to empty your browser cache and save your resource registries\r\n in order to see the effects of the product installation.\r\n\r\nUsage\r\n^^^^^\r\n\r\nGo to Site Setup and select 'Weather'.\r\n\r\nEnter the list of locations that are going to be available on the site in the\r\nfollowing format::\r\n\r\n location_id|name\r\n\r\nWhere *location_id* should be a unique value and not repeated among any of the\r\nlocations; *name* is the name to be shown in the drop down (this doesn't need\r\nto be unique). Some examples could be::\r\n\r\n 455827|S\u00e3o Paulo (for Yahoo! Weather)\r\n -23.548871,-46.638814|S\u00e3o Paulo (for Forecast.io and Weather Underground)\r\n\r\nSelect the sistem of units: Metric or Imperial. Metric system uses degrees\r\nCelsius. Imperial system uses degrees Fahrenheit.\r\n\r\nFinding locations\r\n^^^^^^^^^^^^^^^^^\r\n\r\nDifferent weather service providers need different location ids to get\r\nweather conditions.\r\n\r\nYou'll have to change the **Available locations** setting depending on your\r\nselection. Please, refer to providers documentation for more information:\r\n\r\n- `Yahoo Weather`_ needs a `WOEID`_. There's a convenient `online tool to\r\n get WOEID`_.\r\n- `Forecast.io API`_ just needs a ``latitude, longitude`` coordinate.\r\n- `Weather Underground`_ accepts many options (check the ``query`` option).\r\n\r\nPortlet\r\n^^^^^^^\r\n\r\nThe package includes a portlet that you can add in your site.\r\n\r\n- Open the 'Manage portlets' screen and select 'Weather portlet'\r\n- Set the title of the portlet\r\n- Select a city from the list\r\n\r\n.. image:: https://raw.github.com/collective/collective.weather/master/portlet.png\r\n :align: center\r\n :alt: The Weather portlet\r\n\r\nViewlet\r\n^^^^^^^\r\n\r\n.. Warning::\r\n The weather viewlet, as originaly planned, has proven to be pretty complex\r\n to implement. Current implementation is still buggy. Use it at your own\r\n risk.\r\n\r\nThe package also includes a viewlet that will display the weather in one of\r\nthe locations defined in the settings. The viewlet will be displayed on top of\r\nthe site inside the IPortalHeader viewlet manager.\r\n\r\nTo use the viewlet you need to activate it: go to Site Setup and select\r\n'Weather' again. Select the 'Show weather viewlet?' box.\r\n\r\nThe user will be able to select from one of the locations (this information\r\nwill be stored inside a cookie to show this location the next time the user\r\nvisits the site).\r\n\r\nThe current weather condition of the selected location will be displayed at\r\nthe viewlet.\r\n\r\n.. image:: https://raw.github.com/collective/collective.weather/master/viewlet.png\r\n :align: center\r\n :alt: The Weather viewlet\r\n\r\nInternals\r\n+++++++++\r\n\r\n.. Note::\r\n This section could be outdated.\r\n\r\nThe weather viewlet uses Javascript in order to change cities, so this will\r\nonly work for Javascript enabled browsers.\r\n\r\nTo render the city weather, there is a \"current-weather\" view that will\r\nrender the latest info it has on weather conditions for a given city.\r\nA cookie is used to get the latest chosen city, and you can override it\r\nby passing a \"city\" argument to the view.\r\n\r\nTo update the city weather, there is a \"update-weather\", that, when called\r\nwithout parameters, it will update all cities from the list.\r\nYou can pass a \"city\" argument to the view, to only update the given city.\r\n\r\nThere's an internal cache for each city (30 minutes), that if not enough\r\ntime has passed, then it will assume the current weather is updated, and\r\nit will not do anything.\r\n\r\nThe Javascript that changes the city, will call this \"update-weather\" for\r\nthe chosen city to update it first. Thanks to this internal cache, this\r\nview will return fast, if not enough time has passed.\r\n\r\nIn order to make it really fast for visitors of your site, you can set-up\r\na clockserver job to call this \"update-weather\" view with no params, once\r\nevery 30 minutes, so weather information for all your cities are ready for\r\nwhen the visitor changes it from the drop-down.\r\n\r\nExtending the package with new weather providers\r\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nIn case you want to contribute with new weather providers for this package or\r\nif you want to add a new one in a custom package for your site you'll just\r\nneed to create a new named utility that should implement\r\n``collective.weather.interfaces.IWeatherInfo``.\r\n\r\n**Weather** control panel will automatically learn about the new utility and\r\nit will be listed as an option in the provider's drop-down.\r\n\r\nThis package already comes with some utilities you can check to get a quick\r\nidea of how to create yours:\r\n\r\n- `yahoo `_\r\n- `forecast.io `_\r\n- `wunderground `_\r\n\r\n`The API for this utility`_ is very simple.\r\n\r\nIn case your utility needs `an API key you can pass it on initialization`_.\r\n\r\nHere's and example you can copy and paste to start your custom utility::\r\n\r\n \"\"\"Example of a named utility for IWeatherInfo.\r\n \"\"\"\r\n from collective.weather.interfaces import IWeatherInfo\r\n from zope.interface import implements\r\n\r\n\r\n class DummyProvider(object):\r\n \"\"\"Dummy weather implementation of IWeatherInfo\r\n \"\"\"\r\n implements(IWeatherInfo)\r\n\r\n def __init__(self, key=None):\r\n self.key = key\r\n\r\n def getWeatherInfo(self, location, units='metric', lang='en'):\r\n \"\"\"Dummy implementation of getWeatherInfo as an example\r\n \"\"\"\r\n return {\r\n 'summary': u'What a lovely day!',\r\n 'temperature': 20,\r\n 'icon': u'lovely-day-icon.png',\r\n }\r\n\r\nNot entirely unlike\r\n-------------------\r\n\r\n`Weather Forecast`_\r\n A very old an unmaintained product, Weather Forecast is a portlet that\r\n will display the observation of the weather. Compatible with Plone 2.5.\r\n\r\n.. _`Forecast.io API`: https://developer.forecast.io/docs/v2\r\n.. _`online tool to get WOEID`: http://woeid.rosselliot.co.nz/lookup\r\n.. _`opening a support ticket`: https://github.com/collective/collective.weather/issues\r\n.. _`Weather Forecast`: http://plone.org/products/ploneweatherforecast\r\n.. _`Yahoo Weather`: http://developer.yahoo.com/weather/\r\n.. _`Yahoo! Weather`: http://weather.yahoo.com/\r\n.. _an API key you can pass it on initialization: https://github.com/collective/collective.weather/blob/master/src/collective/weather/utilities/forecastio.py#L114\r\n.. _The API for this utility: https://github.com/collective/collective.weather/blob/master/src/collective/weather/interfaces.py#L21\r\n.. _Weather Underground: http://www.wunderground.com/weather/api/d/docs?d=data/index&MR=1\r\n.. _WOEID: http://developer.yahoo.com/geo/geoplanet/guide/concepts.html#woeids\r\n\r\nShare and Enjoy\r\n---------------\r\n\r\n``collective.weather`` would not have been possible without the contribution\r\nof the following people:\r\n\r\n- Franco Pellegrini (original author)\r\n- Marcos F. Romero\r\n- H\u00e9ctor Velarde\r\n- Silvestre Huens\r\n- Gonzalo Almeida\r\n- `Tango Desktop Project`_ (icon)\r\n- `Adam Whitcroft's Climacons`_ (icon set)\r\n\r\nDevelopment sponsored by `OpenMultimedia`_.\r\n\r\n.. _`OpenMultimedia`: http://www.openmultimedia.biz/\r\n.. _`Tango Desktop Project`: http://tango.freedesktop.org/\r\n.. _`Adam Whitcroft's Climacons`: http://adamwhitcroft.com/climacons/\r\n\r\nChangelog\r\n---------\r\n\r\nThere's a frood who really knows where his towel is.\r\n\r\n1.0a4 (2014-04-11)\r\n^^^^^^^^^^^^^^^^^^\r\n\r\n.. Warning::\r\n This release includes many changes in the package structure and is not\r\n backwards compatible.\r\n\r\n- Update package documentation.\r\n [marcosfromero, hvelarde]\r\n\r\n- Spanish and Brazilian Portuguese translations were updated. [hvelarde]\r\n\r\n- Refactor weather_utility to use location_id as key. (closes `#36`_).\r\n [marcosfromero]\r\n\r\n- Depend on plone.api and remove dependency on pywapi.\r\n [hvelarde]\r\n\r\n- New named utilities for Forecast.io and Weather Underground (closes `#18`_).\r\n [marcosfromero]\r\n\r\n- New API for named utilities and Yahoo! Weather implementation.\r\n [marcosfromero]\r\n\r\n- The weather portlet is now configurable.\r\n [marcosfromero]\r\n\r\n\r\n1.0a3 (2013-10-29)\r\n^^^^^^^^^^^^^^^^^^\r\n\r\n.. Warning::\r\n This release includes many changes in the package structure and is not\r\n backwards compatible.\r\n\r\n- Spanish and Brazilian Portuguese translations were updated. [hvelarde]\r\n\r\n- Package documentation was updated. [hvelarde]\r\n\r\n- A new option to define whether or not the weather viewlet is visible was\r\n added; by default the viewlet is hidden (closes `#14`_). [hvelarde]\r\n\r\n- Control panel configlet was simplified; now all package settings are defined\r\n in one screen (closes `#19`_). [hvelarde]\r\n\r\n- WeatherUtility is now registered as a global utility as we have no data to\r\n persist on it (closes `#7`_). If you're still stock with a\r\n ``TypeError: ('object.new(WeatherUtility) is not safe...``\r\n error, keep calm an read the section dedicated to **componentregistry.xml**\r\n on `How to make your Plone add-on products uninstall cleanly`_. May the\r\n Force be with you. [hvelarde]\r\n\r\n- Add weather portlet that displays weather conditions of current city\r\n (closes `#9`_). [marcosfromero]\r\n\r\n- Remove all Google Weather related code. [marcosfromero]\r\n\r\n- Weather conditions moved to title tag. [flecox]\r\n\r\n\r\n1.0a2 (2012-09-14)\r\n^^^^^^^^^^^^^^^^^^\r\n\r\n- Made the code to be more resistent to invalid data from the weather server.\r\n [frapell]\r\n\r\n- Major refactoring to allow updates and city changes through AJAX calls\r\n (fixes `#6`_). [frapell]\r\n\r\n- Implemented Yahoo! Weather. [frapell]\r\n\r\n\r\n1.0a1 (2012-08-01)\r\n^^^^^^^^^^^^^^^^^^\r\n\r\n- Initial release.\r\n\r\n.. _`#6`: https://github.com/collective/collective.weather/issues/6\r\n.. _`#7`: https://github.com/collective/collective.weather/issues/7\r\n.. _`#9`: https://github.com/collective/collective.weather/issues/9\r\n.. _`#11`: https://github.com/collective/collective.weather/issues/11\r\n.. _`#14`: https://github.com/collective/collective.weather/issues/14\r\n.. _`#18`: https://github.com/collective/collective.weather/issues/18\r\n.. _`#19`: https://github.com/collective/collective.weather/issues/19\r\n.. _`#36`: https://github.com/collective/collective.weather/issues/36\r\n.. _`How to make your Plone add-on products uninstall cleanly`: http://blog.keul.it/2013/05/how-to-make-your-plone-add-on-products.html", "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/collective/collective.weather", "keywords": "api plone yahoo weather forecast", "license": "GPLv2", "maintainer": "", "maintainer_email": "", "name": "collective.weather", "package_url": "https://pypi.org/project/collective.weather/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.weather/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/collective/collective.weather" }, "release_url": "https://pypi.org/project/collective.weather/1.0a4/", "requires_dist": null, "requires_python": null, "summary": "A Plone package to display the current weather at selected locations inside a portlet or viewlet.", "version": "1.0a4" }, "last_serial": 1145121, "releases": { "1.0a1": [ { "comment_text": "", "digests": { "md5": "3b34bd3898dcbafc2f32a63e0788bcb1", "sha256": "7a7cf45e30fc8290bcbc5ee6ba1f85cf66c178e09b145c6e786f8b2736574f50" }, "downloads": -1, "filename": "collective.weather-1.0a1.zip", "has_sig": false, "md5_digest": "3b34bd3898dcbafc2f32a63e0788bcb1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42216, "upload_time": "2012-08-02T03:16:17", "url": "https://files.pythonhosted.org/packages/ca/e3/429d57b69df816a2dd27a1746936727e9567d31c0ed6f41a0fcf70e55268/collective.weather-1.0a1.zip" } ], "1.0a2": [ { "comment_text": "", "digests": { "md5": "c26a0c3da02ec94f08e48998bb4cd4f8", "sha256": "67891f97ffb84edec01b4f7c35de5e4f081c8e2ae0612db9842ebbdb28231dff" }, "downloads": -1, "filename": "collective.weather-1.0a2.zip", "has_sig": false, "md5_digest": "c26a0c3da02ec94f08e48998bb4cd4f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48313, "upload_time": "2012-09-14T22:22:09", "url": "https://files.pythonhosted.org/packages/36/ce/b894e1b08ac2cf4023cb694fc7ba249a6ad00a0d8711adf72f325d855b69/collective.weather-1.0a2.zip" } ], "1.0a3": [ { "comment_text": "", "digests": { "md5": "b654fee3398057b6cb46d93deab909a4", "sha256": "8c82f07e0ac4e75a32d848fef7786c345acce17048bf241dd58d3b71da7268cb" }, "downloads": -1, "filename": "collective.weather-1.0a3.zip", "has_sig": false, "md5_digest": "b654fee3398057b6cb46d93deab909a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 62300, "upload_time": "2013-10-29T14:06:12", "url": "https://files.pythonhosted.org/packages/4d/a7/0321597861e323c95d406040f0d746afcac14ddc4d708a0a9aa71caecad7/collective.weather-1.0a3.zip" } ], "1.0a4": [ { "comment_text": "", "digests": { "md5": "71db099b82373f6015c76942d8c8c75b", "sha256": "b9ae9e3f7146dabfeb85b2769f6378125f68f9a039558afeede0e6ed2295eb84" }, "downloads": -1, "filename": "collective.weather-1.0a4.zip", "has_sig": false, "md5_digest": "71db099b82373f6015c76942d8c8c75b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 105339, "upload_time": "2014-04-11T18:12:47", "url": "https://files.pythonhosted.org/packages/b5/ae/6051935e4879cb81f6424a67e5909f96c6e6a37aa1639cd2885cf88bcd60/collective.weather-1.0a4.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "71db099b82373f6015c76942d8c8c75b", "sha256": "b9ae9e3f7146dabfeb85b2769f6378125f68f9a039558afeede0e6ed2295eb84" }, "downloads": -1, "filename": "collective.weather-1.0a4.zip", "has_sig": false, "md5_digest": "71db099b82373f6015c76942d8c8c75b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 105339, "upload_time": "2014-04-11T18:12:47", "url": "https://files.pythonhosted.org/packages/b5/ae/6051935e4879cb81f6424a67e5909f96c6e6a37aa1639cd2885cf88bcd60/collective.weather-1.0a4.zip" } ] }