{ "info": { "author": "Jean Daniel Browne", "author_email": "jeandaniel.browne@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: Unix", "Programming Language :: Python :: 2", "Programming Language :: Unix Shell", "Topic :: Documentation", "Topic :: Education", "Topic :: Software Development :: Testing", "Topic :: Utilities" ], "description": "Wordish is a script which executes a shell session parsed from a\ndocumentation in the restructured text [#]_ format, then tests and builds a\nreport of the execution. To mark up shell code in an article,\n*wordish* uses the custom directive ``sourcecode``, with the rquired\nargument ``sh``. When presented with an article:\n\n#. *wordish* filters out the text which is not marked with\n ``sourcecode``,\n\n#. then, separates the blocks of shell codes between *commands* and\n *outputs*: \n\n #. *wordish* consumes the prompt, parses for the newline which ends\n command,\n\n #. then parses for the prompt which ends the output, \n\nExample::\n\n .. sourcecode:: sh\n\n ~$ echo \"hello world\" # Mmmh, insightful comment\n hello world\n\nThis simply renders like:\n\n::\n\n ~$ echo \"hello world\" # Mmmh, insightful comment\n hello world\n\nThe *command* starts after the prompt (\"~$ \") and continues until the\nfirst newline is found in the source code block. Here, it is just\nafter the word ``comment``. The command is ``echo \"hello world\" # Mmmh,\ninsightful comment`` The output is the text block found until the next\nprompt: this is ``hello world``. There are **two** possible prompts:\n``~$``, and ``~#``. Both are required to be followed by a space are are\ntreated the same.\n\nNote: the newlines which are nested in curly brackets or parentheses are\n**not** interpreted as an *end of command* character. Shells do the same:\ncurly brackets are used to define functions and parentheses makes the\nnested command to be interpreted in a subprocess shell. The two\nfollowing examples from the introduction make it clear:\n\n::\n\n ~$ (\n echo $((1+1)) )\n 2\n\n ~$ sum () {\n echo $(( $1 + $2 ))\n }\n\nThe first command is ``echo $((1+1))`` in a subproces, and it's output\nis ``2``. The second command is the definition of a function named\n``sum`` and has no output. Defining functions sometimes clarify the\nintent in subsequent uses of the function. For functions to be re-used,\nthe state of the shell must be kept between each snippets. *wordish*\nkeep a connection with the same *shell* subprocess (*bash* is used)\nfor the duration of the article.\n\n::\n\n ~$ sum 42 58\n 3\n\nSee how the output is obviously incorrect? we will see later how this\nis reported.\n\nWhen the output can not be completely predicted, such as when\ndisplaying ``$RANDOM``, or displaying the size of a partitions in\nbytes, there is a handy wildcard pattern which can be used:\n``...``. It matches everything like ``.*`` in regexp [#]_.\n\n::\n\n ~$ echo \"a random number: \" $RANDOM\n ...\n\nOne last thing, if a command does not exit gracefully, *wordish*\nprecautiously aborts, refusing to execute commands on the system under\ntest which is in an undefined state. *wordish* displays the remaining\nunexecuted commands.\n\n::\n\n ~$ What have the Romans ever done for us\n aqueduct? roads? wine !\n\n ~$ echo \"Bye bye\"\n Bye bye\n\nThis introduction is embedded in the wordish module as the\ndocstring. Just run *wordish* with no argument to get the example\nreport of this article:\n\n::\n\n ~$ python -m wordish\n Trying:\techo \"hello world\" # Mmmh, insightful comment...\n Expecting:\thello world\n ok\n \n Trying:\t(\n echo $((1+1)) )\n Expecting:\t2\n ok\n \n Trying:\tsum () {\n echo $(( $1 + $2 ))\n }\n Expecting:\t\n ok\n \n Trying:\tsum 42 58\n Expecting:\t3\n Failed, got:\t100, 0\n \n Trying:\techo \"a random number: \" $RANDOM\n Expecting:\t...\n ok\n \n Trying:\tWhat have the Romans ever done for us\n Expecting:\taqueduct? roads? wine !\n Failed, got:\t/bin/bash: line 19: What: command not found, 127\n \n Command aborted, bailing out\n Untested command:\n \techo \"Bye bye\"\n python -m wordish\n 6 tests found. \n 4 tests passed, 2 tests failed.\n\nThere is another example real world article_ which is also included in\nthe sources distribution, and tested before each release. This is the\narticle which prompted the need for the development of *wordish*.\n\n.. _article: http://jdb.github.com/sources/lvm.txt\n\n.. [#] This syntax can be seen as light and readable version of html\n or latex, and was designed with the experience of existing Wiki\n syntaxes. The Sphinx project has a nice introduction_ on *rst*,\n the reference documentation is here_.\n\n .. _introduction: http://sphinx.pocoo.org/rest.html\n\n .. _here: http://docutils.sourceforge.net/rst.html#user-documentation\n\n.. [#] Regexp are not directly used so that the various special regexp\n characters do not need to be escaped.", "description_content_type": null, "docs_url": "https://pythonhosted.org/wordish/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "wordish", "package_url": "https://pypi.org/project/wordish/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/wordish/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/wordish/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Parses a shell session, test the commands compare the outputs", "version": "1.0.2" }, "last_serial": 801709, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "0fba18426b8bdcebe9640d2dd45f515e", "sha256": "8d0dc8e998721f4778cdcc3e3cfe3f69674c3714376b65cc590564fb5eb56d9b" }, "downloads": -1, "filename": "wordish-0.0.2.tar.gz", "has_sig": false, "md5_digest": "0fba18426b8bdcebe9640d2dd45f515e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7518, "upload_time": "2010-01-26T23:35:55", "url": "https://files.pythonhosted.org/packages/64/a2/74bb393c3adc631c8293acef116c1cfdce8df9fb97fa80dc7b79b2d77f34/wordish-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "4b3e2690ae7c36a81b15356d65c0f2bc", "sha256": "cb17d56f950c055b2eb5683a73a3cb65987a9ca90dd1467a86f55b07f1fd7f14" }, "downloads": -1, "filename": "wordish-0.0.3.tar.gz", "has_sig": false, "md5_digest": "4b3e2690ae7c36a81b15356d65c0f2bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7526, "upload_time": "2010-01-26T23:38:33", "url": "https://files.pythonhosted.org/packages/7e/5b/4be58ee2b1649853a492e36a4a0ed43b0e08767a019c037124055f9b0d02/wordish-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "ab21e52004f0a6d1f5a7839721e889d6", "sha256": "d25c7aaf2e70afbcd1f77f52d46f1e65f89ccd9966f195c06c70f94f7fb41968" }, "downloads": -1, "filename": "wordish-0.0.4.tar.gz", "has_sig": false, "md5_digest": "ab21e52004f0a6d1f5a7839721e889d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7523, "upload_time": "2010-01-26T23:39:52", "url": "https://files.pythonhosted.org/packages/b4/7e/15c8db1c9e71264c2048b472ced0e6451501bd521e164e50bea0b61ce9d2/wordish-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "25e7e910be73f0895cd3c57bb093b5a8", "sha256": "1ccf5ebcb935fc770c1e05b9181407c8c76c60265e09086403f43faa7b7713bd" }, "downloads": -1, "filename": "wordish-0.0.5.tar.gz", "has_sig": false, "md5_digest": "25e7e910be73f0895cd3c57bb093b5a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7522, "upload_time": "2010-01-26T23:47:28", "url": "https://files.pythonhosted.org/packages/b4/4b/761ab43754fb382cb791609bd0be01563922ec959b7890e0ed4b2542ce34/wordish-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "caecbf79372b425dea309232caf25aca", "sha256": "25965bae8cf0da1eb42de061d1b8d8e2e2403848ecfac93dfa833f86c24cb92c" }, "downloads": -1, "filename": "wordish-0.0.6.tar.gz", "has_sig": false, "md5_digest": "caecbf79372b425dea309232caf25aca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7507, "upload_time": "2010-01-26T23:48:13", "url": "https://files.pythonhosted.org/packages/65/bd/d56501c3b4db21a274cc15846e19c4dac821df0b99bd5520e4f65c1d511b/wordish-0.0.6.tar.gz" } ], "0.0.7": [], "1.0.0": [ { "comment_text": "", "digests": { "md5": "eaf2f6342e67d0d968e6b62d7550e2d4", "sha256": "bb2b1e3d0a41ccfc2de8eaa03d4cdcc234c5bba2becbc44cf74f7cc58a2c6eb1" }, "downloads": -1, "filename": "wordish-1.0.0.tar.gz", "has_sig": false, "md5_digest": "eaf2f6342e67d0d968e6b62d7550e2d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8549, "upload_time": "2010-02-21T20:54:03", "url": "https://files.pythonhosted.org/packages/e1/6e/19066f22629291df5f6138eb18a001b07caa88a163fed134b802bc49010e/wordish-1.0.0.tar.gz" } ], "1.0.0b6": [ { "comment_text": "", "digests": { "md5": "eae1773a893d09ed73d417492d33ba69", "sha256": "2561b2adbaa3a29d17e4031d738a8f30f61a1f3394242234bca5e03d1065e0cc" }, "downloads": -1, "filename": "wordish-1.0.0b6.tar.gz", "has_sig": false, "md5_digest": "eae1773a893d09ed73d417492d33ba69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8442, "upload_time": "2010-02-19T15:31:29", "url": "https://files.pythonhosted.org/packages/d4/a4/0b28ed8f6849ec21b57642b60a925b8b7128673963a0a78cf9b587d450ba/wordish-1.0.0b6.tar.gz" } ], "1.0.0b7": [ { "comment_text": "", "digests": { "md5": "f93f424112e6722e5c50ca596b7ce5d3", "sha256": "09832f5529e66bd9411acf4030fc772614a4c5520eab40f4c594c222d3f30675" }, "downloads": -1, "filename": "wordish-1.0.0b7.tar.gz", "has_sig": false, "md5_digest": "f93f424112e6722e5c50ca596b7ce5d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8434, "upload_time": "2010-02-21T13:24:34", "url": "https://files.pythonhosted.org/packages/66/02/f89fcb42d4bd1bfc04983e8cbd80d3fd1c5d0b98e2cb47c777061d4c4606/wordish-1.0.0b7.tar.gz" } ], "1.0.0b8": [ { "comment_text": "", "digests": { "md5": "25591eed569e6de359bab57456359928", "sha256": "a5a97ec188f00f82c837a361031849562c5d9faf9ba1f5fed2ccf335ae0bcea5" }, "downloads": -1, "filename": "wordish-1.0.0b8.tar.gz", "has_sig": false, "md5_digest": "25591eed569e6de359bab57456359928", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8448, "upload_time": "2010-02-21T15:57:28", "url": "https://files.pythonhosted.org/packages/68/e4/d051df552452e7a83f53593ff411745e08b727aaa835596eba35037d75e4/wordish-1.0.0b8.tar.gz" } ], "1.0.0b9": [ { "comment_text": "", "digests": { "md5": "e6f8bd2ab1e043991cfac07cb7e79e63", "sha256": "8b5a115a7cec2450a90f3fb6b6d76f67796959c2eab05780091acfe8568f6bc1" }, "downloads": -1, "filename": "wordish-1.0.0b9.tar.gz", "has_sig": false, "md5_digest": "e6f8bd2ab1e043991cfac07cb7e79e63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8447, "upload_time": "2010-02-21T17:42:02", "url": "https://files.pythonhosted.org/packages/ec/60/0991bc80273da5527949e160a59adf5aa2943008709bb4343f457dc9d78c/wordish-1.0.0b9.tar.gz" } ], "1.0.0beta": [ { "comment_text": "", "digests": { "md5": "d8a8b9e490053c2f38b25a3bb7755733", "sha256": "6ad05c578033a6316761a9d3b8c0425f8da2175025d452774b1a04a313b7c564" }, "downloads": -1, "filename": "wordish-1.0.0beta.tar.gz", "has_sig": false, "md5_digest": "d8a8b9e490053c2f38b25a3bb7755733", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9983, "upload_time": "2010-02-14T21:04:25", "url": "https://files.pythonhosted.org/packages/71/cc/8cc36a5b61440c26fdb65f19c58aaf6406bf93c3ef719a24e4f1794ccd70/wordish-1.0.0beta.tar.gz" } ], "1.0.0beta2": [ { "comment_text": "", "digests": { "md5": "a83b5f3a753969cfb7d9199aec91692b", "sha256": "c87cb9c0a1fd1137d5412ccac5f7f1037019bb985d722a168d7626b8d56b8c0f" }, "downloads": -1, "filename": "wordish-1.0.0beta2.tar.gz", "has_sig": false, "md5_digest": "a83b5f3a753969cfb7d9199aec91692b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10102, "upload_time": "2010-02-14T21:08:04", "url": "https://files.pythonhosted.org/packages/27/6a/7ccc01d662a0f1fba43b12c739119c348761d958d7cdbadad6c88d2ddd2d/wordish-1.0.0beta2.tar.gz" } ], "1.0.0beta3": [ { "comment_text": "", "digests": { "md5": "889b93675ff49d5ac12bba82a9527ed2", "sha256": "700c975a4227f7752c2709dd5b7078ad3b8be908a9c28d6038d6f188f1f914d9" }, "downloads": -1, "filename": "wordish-1.0.0beta3.tar.gz", "has_sig": false, "md5_digest": "889b93675ff49d5ac12bba82a9527ed2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10119, "upload_time": "2010-02-14T21:14:48", "url": "https://files.pythonhosted.org/packages/d1/65/65bb6cc6803b05f55864153af36e001e72c49cea3d627863d3149f4732ce/wordish-1.0.0beta3.tar.gz" } ], "1.0.0beta4": [ { "comment_text": "", "digests": { "md5": "e95fe5fbff21d25325b73efa2b387dd3", "sha256": "bf0cd85fab1fd0a02901eac48335997408ddb4d3d34db993c47267256eafb0c1" }, "downloads": -1, "filename": "wordish-1.0.0beta4.tar.gz", "has_sig": false, "md5_digest": "e95fe5fbff21d25325b73efa2b387dd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10111, "upload_time": "2010-02-14T21:18:05", "url": "https://files.pythonhosted.org/packages/c7/cc/c5a26fdc569da2c350a0a127c2cedc404d8a3f2a427067ab621aa62d57f8/wordish-1.0.0beta4.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "01bcbe42044cbf6fd693baf893ad41cc", "sha256": "5caea3d44ae6b406b67f8467e9f46ec686fb38c962521fd92cc93a9aae9a2c69" }, "downloads": -1, "filename": "wordish-1.0.1.tar.gz", "has_sig": false, "md5_digest": "01bcbe42044cbf6fd693baf893ad41cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8542, "upload_time": "2010-02-21T21:52:05", "url": "https://files.pythonhosted.org/packages/f2/91/4ade08b26913204ad68dc531427a293dfb9c87d0568df9f65cbb68e24aec/wordish-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "b003fc74e8dcba5eb0111d295694493c", "sha256": "7adb607dd478fc5206d3615dd71f22a0be72800d46457f4e6884a92500d348ba" }, "downloads": -1, "filename": "wordish-1.0.2.tar.gz", "has_sig": false, "md5_digest": "b003fc74e8dcba5eb0111d295694493c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 53789, "upload_time": "2010-03-01T15:19:39", "url": "https://files.pythonhosted.org/packages/bb/04/5029c26181436932c1826f35b23b0bccba3573502f808164bf8f534da062/wordish-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b003fc74e8dcba5eb0111d295694493c", "sha256": "7adb607dd478fc5206d3615dd71f22a0be72800d46457f4e6884a92500d348ba" }, "downloads": -1, "filename": "wordish-1.0.2.tar.gz", "has_sig": false, "md5_digest": "b003fc74e8dcba5eb0111d295694493c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 53789, "upload_time": "2010-03-01T15:19:39", "url": "https://files.pythonhosted.org/packages/bb/04/5029c26181436932c1826f35b23b0bccba3573502f808164bf8f534da062/wordish-1.0.2.tar.gz" } ] }