{ "info": { "author": "Divo Kaplan", "author_email": "divokaplan@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console :: Curses", "Intended Audience :: Education", "Intended Audience :: Other Audience", "License :: OSI Approved :: MIT License", "Operating System :: Unix", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Education", "Topic :: Games/Entertainment :: Puzzle Games" ], "description": "# Regex Crossword\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/regex_crossword.svg)](https://pypi.python.org/pypi/regex_crossword/)\n[![PyPI version fury.io](https://badge.fury.io/py/regex_crossword.svg)](https://pypi.python.org/pypi/regex_crossword/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\nTerminal Freaks rejoice!\n\nBased on the [Regex Crossword](https://regexcrossword.com/), this is an implementation written in pure python using only the standard library to play the game offline entirely from your shell.\n\nIf you aren't familiar with the concpet of a regex crossword, it's a blank crossword grid that you need to fill so that each row and column will match the specified regex. It's a fun exercise to your regex abilities and an interactive way to learn about them and practice while playing.\n\nI'm a bit of a terminal freak myself and so the moment I started playing the wonderful online version it seemed so natural to me that there needs to be a version of the concept playable from the shell, so I made one using nothing but Python's `curses` module.\n\n## Installation\n\nUse the Python package manager [pip](https://pip.pypa.io/en/stable/) to install `regex_crossword`.\n\n```bash\npip install regex_crossword\n```\n\nTo install the scraper functionality as well (more on this below) use:\n\n```bash\npip install regex_crossword[scraper]\n```\n\n> Note: the scraper uses the Selenium 3rd party package that might need extra setup to be used (specifically the Chrome WebDriver). If you encounter any problems I advise you to check out their [installation guide](https://selenium-python.readthedocs.io/installation.html).\n\n## Usage\n\nOnce installed in your environment, simply type `regex_crossword` from your terminal and start playing!\n\n### Loading level packs\n\nWhen the game starts it will attempt to load \"level packs\" for it to use. It looks for them in the following places in descending order:\n\n1. First, it will look wherever the `--level-packs` option was pointing when invoking the game command (for a full list of all commands use the `-h` or `--help` flag).\n1. If no option was specified, it will look wherever the `REGEXCW_LEVEL_PACKS` environment variable is pointing, if it exists.\n1. Lastly and by default, it will search for a directory called `level_packs` in the current working directory.\n\nIf all of this fails (or the directory has no packs), an error will pop up informing you no level packs were found.\n\n### Getting level packs\n\nWhen trying to get level packs you have several options:\n\n- Use the `--scrape` flag (this requires you to install the `scraper` extra). This will scrape some online resources and create level packs based on them for you to load into the offline version.\n- Create your own level packs!\n\n#### Creating your own level packs\n\nLevel packs are simply JSON files who follow this format:\n```json\n[\n {\n \"title\": \"Beatles\",\n \"up_to_down\": [\n \"[^SPEAK]+\",\n \"EP|IP|EF\"\n ],\n \"left_to_right\": [\n \"HE|LL|O+\",\n \"[PLEASE]+\"\n ],\n },\n {\n \"title\": \"Pisco Sour\",\n \"up_to_down\": [\n \"(MA|LM)\",\n \"[^MESH]+\"\n ],\n \"left_to_right\": [\n \"[LINE]+\",\n \"[LAM]+\"\n ],\n \"right_to_left\": [\n \"[ISLE]+\",\n \"[MALE]+\"\n ],\n \"down_to_up\": [\n \"[LAME]*\",\n \"[^LES]+\"\n ]\n },\n]\n```\n\nThe main file json is a list of smaller dictionaries who each implement a \"level\" format:\n\n- `title` - the title of the level.\n- `up_to_down` - the regexes who will attempt to match the columns from top to bottom (specified from left to right)\n- `left_to_right` - the regexes who will attempt to match the rows from left to right (specified from top to bottom)\n- `down_to_up` - same as `up_to_down` but will attempt to match the columns from bottom to top.\n- `right_to_left` - same as `left_to_right` but will attempt to match the rows from right to left.\n\n## License\n\n[MIT](LICENSE.txt)\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/DivoK/regex_crossword", "keywords": "terminal curses game regex crossword educational", "license": "", "maintainer": "", "maintainer_email": "", "name": "regex-crossword", "package_url": "https://pypi.org/project/regex-crossword/", "platform": "", "project_url": "https://pypi.org/project/regex-crossword/", "project_urls": { "Homepage": "https://github.com/DivoK/regex_crossword" }, "release_url": "https://pypi.org/project/regex-crossword/0.1.0/", "requires_dist": [ "selenium ; extra == 'scraper'", "beautifulsoup4 ; extra == 'scraper'", "loguru ; extra == 'scraper'" ], "requires_python": ">=3.7", "summary": "A Python implementation of a Regex Crossword in the terminal.", "version": "0.1.0" }, "last_serial": 5874074, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "222e5325bba75d777a967470243ef75f", "sha256": "3687eb3040de38920fa95139b0811038caf83aa176900c2ec59c0beb68e61848" }, "downloads": -1, "filename": "regex_crossword-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "222e5325bba75d777a967470243ef75f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 14788, "upload_time": "2019-09-23T14:50:50", "url": "https://files.pythonhosted.org/packages/a3/5b/884afcb245013b80fad21368593f1a65046b6c6e0d5900ce63a935103280/regex_crossword-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "44e50fe32cd43bd7c58f8fd96d652d3e", "sha256": "12a64b5e0f1a2a78793707d8fb65184be6908f5c8b81f3602925892dfaa761ba" }, "downloads": -1, "filename": "regex_crossword-0.1.0.tar.gz", "has_sig": false, "md5_digest": "44e50fe32cd43bd7c58f8fd96d652d3e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 13018, "upload_time": "2019-09-23T14:50:54", "url": "https://files.pythonhosted.org/packages/6c/8c/9ad49310099099c5ecb5d70a39f66161a9eea9d0699b226c442bb3f48cab/regex_crossword-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "222e5325bba75d777a967470243ef75f", "sha256": "3687eb3040de38920fa95139b0811038caf83aa176900c2ec59c0beb68e61848" }, "downloads": -1, "filename": "regex_crossword-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "222e5325bba75d777a967470243ef75f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 14788, "upload_time": "2019-09-23T14:50:50", "url": "https://files.pythonhosted.org/packages/a3/5b/884afcb245013b80fad21368593f1a65046b6c6e0d5900ce63a935103280/regex_crossword-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "44e50fe32cd43bd7c58f8fd96d652d3e", "sha256": "12a64b5e0f1a2a78793707d8fb65184be6908f5c8b81f3602925892dfaa761ba" }, "downloads": -1, "filename": "regex_crossword-0.1.0.tar.gz", "has_sig": false, "md5_digest": "44e50fe32cd43bd7c58f8fd96d652d3e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 13018, "upload_time": "2019-09-23T14:50:54", "url": "https://files.pythonhosted.org/packages/6c/8c/9ad49310099099c5ecb5d70a39f66161a9eea9d0699b226c442bb3f48cab/regex_crossword-0.1.0.tar.gz" } ] }