{ "info": { "author": "4teamwork AG", "author_email": "mailto:info@4teamwork.ch", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Framework :: Plone :: 4.3", "Framework :: Plone :: 5.1", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. contents:: Table of Contents\n\n\nIntroduction\n============\n\nPlone extension providing smart logo handling.\nBased on an svg Logo or Icon the extension is able to produce all kinds\nof scales such as apple touch icons or android PWA logos.\n\nCompatibility\n-------------\n\nPlone 4.3.x\nPlone 5.1.x\n\nPrerequisites\n=============\n\nSee `wand.py dependencies `_\n\n\nOSX (High Sierra)\n-----------------\n\nTwo important points for developers.\n\nIf you experience problems converting some svg's to png's, like getting a all transparent\nPNG. Install imagemagick with librsvg. Also don't install imagemagick version 7. Not gonna work.\n\n.. code-block:: sh\n\n brew install imagemagick@6 --with-librsvg\n brew link imagemagick@6 --force\n\n\nAlso make sure `/usr/local/opt/imagemagick@6/bin` is in the PATH\n\n\nInstallation\n============\n\n- Add the package to your buildout configuration:\n\n.. code-block:: ini\n\n [instance]\n eggs +=\n ...\n ftw.logo\n\n\nDevelopment\n===========\n\n1. Fork this repo\n2. Clone your fork\n3. Shell: ``ln -s development.cfg buildout.cfg``\n4. Shell: ``python bootstrap.py``\n5. Shell: ``bin/buildout``\n\nRun ``bin/test`` to test your changes.\n\nOr start an instance by running ``bin/instance fg``.\n\nScales\n======\n\nBasically there are just logo and icon scales.\nThe logo scales are mostly used on the top left and can have\nany dimensions. The converter creates a ``logo`` and ``mobile_logo`` from the\nbase logo which has to be an svg file.\nThe icon scales are used for ``apple_touch_icons``, ``favicons`` or ``android PWA icons``.\nThe base icon must be square, and the scaled icons will also if course be square.\nIn summary we need two different SVG source files. One with an arbitary ratio\nand the other with a square ratio.\n\nAll scales are taken from https://realfavicongenerator.net/.\n\nThe available scales are:\n\n- LOGOS\n - LOGO\n - MOBILE_LOGO\n - BASE\n - get_logo (virtual)\n- ICONS\n - APPLE_TOUCH_ICON\n - FAVICON_32X32\n - FAVICON_16X16\n - MSTILE_150X150\n - ANDROID_192X192\n - ANDROID_512X512\n - FAVICON\n - BASE\n\n\n\"get_logo\" scale\n-----------------\n\nThe get_logo virtual scale returns either the BASE (svg from ZCML) or if available the overridden\nBASE or LOGO scale from the Dexterity content type.\n\n\nConverter\n=========\n\nThe converter holds all the scale definitions and so is able to generate\nthe scales needed. `wand.py `_ is used\nto convert the svg source files into the different scales.\nThe converter generates a modified ``wand.py``\nimage proxy which is able to return the actual blob of the scale behind the proxy.\nRefer to the `write images `_ and\n`resizing and cropping `_\nsection for more information about how the converter uses ``wand.py``.\n\nZCML\n====\n\nThe extension introduces a custom icon and logo directive for zcml.\nBoth directives accept ``for``, ``layer`` and ``base`` attributes.\nThe base attribute defines the svg source files for all scales.\nThe multiadapter adapts context and request. So the svg source file\ncan be overridden by using one or both of ``for`` and ``layer``.\n\nFirst include the directive:\n\n.. code-block:: xml\n\n \n\nExample:\n\n.. code-block:: xml\n\n \n\nThe next block will override the previous config.\n\n.. code-block:: xml\n\n \n\n\nIt's also possible to define a pre scaled image for `logo`, `mobile` and `favicon`.\n\n.. code-block:: xml\n\n \n\n \n\n\nPlease remember a base svg is required anyway. If you can't supply one, simply put in a transparent empty svg.\nIf you dont't have one you can use the one from this package, which is located in the resources folder. It's called min.svg. Also set the primary_logo_scale to \"logo\", since ftw.logo always prefers the svg over all other scales.\n\n\nChange default height for logo and mobile scale by zcml:\n\n.. code-block:: xml\n\n \n\n\nLogo View\n=========\n\nAll logos and icons can be accessed through the logo browser view.\nThe URL consists of the browser view name ``@@logo`` followed by the type of the\nimage and the actual scale.\n\nExamples:\n\n- ``@@logo/logo/BASE`` will show the svg logo source.\n- ``@@logo/icon/APPLE_TOUCH_ICON`` will show the apple touch icon as a png image.\n\nCaching\n=======\n\nCaching is provided by adding a query string parameter to every logo request.\nThe cachekey consist of a sha256 hash including the files binary data.\nIf you have plone.app.caching enabled, install the `caching` profile from ftw.logo.\nThis will define etag values so the viewlet is cached properly.\n\nLinks\n=====\n\n- Github: https://github.com/4teamwork/ftw.logo\n- Issues: https://github.com/4teamwork/ftw.logo/issues\n- Pypi: http://pypi.python.org/pypi/ftw.logo\n\n\nCopyright\n=========\n\nThis package is copyright by `4teamwork `_.\n\n``ftw.logo`` is licensed under GNU General Public License, version 2.\n\nChangelog\n=========\n\n\n1.0.2 (2019-07-05)\n------------------\n\n- Use default configured workflow. [busykoala]\n\n\n1.0.1 (2019-06-21)\n------------------\n\n- Remove newline in filename. [busykoala]\n\n\n1.0.0 (2019-06-20)\n------------------\n\n- Add Plone 5.1 support. [busykoala]\n- Initial implementation.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/4teamwork/ftw.logo", "keywords": "ftw logo", "license": "GPL2", "maintainer": "", "maintainer_email": "", "name": "ftw.logo", "package_url": "https://pypi.org/project/ftw.logo/", "platform": "", "project_url": "https://pypi.org/project/ftw.logo/", "project_urls": { "Homepage": "https://github.com/4teamwork/ftw.logo" }, "release_url": "https://pypi.org/project/ftw.logo/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "ftw.logo", "version": "1.0.2" }, "last_serial": 5823398, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "4b72a7dd007fc98f5aa085f156010428", "sha256": "b8ad4066f723183069858f1a3d55e74011da85caac92f782d1714887d50eb317" }, "downloads": -1, "filename": "ftw.logo-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4b72a7dd007fc98f5aa085f156010428", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44925, "upload_time": "2019-06-20T09:05:37", "url": "https://files.pythonhosted.org/packages/58/cb/19cc483ce4a735654284067d841f17b06ff8240c1230d0c7d0f552849cee/ftw.logo-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "f9d6169c886f6afd1310249795bd4c70", "sha256": "092d7be0c7741d944c9977e579cf1665b0202f98086c8d8bc9d2f0af23b8613f" }, "downloads": -1, "filename": "ftw.logo-1.0.1.tar.gz", "has_sig": false, "md5_digest": "f9d6169c886f6afd1310249795bd4c70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44994, "upload_time": "2019-06-21T12:41:23", "url": "https://files.pythonhosted.org/packages/a3/d8/4b8ade986ca07a98b4de971103a675422cb8e4c974e64da0f376a6d71d9b/ftw.logo-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "f37905e5cfd1292cf7e89d3d580a4a62", "sha256": "752eb7bd6b647621228b052d6fb680b5ee493ec8db0e42ae3235102607e60dd6" }, "downloads": -1, "filename": "ftw.logo-1.0.2.tar.gz", "has_sig": false, "md5_digest": "f37905e5cfd1292cf7e89d3d580a4a62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44839, "upload_time": "2019-07-05T09:19:15", "url": "https://files.pythonhosted.org/packages/eb/71/b1c2a8f2a45bc25e9fde002c9c4e6e01159aa346477f9f17f6febf290362/ftw.logo-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f37905e5cfd1292cf7e89d3d580a4a62", "sha256": "752eb7bd6b647621228b052d6fb680b5ee493ec8db0e42ae3235102607e60dd6" }, "downloads": -1, "filename": "ftw.logo-1.0.2.tar.gz", "has_sig": false, "md5_digest": "f37905e5cfd1292cf7e89d3d580a4a62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44839, "upload_time": "2019-07-05T09:19:15", "url": "https://files.pythonhosted.org/packages/eb/71/b1c2a8f2a45bc25e9fde002c9c4e6e01159aa346477f9f17f6febf290362/ftw.logo-1.0.2.tar.gz" } ] }