{ "info": { "author": "Daniel Quinn", "author_email": "code@danielquinn.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "django-markers\n##############\n\nA dynamic map marker generator using template images and arbitrary text.\n\n\nWhy\n===\n\nSometimes you need to use a lot of markers on a map, many of which are similar,\nbut slightly different, using text labels, or even different colours or\nopacities. This will do that for you.\n\nTheoretically, you could also use it to caption memes, but I think there's\nother stuff out there for that sort of thing.\n\n\nHow\n===\n\nYou can reference the markers in three ways: using a django template tag, via\nURL parameters, or in Python, by using the ``Marker`` class. The preferred\nmethod is the template tag, and I don't recommend using direct URL requests,\nsince it requires a hit to your application server every time.\n\nUsing a Template Tag:\n---------------------\n\nThis will generate a media URL pointing to a newly-created marker based on a\n``template.png``, with the text ``42``, positioned ``3`` pixels right, and ``3`` pixels\ndown from the upper left corner of the template, with an opacity of ``50%``, a\nhue-shift of ``105``, and using the hex colour ``#333333`` for the text. All of the\narguments, save for the first, are optional:\n\n.. code:: django\n\n {% load markers %}\n {% marker 'path/to/template.png' text='42' text_x=3 text_y=3 opacity=0.5 hue=105 text_colour='333333' %}\n\nTypically, you'll use this in your template to assign marker paths to some\njavascript variables:\n\n.. code:: django\n\n \n\n\nAfter you have the URLs in your Javascript, you can do whatever you like with\nthem, they're just URLs to existing static files.\n\n\nUsing Direct Links\n------------------\n\nThe same arguments passed to the template tag can be passed in a URL:\n\n.. code::\n\n https://localhost:8000/markers/path/to/template.png?text=42&opacity=0.5&text_x=3&text_y=3&text_colour=333333&hue=105\n\n\nUsing the Python Model\n----------------------\n\nMarker generation is as easy as instantiating a model:\n\n.. code:: python\n\n from markers.models import Marker\n\n mymarker = Marker(\n \"path/to/template.png\",\n text=\"42\",\n opacity=0.5,\n text_x=3,\n text_y=3,\n text_colour=\"333333\",\n hue=105\n )\n\n\nThe Templates\n-------------\n\nThe template path you pass to ``django-markers``, must be part of one of your\napps, and referenced as such. So for example, if you have a template living in\n``mapping/static/mapping/img/markers/mytemplate.png``, the argument you're\nlooking for is: ``mapping/img/markers/mytemplate.png``.\n\nIf you're calling the URL directly, then you'll append this path to the URL\nlike so:\n\n.. code::\n\n https://localhost:8000/markers/mapping/img/markers/mytemplate.png?hue=105&opacity=0.8\n\n\nA Note on Text Positioning\n--------------------------\n\nBy default, we try to centre text along the x/y axis, so if that's your\nintention, don't specify either. Specifying an ``x`` value without a ``y`` one\nwill assume ``y`` to be centred and vice versa.\n\n\nA Note on Template Images\n-------------------------\n\nYou can use whatever image you like for your templates, but since the\nhue-shifting starts at red (0), and progresses through the spectrum to red\nagain at 360, you'd do well to use a redish image as your template.\nOtherwise, requests that dont' specify a ``hue`` will look out of step with ones\nthat have ``hue`` set to ``1``.\n\n\n\nInstallation\n============\n\nYou can install it from pypi using ``pip``:\n\n.. code:: bash\n\n $ pip install django-markers\n\n\nOr you can install it from GitHub:\n\n.. code:: bash\n\n $ pip install git+https://github.com/danielquinn/django-markers.git#egg=django-markers\n\n\nThen in your ``settings.py``:\n\n.. code:: python\n\n INSTALLED_APPS = (\n ...\n \"markers\",\n )\n\n\nAnd if you want to make use of the direct URL requests, you'll need to add this\nto your ``urls.py``:\n\n.. code:: python\n\n url(r\"^some/arbitrary/path/\", include(\"markers.urls\")),\n\n\nSo for example, you would have something like this in your ``urls.py``:\n\n.. code:: python\n\n url(r\"^mapping/markers/\", include(\"markers.urls\")),\n\n\n\nRequirements\n------------\n\nWe're doing image processing here, so ``PIL`` is required. You should probably\nuse ``Pillow`` though, since that's what this was developed against.\nAdditionally, ``numpy`` is required to handle the hue-shifting. Both will\ninstall automatically if you follow the installation instructions above.\n\nIn addition to these Python dependencies, Django 1.6+ is required if you\nintend to make use of the on-the-fly generation via calling a specifric URL.\n\n\nLicensing\n---------\n\nThe whole project is licesned under the GPL-3, but the default font used is\nlicensed under Apache 2.0. Both licenses are available under ``COPYING/``.\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/danielquinn/django-markers", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/danielquinn/django-markers", "keywords": "", "license": "GPLv3", "maintainer": "Daniel Quinn", "maintainer_email": "code@danielquinn.org", "name": "django-markers", "package_url": "https://pypi.org/project/django-markers/", "platform": "", "project_url": "https://pypi.org/project/django-markers/", "project_urls": { "Download": "https://github.com/danielquinn/django-markers", "Homepage": "https://github.com/danielquinn/django-markers" }, "release_url": "https://pypi.org/project/django-markers/1.3.2/", "requires_dist": [ "Django (>=1.6)", "Pillow (>=2.0.0)", "numpy (>=1.7.1)" ], "requires_python": "", "summary": "Dynamic map marker generation using template images and arbitrary text", "version": "1.3.2" }, "last_serial": 5708666, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "57047122625f435e8fe9c429c31ffcfc", "sha256": "643557d2038ea2a6dd358a5a51b1bbb75deb266d2b0745de324d3961fd3863e3" }, "downloads": -1, "filename": "django-markers-0.1.1.tar.gz", "has_sig": false, "md5_digest": "57047122625f435e8fe9c429c31ffcfc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 133985, "upload_time": "2013-06-03T12:45:03", "url": "https://files.pythonhosted.org/packages/17/fc/7bbaee08d87976c6c7c2bc9b25dda92801ee8c62e02fa373ebf669912b8a/django-markers-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b83e6db71ae1a2301d56124501750870", "sha256": "369a4d20dfc60421678daaf4cf772b463d907d4879437aafba6fcec0037be46d" }, "downloads": -1, "filename": "django-markers-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b83e6db71ae1a2301d56124501750870", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 133990, "upload_time": "2013-06-03T12:49:17", "url": "https://files.pythonhosted.org/packages/e2/ee/c445b664ebb2c0ac9e4eb0286b93c1f21f1bcca2e0feaa789bf2b1824d3a/django-markers-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "488737938ffe8fc78fba32cc203bf3fc", "sha256": "016db9ef40fe1dfc6dbdaf074aef69505276eb6c77a219a83e693e977ddee2a8" }, "downloads": -1, "filename": "django-markers-0.1.3.tar.gz", "has_sig": false, "md5_digest": "488737938ffe8fc78fba32cc203bf3fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 133996, "upload_time": "2013-06-03T12:55:29", "url": "https://files.pythonhosted.org/packages/0c/eb/49fd7ff0e67e7f4875333594dcb2c4d05ca8f8b2566d29842db87f8222a7/django-markers-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "73e2fd9ccc9b07ae52673260ee395033", "sha256": "b4ebf802c181a3a802b54218fd0a75467cff95a14b0daa4318904bca7c2eb3a6" }, "downloads": -1, "filename": "django-markers-0.1.4.tar.gz", "has_sig": false, "md5_digest": "73e2fd9ccc9b07ae52673260ee395033", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 133988, "upload_time": "2013-06-03T14:11:02", "url": "https://files.pythonhosted.org/packages/9a/d2/19df2f09f222ad04f7c3ace81b72ccf72e6b08680914b66b970ba934ae84/django-markers-0.1.4.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "4618829b75943200499c0bbfe4ea4be9", "sha256": "4dac9ca7a9a9ced2f9bea1ace84bc3a1cf76de646ec4c7a0e95f6884fcea4090" }, "downloads": -1, "filename": "django-markers-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4618829b75943200499c0bbfe4ea4be9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 136214, "upload_time": "2013-06-05T16:31:37", "url": "https://files.pythonhosted.org/packages/be/b2/49ffaffdb9083217dcf41a99a3bfa562206febdc241ea0e8a1b53b153896/django-markers-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "096adc764b52aeb1321bdfbd87668fb0", "sha256": "c1afb4686941e0e649ddbd50e3b6b7994e57093756e6844bb39ddb29016448a5" }, "downloads": -1, "filename": "django-markers-0.2.1.tar.gz", "has_sig": false, "md5_digest": "096adc764b52aeb1321bdfbd87668fb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 136249, "upload_time": "2013-06-06T09:24:42", "url": "https://files.pythonhosted.org/packages/be/49/ca2a8893151c975563fb87e0c8575a3d424b22cfaa075c273b28d984c254/django-markers-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "6035c717505c1724a96e7ee3c1f26d62", "sha256": "c1892100435635ff583ab772be0162393733d764105ca60b6b1f3080095d6bb0" }, "downloads": -1, "filename": "django-markers-0.2.2.tar.gz", "has_sig": false, "md5_digest": "6035c717505c1724a96e7ee3c1f26d62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 131192, "upload_time": "2013-06-07T10:47:10", "url": "https://files.pythonhosted.org/packages/28/e9/b34fe89ae394b67942604576709e84f0c49f6c1b22a9bb8d1de342353cc8/django-markers-0.2.2.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "1bf35acf34165ed24b068319b699f86e", "sha256": "a74dc5a7030ac34e277c04d6166c1dd111dbd3d6301d994b983ac4dff62e0b99" }, "downloads": -1, "filename": "django-markers-1.0.tar.gz", "has_sig": false, "md5_digest": "1bf35acf34165ed24b068319b699f86e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 131575, "upload_time": "2013-12-30T14:29:27", "url": "https://files.pythonhosted.org/packages/4b/c6/4cf4c5cb868f56c00669c1b218bb18262c9c8f65a61f865bfce3f7157e9a/django-markers-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "caffb823005df569f39c866f27c470c8", "sha256": "6f6d855deac7f7e68dc55afffabcebfc8ed5757b24a513612b557b36ab89a1e8" }, "downloads": -1, "filename": "django-markers-1.1.tar.gz", "has_sig": false, "md5_digest": "caffb823005df569f39c866f27c470c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 131288, "upload_time": "2015-01-20T18:04:33", "url": "https://files.pythonhosted.org/packages/62/7a/2b71554eae6533ab5b7cf26dfb3d8cbab0f788d7ccbb3dc40aa3df9ba44c/django-markers-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "af1d68aaa67a5258d41bbae4cb2efb05", "sha256": "e3d8724d159b719c4b725b5bbbe76af15c7501e8db08173717b740e1ddf7b12c" }, "downloads": -1, "filename": "django-markers-1.2.tar.gz", "has_sig": false, "md5_digest": "af1d68aaa67a5258d41bbae4cb2efb05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 131451, "upload_time": "2015-11-11T13:01:52", "url": "https://files.pythonhosted.org/packages/de/01/3d7433e506a6934c643adc90d4e0c895dede3b88484b2b5071fde4dceff5/django-markers-1.2.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "9edd8078a37c2a648605d9b55f149b5f", "sha256": "135a8fc1248a31b4fb2f3fb618fb716a09170bdc06b20014e3dba2104895178e" }, "downloads": -1, "filename": "django_markers-1.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9edd8078a37c2a648605d9b55f149b5f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 114773, "upload_time": "2019-05-08T08:52:56", "url": "https://files.pythonhosted.org/packages/cc/bb/f8d4a03280654ea5ba180a759290a238990a332bc87ec75380778aa66e48/django_markers-1.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dea811b6c85abb96b463f8357c40e948", "sha256": "8431eea491c2c22e573d42f21f3caf01a5043d114f78541e39261320215130a8" }, "downloads": -1, "filename": "django-markers-1.3.0.tar.gz", "has_sig": false, "md5_digest": "dea811b6c85abb96b463f8357c40e948", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 129566, "upload_time": "2019-05-08T08:56:18", "url": "https://files.pythonhosted.org/packages/04/9a/0b58447de69ed897914be5dd628847379325a6ce812acf41204b42eb1f0d/django-markers-1.3.0.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "0a1f73af99e4f5cd595f02986b268e95", "sha256": "6c65181be64d9b23256d5e718bf5fc665395bd984bf016e58b72d73c8a01bc5f" }, "downloads": -1, "filename": "django_markers-1.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0a1f73af99e4f5cd595f02986b268e95", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 114851, "upload_time": "2019-08-05T08:25:30", "url": "https://files.pythonhosted.org/packages/5d/d5/8d0e43d5e86015d67044f9f2766ae8ff3f16a1cca5a8b5fbb0a584fbadef/django_markers-1.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6026f50dcb0398e97eb03d173713866b", "sha256": "6ddd0c1b8b59ceedae68f30db81dbe052b2a8bd28bc0f3e446b36c8428deb747" }, "downloads": -1, "filename": "django-markers-1.3.1.tar.gz", "has_sig": false, "md5_digest": "6026f50dcb0398e97eb03d173713866b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 129795, "upload_time": "2019-08-05T08:25:33", "url": "https://files.pythonhosted.org/packages/6d/92/2e4b89724a3c01aca40d5a9dce7e48a99b75c0a1ba9d314879da891aff71/django-markers-1.3.1.tar.gz" } ], "1.3.2": [ { "comment_text": "", "digests": { "md5": "d755a56717eabd97d5467c4f2531a1cc", "sha256": "c20462e6474ab065b0cb5f05edb360992262b35c0867d86e3202a49f7c8b297e" }, "downloads": -1, "filename": "django_markers-1.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d755a56717eabd97d5467c4f2531a1cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 114871, "upload_time": "2019-08-21T11:09:33", "url": "https://files.pythonhosted.org/packages/35/fe/78a0d7cba8f6007271e74d638443835e0b963a4472753c01eef38aee87c9/django_markers-1.3.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2e6fad7faafa3603215d7381c353357a", "sha256": "68c93169352a0e14993e36bb868ef19416119516b54e4f4aff0432453eaaf693" }, "downloads": -1, "filename": "django-markers-1.3.2.tar.gz", "has_sig": false, "md5_digest": "2e6fad7faafa3603215d7381c353357a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 129805, "upload_time": "2019-08-21T11:09:37", "url": "https://files.pythonhosted.org/packages/f4/7a/74d892b3484147716a12d2a307029d4c859c6bc261c7be8c0413ff4b0300/django-markers-1.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d755a56717eabd97d5467c4f2531a1cc", "sha256": "c20462e6474ab065b0cb5f05edb360992262b35c0867d86e3202a49f7c8b297e" }, "downloads": -1, "filename": "django_markers-1.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d755a56717eabd97d5467c4f2531a1cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 114871, "upload_time": "2019-08-21T11:09:33", "url": "https://files.pythonhosted.org/packages/35/fe/78a0d7cba8f6007271e74d638443835e0b963a4472753c01eef38aee87c9/django_markers-1.3.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2e6fad7faafa3603215d7381c353357a", "sha256": "68c93169352a0e14993e36bb868ef19416119516b54e4f4aff0432453eaaf693" }, "downloads": -1, "filename": "django-markers-1.3.2.tar.gz", "has_sig": false, "md5_digest": "2e6fad7faafa3603215d7381c353357a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 129805, "upload_time": "2019-08-21T11:09:37", "url": "https://files.pythonhosted.org/packages/f4/7a/74d892b3484147716a12d2a307029d4c859c6bc261c7be8c0413ff4b0300/django-markers-1.3.2.tar.gz" } ] }