{ "info": { "author": "Aptivate", "author_email": "info@aptivate.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": "========================\nckanext-datasetthumbnail\n========================\n\nThis CKAN extension adds support for generation and display of thumbnail\nimages. The helper function ``thumbnail_url`` can be called from a template, as in this example:\n\n::\n\n {% block thumbnail %}\n {% set thumbnail = h.thumbnail_url(package.id) %}\n {% if thumbnail %}\n \n \n \n {% endif %}\n {% endblock %}\n\n* If a resource exists with the name ``thumbnail.png``, this will be used.\n* If no resource exists with this name and the logged-in user has sufficient access, the thumbnail will be generated from the first matching JPEG or PNG resource.\n* If no thumbnail exists at this point, a placeholder image will be used.\n\n\n------------\nRequirements\n------------\n\n* CKAN 2.5.2\n* Pillow 3.2.0 (with PngImagePlugin and JpegImagePlugin)\n\n------------\nInstallation\n------------\n\n.. Add any additional install steps to the list below.\n For example installing any non-Python dependencies or adding any required\n config settings.\n\nTo install ckanext-datasetthumbnail:\n\n1. Activate your CKAN virtual environment, for example::\n\n . /usr/lib/ckan/default/bin/activate\n\n2. Install the ckanext-datasetthumbnail Python package into your virtual environment::\n\n pip install ckanext-datasetthumbnail\n\n3. Add ``datasetthumbnail`` to the ``ckan.plugins`` setting in your CKAN\n config file (by default the config file is located at\n ``/etc/ckan/default/production.ini``).\n\n4. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu::\n\n sudo service apache2 reload\n\n\n---------------\nConfig Settings\n---------------\n\n::\n\n # Show thumbnails\n # (optional, default: False).\n ckan.datasetthumbnail.show_thumbnail = True\n\n # Autogenerate thumbnails\n # (optional, default: False).\n ckan.datasetthumbnail.auto_generate = True\n\n # Generated thumbnail width\n # (optional, default: 140).\n ckan.datasetthumbnail.thumbnail_width = 140\n\n # Generated thumbnail height\n # (optional, default: int(width * 1.415)\n ckan.datasetthumbnail.thumbnail_height = 140\n\n\n------------------------\nDevelopment Installation\n------------------------\n\nTo install ckanext-datasetthumbnail for development, activate your CKAN virtualenv and\ndo::\n\n git clone https://github.com/aptivate/ckanext-datasetthumbnail.git\n cd ckanext-datasetthumbnail\n python setup.py develop\n pip install -r dev-requirements.txt\n\n\n-----------------\nRunning the Tests\n-----------------\n\nTo run the tests, do::\n\n nosetests --nologcapture --with-pylons=test.ini\n\nTo run the tests and produce a coverage report, first make sure you have\ncoverage installed in your virtualenv (``pip install coverage``) then run::\n\n nosetests --nologcapture --with-pylons=test.ini --with-coverage --cover-package=ckanext.datasetthumbnail --cover-inclusive --cover-erase --cover-tests\n\n\n--------------------------------------------\nRegistering ckanext-datasetthumbnail on PyPI\n--------------------------------------------\n\nckanext-datasetthumbnail should be availabe on PyPI as\nhttps://pypi.python.org/pypi/ckanext-datasetthumbnail. If that link doesn't work, then\nyou can register the project on PyPI for the first time by following these\nsteps:\n\n1. Create a source distribution of the project::\n\n python setup.py sdist\n\n2. Register the project::\n\n python setup.py register\n\n3. Upload the source distribution to PyPI::\n\n python setup.py sdist upload\n\n4. Tag the first release of the project on GitHub with the version number from\n the ``setup.py`` file. For example if the version number in ``setup.py`` is\n 0.0.1 then do::\n\n git tag 0.0.1\n git push --tags\n\n\n---------------------------------------------------\nReleasing a New Version of ckanext-datasetthumbnail\n---------------------------------------------------\n\nckanext-datasetthumbnail is availabe on PyPI as https://pypi.python.org/pypi/ckanext-datasetthumbnail.\nTo publish a new version to PyPI follow these steps:\n\n1. Update the version number in the ``setup.py`` file.\n See `PEP 440 `_\n for how to choose version numbers.\n\n2. Create a source distribution of the new version::\n\n python setup.py sdist\n\n3. Upload the source distribution to PyPI::\n\n python setup.py sdist upload\n\n4. Tag the new release of the project on GitHub with the version number from\n the ``setup.py`` file. For example if the version number in ``setup.py`` is\n 0.0.2 then do::\n\n git tag 0.0.2\n git push --tags", "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/aptivate/ckanext-datasetthumbnail", "keywords": "CKAN thumbnail", "license": "AGPL", "maintainer": null, "maintainer_email": null, "name": "ckanext-datasetthumbnail", "package_url": "https://pypi.org/project/ckanext-datasetthumbnail/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ckanext-datasetthumbnail/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/aptivate/ckanext-datasetthumbnail" }, "release_url": "https://pypi.org/project/ckanext-datasetthumbnail/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "Generates thumbnails for datasets.", "version": "1.0.1" }, "last_serial": 2213928, "releases": { "0.0.1": [], "1.0.1": [ { "comment_text": "", "digests": { "md5": "366787029c7e4d49fe9b185cc1945a3f", "sha256": "bdeb653ee3f6e3544a886170b274eab8027c4edf2ef9d6676c1b46340e982c8d" }, "downloads": -1, "filename": "ckanext-datasetthumbnail-1.0.1.tar.gz", "has_sig": false, "md5_digest": "366787029c7e4d49fe9b185cc1945a3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7122, "upload_time": "2016-07-11T10:01:22", "url": "https://files.pythonhosted.org/packages/ae/a4/9c626d8b363beca3aff996269a2d58eed35641bf0db456c5b8463292d808/ckanext-datasetthumbnail-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "366787029c7e4d49fe9b185cc1945a3f", "sha256": "bdeb653ee3f6e3544a886170b274eab8027c4edf2ef9d6676c1b46340e982c8d" }, "downloads": -1, "filename": "ckanext-datasetthumbnail-1.0.1.tar.gz", "has_sig": false, "md5_digest": "366787029c7e4d49fe9b185cc1945a3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7122, "upload_time": "2016-07-11T10:01:22", "url": "https://files.pythonhosted.org/packages/ae/a4/9c626d8b363beca3aff996269a2d58eed35641bf0db456c5b8463292d808/ckanext-datasetthumbnail-1.0.1.tar.gz" } ] }