{ "info": { "author": "Mantaseus", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# randtext\n\nThis module can be used to generate random text in python. It can be used to generate text with\n- Meaningless mishmash of characters\n- Pronouncable mishmash of characters\n- Random dictionary words\n\n## Usage\n\nImport the module in your project like this\n\n```\nfrom randtext import randtext\n```\n\nYou only need to use the following method to generate random text. The `format` argument is a string containing the instructions for generating the random text. The structure of the `format` argument is discussed below.\n\n```\nrandtext.generate(format)\n```\n\n## Format argument\n\nThe `format` argument is a comma separated list of instructions that will be used by randtext to generate the random text. \n\nThe instruction must be a number followed by the operation type or a list of characters to randomly choose from. The number represents the number of characters that you want within that sequence. The other half of the instruction can be of two types\n- **Combinable operations** - The following operations can be combined together to define the list of characters that randtext will randomly choose from to generate the text\n - `c` - All lowercase ascii alphabets\n - `C` - All uppercase ascii alphabets\n - `i` - All integers from 0-9\n - special characters - Any special character can be used based on your need other than `,` because it is used to delimit the instructions in the `format` argument. You can even use a space if you want.\n- **Non combinable operations** - These operations can not be combined with other operations. If you do try to combine them with other operations then they will regarded as just another character in the list of characters to randomly generate meaningless text from\n - `pc` - Generate lowercase pronouncable text\n - `pC` - Generate uppercase pronouncable text\n - `pcC` - Generate pronouncable text with characters that are randomly lower or uppercase\n - `dc` - Generate lowercase dictionary text\n - `dC` - Generate uppercase dictionary text\n - `dcC` - Generate dictionary text with characters that are randomly lower or uppercase\n\n## Examples\n\n- Simple meaningless random text with 14 ascii lowercase and uppercase characters\n\n ```\n randtext.generate('14cC')\n\n # 5 sample outputs:\n # ZWUvhxquyeNlWh\n # SarqpCypLJrEWe\n # GhFLSmQWyMISaN\n # gdDcRzOthCqUpw\n # oGUbsyHHfcaNeB\n ```\n- Start the text with 2 of `#$%&()[]{}<>` characters, then 2 numbers, then 1 random uppercase letter, then 5 intergers, or lowercase and uppercase letters\n\n ```\n randtext.generate('2#$%&()[]{}<>,2i,1C,5icC')\n\n # 5 sample outputs:\n # %>62F9134f\n # }%12FaLe5j\n # {{11H82R2i\n # [%73UOVuk3\n # %{01EG8rG6 \n ```\n- Create 2 pronouncable (but still meaningless) words with 8 characters each and separated by a space. The first word must start with a random uppercase letter and the rest of the letters should be all lowercase. The second word must have random lowercase and uppercase characters.\n\n ```\n randtext.generate('1C,7pc,1 ,8pcC')\n\n # 5 sample outputs:\n # Ceaskeff aUcLavio\n # Dbaidirh eagHAusk\n # Uiayausk eENAUSTO\n # Zshaiweb aistEayA\n # Hiweegup NougUGhA\n ```\n- Create 2 dictionary words with 10 characters each separated by a space\n\n ```\n randtext.generate('10dc,1 ,10dc')\n\n # 5 sample outputs:\n # courteous sumptuous\n # brimstone riverbank\n # memoranda embroider\n # stimulant promenade\n # proselyte conqueror\n ```\n\n## Notes\n\n- The dictionary uses words found [here](http://svnweb.freebsd.org/csrg/share/dict/words?view=co&content-type=text/plain) and I take no responsibility for the words output by the dictionary operation. \n - Feel free to delete or add your own words from the files in the `dictionary` directory of your local cloned copy of the repo.\n - The name of each file in the `dictionary` directory is the same as the number of characters in each line of the file. The `organize_dictionary.py` script can be used to read a raw dictionary file with words of all lengths and create the numbered files required by randtext\n - The number of words with a given length in the dictionary used here is as follows:\n\n ```\n Length | # of words\n -------+------------\n 2 | 26\n 3 | 136\n 4 | 783\n 5 | 2207\n 6 | 3210\n 7 | 3910\n 8 | 4126\n 9 | 3708\n 10 | 3151\n 11 | 2021\n 12 | 1140\n 13 | 588\n 14 | 288\n 15 | 113\n 16 | 44\n 17 | 19\n 18 | 8\n 19 | 4\n 21 | 2\n 22 | 2\n 23 | 1\n\n ```\n\n\n", "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/Mantaseus/randtext", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "randtext", "package_url": "https://pypi.org/project/randtext/", "platform": "", "project_url": "https://pypi.org/project/randtext/", "project_urls": { "Homepage": "https://github.com/Mantaseus/randtext" }, "release_url": "https://pypi.org/project/randtext/0.1.3/", "requires_dist": [ "pathlib" ], "requires_python": "", "summary": "Generate random text with a considerable amount of control", "version": "0.1.3" }, "last_serial": 4683507, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "9eb866a237251d0e827080fd39712c0e", "sha256": "421d31b47ec5546d6dd89be71f40c68b50c88f17b4a2baa55af19fc2c47c7f04" }, "downloads": -1, "filename": "randtext-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9eb866a237251d0e827080fd39712c0e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 106809, "upload_time": "2019-01-10T05:20:12", "url": "https://files.pythonhosted.org/packages/10/41/58ddb4f722dd8abc9925dae6248382e2a7e14e1f0cbd8edcb6d3a65a45ff/randtext-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "77d80bf580a74d561bd699744ee6c0db", "sha256": "94629c59163897776b8f0cb5688e448ed888198662305072dfa53f3338e07adf" }, "downloads": -1, "filename": "randtext-0.1.2.tar.gz", "has_sig": false, "md5_digest": "77d80bf580a74d561bd699744ee6c0db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 106171, "upload_time": "2019-01-10T05:20:15", "url": "https://files.pythonhosted.org/packages/0a/ae/20d70f78ac7d9df700c245375ee4529e883f4700cfae209ac1bdc36e5096/randtext-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "34d68d4cf5b70fb1c6b0815ca022a7d4", "sha256": "0a071bf2744aa58b2995f8adf900faffcd5e31d4b38530841c21540962204f02" }, "downloads": -1, "filename": "randtext-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "34d68d4cf5b70fb1c6b0815ca022a7d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 106725, "upload_time": "2019-01-11T02:45:34", "url": "https://files.pythonhosted.org/packages/90/e7/b767a834b629e302812151d843754abf7fd8b7529eb729a74da03f5a3e19/randtext-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1ca3e3bfe3df2e7ba6eac77d41e6d5f", "sha256": "95fef64db0eb015e6b05440c30ac09de1d2de49e496fdd87c766986b9113da8d" }, "downloads": -1, "filename": "randtext-0.1.3.tar.gz", "has_sig": false, "md5_digest": "f1ca3e3bfe3df2e7ba6eac77d41e6d5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 106091, "upload_time": "2019-01-11T02:45:36", "url": "https://files.pythonhosted.org/packages/b7/3d/e25c9168b85f47d44539582c1975b1fda011ed52cfbd48d94d8bec08e2d3/randtext-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "34d68d4cf5b70fb1c6b0815ca022a7d4", "sha256": "0a071bf2744aa58b2995f8adf900faffcd5e31d4b38530841c21540962204f02" }, "downloads": -1, "filename": "randtext-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "34d68d4cf5b70fb1c6b0815ca022a7d4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 106725, "upload_time": "2019-01-11T02:45:34", "url": "https://files.pythonhosted.org/packages/90/e7/b767a834b629e302812151d843754abf7fd8b7529eb729a74da03f5a3e19/randtext-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1ca3e3bfe3df2e7ba6eac77d41e6d5f", "sha256": "95fef64db0eb015e6b05440c30ac09de1d2de49e496fdd87c766986b9113da8d" }, "downloads": -1, "filename": "randtext-0.1.3.tar.gz", "has_sig": false, "md5_digest": "f1ca3e3bfe3df2e7ba6eac77d41e6d5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 106091, "upload_time": "2019-01-11T02:45:36", "url": "https://files.pythonhosted.org/packages/b7/3d/e25c9168b85f47d44539582c1975b1fda011ed52cfbd48d94d8bec08e2d3/randtext-0.1.3.tar.gz" } ] }