{ "info": { "author": "David Schenck", "author_email": "zero2cx@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "SpiralMatrix\n============\n\nGenerate a square 2-d matrix with an outward-spiraling series of elements\n-------------------------------------------------------------------------\n\nA matrix in the context of this code module is a python list whose\nelements are made up of a number of other lists which are uniform\nin terms of their element count. This list-of-lists structure thus\nforms a two-dimensional grid, a matrix, filled with individual cells.\n\n.. figure:: https://github.com/zero2cx/spiral-matrix/raw/master/docs/images/spiral_matrix_5.png\n :alt: 5x5 spiral matrix\n\n 5x5 spiral matrix\n\nA spiral matrix is a particular type of squared-shaped matrix where\neach cell is populated with one value from a series of elements. The\n'spiral' in 'spiral matrix' refers to the condition that each cell is\nprogressively populated with a value from the series following a\npattern that conforms to a tightly-wound spiral. This spiral\nprogression begins from the center cell, moving outward. Ultimately,\nthe entire matrix is populated with elements from the series.\n\n.. figure:: https://github.com/zero2cx/spiral-matrix/raw/master/docs/images/spiral_matrix_5+command_line.png\n :alt: 5x5 including command-line\n\n 5x5 including command-line\n\nThe remainder of this document details the practical application of\nexecuting spiral-matrix from the command-line. For an explanation of\napi usage when importing as a Python 3.x module, please `click here `__.\n\nRequired parameter\n^^^^^^^^^^^^^^^^^^\n\n::\n\n DIMENSION\n This parameter is an integer value, and is limited\n to odd numbers only. This count of rows and columns\n constitute the constructed size of the the square-\n shaped 2-d matrix. (REQUIRED)\n\nGeneral-purpose options\n^^^^^^^^^^^^^^^^^^^^^^^\n\nColumn and row axis-labels along the top- and left-side can be\nprefixed to the printed output. Proceeding outward from the center\ncell in one compass direction or bearing, i.e East, North, West, or\nSouth, initiates the progression of the spiral. The spiral can be\nconfigured to progress in either a clockwise or counter-clockwise\nmanner.\n\n.. figure:: https://github.com/zero2cx/spiral-matrix/raw/master/docs/images/spiral_matrix_7+axes+bearing_south+center1000+step-300.png\n :alt: 7x7 with axes, bearing: south, center: 1000, step: -300\n\n 7x7 with axes, bearing: south, center: 1000, step: -300\n\n::\n\n --axes\n This parameter-less option enables or disables the\n prefixing of column- and row-axes labels along the\n top- and left-side of the printed output.\n (default: False)\n\n --bearing EAST | NORTH | WEST | SOUTH\n This compass bearing (E, N, W, or S) specifies\n the direction that is used to proceed initially\n outward from the center of the matrix.\n (default: E)\n\n --right\n This parameter-less option generates a spiral\n which progresses in a clockwise manner. Not for use\n with 'left'. (default: not used)\n\n --left\n This parameter-less option generates a spiral\n which progresses in a counter-clockwise manner,\n which is the default behavior. Not for use with\n 'right'. Included for completeness.\n\nOptions for the default style of integer-populated matrix cells\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe default style for the generated matrix consists of the series of\nintegers that begin with '1' and then increments by '1' for each\nelement of the series. Either of these integer values may be modified\nin order to change the generated matrix\u2019s cell contents. Any positive\nor negative integer, or zero, is acceptable to occupy the center cell\nthat starts the spiral. The increment integer must be a positive or\nnegative, non-zero integer.\n\nUse of the following options will modify the implementation of the\ndefault behavior.\n\n::\n\n --center INTEGER\n This integer value is used to populate the center\n cell that begins the spiral. (default: 1)\n\n --step INTEGER\n This integer value is used to increment the next\n cell's value as the spiral progresses from cell to\n cell. (default: 1)\n\nOptions for the alternative style of token-populated matrix cells\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAs an alternative to populating the cells with a series of\nincrementing integers, a string of whitespace-delimited text\nelements, or word tokens, can be supplied. This string of tokens\nmight consist of any combination of words, numbers, punctuation,\nor whitespace. The token string can be read from a file or stdin,\nor provided via command-line parameter.\n\n.. figure:: https://github.com/zero2cx/spiral-matrix/raw/master/docs/images/spiral_matrix_5+axes+bearing_south+right+file_lorem_ipsum.png\n :alt: 5x5 with axes, bearing: south, series: lorem_ipsum\n\n 5x5 with axes, bearing: south, series: lorem_ipsum\n\nUse of either of the following options will replace the default\nbehavior of populating the cells with a series of incrementing\nintegers.\n\n::\n\n --file FILENAME\n The specified file should contain some amount of\n whitespace-delimited text elements. The cells of\n the matrix are then populated using these elements.\n Usage of the 'words' option is excluded when using\n this option. (default: not used)\n\n --words [STRING]\n This string of whitespace-delimited text elements\n is used to populate the cells of the matrix. When\n this option is present with no string parameter\n given, then string is read from stdin. When\n utilizing stdin for string input, this option needs\n to be the last option provided on the command-line.\n Usage of the 'file' option is excluded when using\n this option. (default: not used)\n\n|\n\n.. figure:: https://github.com/zero2cx/spiral-matrix/raw/master/docs/images/spiral_matrix_9+right+words_stormy_night.png\n :alt: 9x9, spiral: right, series: stormy_night\n\n 9x9, spiral: right, series: stormy_night\n\n--------------\n\npypi: https://pypi.python.org/pypi/spiral-matrix\n\ncode repo: https://github.com/zero2cx/spiral-matrix\n\nlicense: GPL3+\n\ndocument version: 1.1\n\nmodified: 01/17/2018\n\nauthor: David Schenck\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/zero2cx/spiral-matrix", "keywords": "spiral-matrix", "license": "GPL3+", "maintainer": "", "maintainer_email": "", "name": "spiral-matrix", "package_url": "https://pypi.org/project/spiral-matrix/", "platform": "", "project_url": "https://pypi.org/project/spiral-matrix/", "project_urls": { "Homepage": "https://github.com/zero2cx/spiral-matrix" }, "release_url": "https://pypi.org/project/spiral-matrix/0.1.4/", "requires_dist": null, "requires_python": "", "summary": "Generate a square 2-d matrix with an outward-spiraling series of elements", "version": "0.1.4" }, "last_serial": 3507934, "releases": { "0.1.2a5": [ { "comment_text": "", "digests": { "md5": "7de71fe661fbb9217354b08505e85f8c", "sha256": "c92c5ee6d9100bb62f7b9bf5744ffe2648f735c51971d00cb4e0439dc455de6c" }, "downloads": -1, "filename": "spiral-matrix-0.1.2a5.tar.gz", "has_sig": false, "md5_digest": "7de71fe661fbb9217354b08505e85f8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 136720, "upload_time": "2018-01-18T01:52:26", "url": "https://files.pythonhosted.org/packages/67/81/58c5953fbdb0559dd2d3bf4109b46267028040bc063c88b9ff20dae258f5/spiral-matrix-0.1.2a5.tar.gz" } ], "0.1.3a1": [ { "comment_text": "", "digests": { "md5": "51453d38c865cf5d06d29e95fad5ce51", "sha256": "7c6ce94ed6977bd20d2a4183af318d1e4f833926341fd5173819cf9605d2c907" }, "downloads": -1, "filename": "spiral-matrix-0.1.3a1.tar.gz", "has_sig": false, "md5_digest": "51453d38c865cf5d06d29e95fad5ce51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 136898, "upload_time": "2018-01-18T03:19:47", "url": "https://files.pythonhosted.org/packages/74/cd/a5ddd077961837356557e178e2a36505bf7e180db2c8bc606c22b9b2425c/spiral-matrix-0.1.3a1.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "570449d27f5ee32bc8ef27ec631745e3", "sha256": "7d5df65ee3954443636dfa400c9e6b187b7fae1a4a0c9beb3d6ecba38badee9a" }, "downloads": -1, "filename": "spiral-matrix-0.1.4.tar.gz", "has_sig": false, "md5_digest": "570449d27f5ee32bc8ef27ec631745e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 136953, "upload_time": "2018-01-21T01:39:33", "url": "https://files.pythonhosted.org/packages/9d/29/b8955fab2a4e0759d24b95f6188c15d90204ae48354451a24ac7d19a1f9a/spiral-matrix-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "570449d27f5ee32bc8ef27ec631745e3", "sha256": "7d5df65ee3954443636dfa400c9e6b187b7fae1a4a0c9beb3d6ecba38badee9a" }, "downloads": -1, "filename": "spiral-matrix-0.1.4.tar.gz", "has_sig": false, "md5_digest": "570449d27f5ee32bc8ef27ec631745e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 136953, "upload_time": "2018-01-21T01:39:33", "url": "https://files.pythonhosted.org/packages/9d/29/b8955fab2a4e0759d24b95f6188c15d90204ae48354451a24ac7d19a1f9a/spiral-matrix-0.1.4.tar.gz" } ] }