{ "info": { "author": "Serge \u00c9mond", "author_email": "serge@sergeemond.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "License :: OSI Approved :: BSD License", "Topic :: Utilities" ], "description": "# Computing dimensions for a perfect print\n\n> Compute the mat dimensions and the borders of\n> a print so the window is optically centered\n> somewhat based on the golden ratio.\n\n## The Purpose\n\nI like to print my photographs. I'm also too cheap to frame them, however I do \u201cmat\u201d them.\n\nIn case you don't know, normally a print is:\n\n1. printed\n2. a *mat* is cut, the mat is bigger than the print, and has a window through which you can see the print (that window can be bigger or smaller than the print)\n3. the print is mounted between the mat and a cardboard\n4. a window (glass or plastic) is put in *front* of the mat (the mat can draw attention to the print, but its main purpose is to put space between the print and the window so they don't touch)\n5. all that stuff is placed in the frame\n6. the frame is stuck on a wall.\n\nSo sometimes I do steps 1, 2, 3 and 6, sometimes 1, 3 and 6, and sometimes just 1. Depends on how I feel :)\n\nAnyway, so each time I print something, I have to decide on a border.\n\nThen there the optical illusion of the print \"sinking\" into the frame, requiring a wider bottom border to compensate.\n\nAnd then there's the top border.. I think it's ugly when it's smaller than the side borders.\n\nAnd so this little piece of code does just that.. compute everything so I don't have to think.\n\n## Border sizes\n\nWe find the \u201cgolden ratio\u201d in many places, including in theories for choosing a mat size.\n\nTo choose the dimensions of a mat, some people multiply the width and the height of the print by the golden ratio. Some think it adds way too much border. And for landscapes.. this causes the top border to be smaller than the size borders.\n\nOthers compute the *surface* of the print, multiply by the golden ratio, and use that for the size of the mat.\n\nPersonnally, what I do is to compute the *surface* of the mat using the *surface* of the print multiplied by some factor (mostly the golden ratio times its square root). Then I keep this surface constant and compute the borders so I obtain:\n\n1. top, left and right borders of equal size\n2. bottom border bigger to \"optically center\" the print\n\nSee a [small document I made about this](https://bytebucket.org/greyw/golden-borders/raw/master/reflections/doc.pdf) to organize my thoughts.\n\n## Installation\n\n```console\npip install golden-borders\n```\n\n## Usage\n\n`golden-borders` takes these arguments:\n\n```console\ngolden-borders [OPTIONS] PRINT_DIMS\n```\n\nwhere `PRINT_DIMS` is a dimension pair representing either the size of the *mat*, or the size of the *print* (default = print).\n\nThe `OPTIONS` may be:\n\n`--units TEXT` (default, `mm`)\n: The units. This represents the default for all inputs, and also the units for the output. The units may be `mm`, `cm`, `dm`, `in`, `ft`.\n\n`--mat` / `--print` (default: `print`)\n: If `mat`, then the `PRINT_DIMS` are the dimensions of the mat, else the dimensions of the print.\n\n`--paper TEXT`\n: If specified, this is the dimensions of the paper. Print is assumed to be centered.\n\n`--overlap TEXT`\n: The overlap of the window over the print. TEXT can be a single or a pair of dimensions. This dimension represents the overlap on *each side*. (e.g. 2x3 means 2mm each size, 3mm top/bottom)\n\n`--border TEXT`\n: Specify the value to use for the top, left and right borders. The bottom border is still computed.\n\n`--factor TEXT`\n: This is the multiplicator for the area computation. May be a number, or `golden` to use the golden ratio. The default is `golden`.\n\n`--exp TEXT`\n: This is the exponent of the factor. Simply a convenience for the golden ratio. The default is `1`, except for `factor = golden`, in which case it's `1.5`.\n\n\n# Miscellaneous\n\nThe code is formatted using the [Black](https://github.com/ambv/black) code style.\n\n# License\n\nThis is released under a [BSD 3-Clause License](http://opensource.org/licenses/BSD-3-Clause). This basically means:\n\n- You can do what you want with it, as long as the copyright notice, the conditions and the disclaimer stay.\n- You cannot use the name of the copyright holder or contributors to endorse or promote derived products.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/semond/golden-borders", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "golden-borders", "package_url": "https://pypi.org/project/golden-borders/", "platform": "", "project_url": "https://pypi.org/project/golden-borders/", "project_urls": { "Homepage": "https://github.com/semond/golden-borders" }, "release_url": "https://pypi.org/project/golden-borders/1.2.0/", "requires_dist": null, "requires_python": ">=3.3", "summary": "Optically center the window of a print by computing the mat/print sizes.", "version": "1.2.0" }, "last_serial": 4629839, "releases": { "1.1": [ { "comment_text": "built for Darwin-13.3.0", "digests": { "md5": "847a523c3cfe08c7179b7f5bbce8012a", "sha256": "80a36df726b38c5f43591639e4865a34c0f4a44bf6a6077e506e023f2a58c9b4" }, "downloads": -1, "filename": "golden-borders-1.1.macosx-10.9-x86_64.tar.gz", "has_sig": false, "md5_digest": "847a523c3cfe08c7179b7f5bbce8012a", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 8214, "upload_time": "2014-08-25T01:59:19", "url": "https://files.pythonhosted.org/packages/05/3e/cdb09fb297f7207fe5debef69360b8102f11a6c677a5e529ece25bcdfb62/golden-borders-1.1.macosx-10.9-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "c90eac3d4dea239b15b54a2897c8ca88", "sha256": "c9755cb0d1cc40af5c37eb58027c0aeeb816bfd31051e6886ebf0ab8ad61b019" }, "downloads": -1, "filename": "golden-borders-1.1.tar.gz", "has_sig": false, "md5_digest": "c90eac3d4dea239b15b54a2897c8ca88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6838, "upload_time": "2014-08-25T01:59:16", "url": "https://files.pythonhosted.org/packages/cd/4f/cbb97dbc670d989e8f63dce0bb30da05a850ca9995170e1d555ba086d17c/golden-borders-1.1.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "1bc6954643cd7253355639a649b73a3b", "sha256": "440b647eda44b27043f484c093584d71cc714c6c048d3ece837f4c9811bcc8f7" }, "downloads": -1, "filename": "golden-borders-1.2.0.tar.gz", "has_sig": false, "md5_digest": "1bc6954643cd7253355639a649b73a3b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.3", "size": 7250, "upload_time": "2018-12-23T17:35:35", "url": "https://files.pythonhosted.org/packages/29/54/03b15fafa595e9e4eb0baa807d71ac2e5317eba26fe56ba8957451516eb6/golden-borders-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1bc6954643cd7253355639a649b73a3b", "sha256": "440b647eda44b27043f484c093584d71cc714c6c048d3ece837f4c9811bcc8f7" }, "downloads": -1, "filename": "golden-borders-1.2.0.tar.gz", "has_sig": false, "md5_digest": "1bc6954643cd7253355639a649b73a3b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.3", "size": 7250, "upload_time": "2018-12-23T17:35:35", "url": "https://files.pythonhosted.org/packages/29/54/03b15fafa595e9e4eb0baa807d71ac2e5317eba26fe56ba8957451516eb6/golden-borders-1.2.0.tar.gz" } ] }