{ "info": { "author": "Ben Steadman", "author_email": "steadmanben1@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\n# aocpy - Advent of Code Automation Tool\n\n[![PyPI version shields.io](https://img.shields.io/pypi/v/aocpy.svg)](https://pypi.python.org/pypi/aocpy/)\n\nFetch input, submit answers and generate boilerplate files for solving Advent of Code puzzles :christmas_tree:\n\n## Installation\n\nInstall via pip:\n`pip install aocpy`\n\n## Usage\n\n**N.B** Please see the [Session Cookie Configuration](#session-cookie-configuration) section\n\n### Begin a Puzzle\n\n`begin` fetches the puzzle input and generates boilerplate files with the following structure:\n\n```\n/\n solution.py\n input.txt\n```\n\n```bash\n# fetch input and generate boilerplate for today's challenge\n$ aocpy begin\n\n# fetch input and generate boilerplate for a specific puzzle\n$ aocpy begin -y 2017 -d 15\n$ aocpy begin -d 15 # uses current puzzle year\n```\n\n### Submit Puzzle Answers\n\n```bash\n# submit answer for level 1 of today's puzzle\n$ aocpy submit \"myanswer\" 1\n\n# submit answer for level 2 of today's puzzle\n$ aocpy submit \"myanswer2\" 2\n\n# submit answer for level 1 of a specific puzzle\n$ aocpy submit \"myanswer\" 1 -y 2017 -d 15\n\n# submit answer for level 2 of a specific puzzle\n$ aocpy submit \"myanswer2\" 2 -y 2017 -d 15\n```\n\n### Running Solutions\n\nThe solution template files include a small CLI to read input files.\n\n```bash\n$ cd \n\n# Default - run with aocpy generated input.txt file\n$ python solution.py\n\n# Run with example_input.txt if present\n$ python solution.py -e\n\n# Run with specified input file\n$ python solution.py /path/to/my/file.txt\n```\n\n## Session Cookie Configuration\n\nAoC puzzle inputs differ by user, requiring a browser cookie to determine the current user. `aocpy` requires this cookie and can be supplied in several ways:\n\n- CLI `-c`/`--session-cookie` option (supported by all commands):\n - `$ aocpy begin -c <1234mycookie>`\n- Configuration file:\n - Paste the cookie into a file at `~/.config/aocpy/token`\n ```\n # ~/.config/aocpy/token\n <1234mycookie>\n ```\n- Environment variable:\n\n - `$ export AOC_SESSION_COOKIE=<1234mycookie>`\n\n### Finding Your Session Cookie\n\n1. Open Advent of Code in a web browser and log in\n2. Open the browser's developer console\n\n- i.e. Right click -> Inspect or `F12`\n\n3. Select the `Network` tab\n4. Navigate to any puzzle input page i.e. adventofcode.com/2018/day/1/input\n5. Click on the request that shows up in the `Network` tab\n6. The cookie will be in the `Request Headers` section with the format `Cookie: session=<1234mycookie>`\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/SteadBytes/aocpy", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "aocpy", "package_url": "https://pypi.org/project/aocpy/", "platform": "", "project_url": "https://pypi.org/project/aocpy/", "project_urls": { "Homepage": "https://github.com/SteadBytes/aocpy" }, "release_url": "https://pypi.org/project/aocpy/0.0.1/", "requires_dist": [ "requests", "beautifulsoup4", "click", "pytz" ], "requires_python": ">=3.6.0", "summary": "Advent of Code Automation", "version": "0.0.1" }, "last_serial": 4633400, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1032a2ff3ab80a5411c6a795826558a7", "sha256": "0456c9c725982e186c5a0266e892b60782d659bd8e73f794bbea8bcfd527798b" }, "downloads": -1, "filename": "aocpy-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1032a2ff3ab80a5411c6a795826558a7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 7242, "upload_time": "2018-12-25T12:17:16", "url": "https://files.pythonhosted.org/packages/c6/da/d4ea304b64dddaeffa826eff0a72c9082df5db0cd8cfa8fd188c44fdb9f6/aocpy-0.0.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1032a2ff3ab80a5411c6a795826558a7", "sha256": "0456c9c725982e186c5a0266e892b60782d659bd8e73f794bbea8bcfd527798b" }, "downloads": -1, "filename": "aocpy-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1032a2ff3ab80a5411c6a795826558a7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 7242, "upload_time": "2018-12-25T12:17:16", "url": "https://files.pythonhosted.org/packages/c6/da/d4ea304b64dddaeffa826eff0a72c9082df5db0cd8cfa8fd188c44fdb9f6/aocpy-0.0.1-py2.py3-none-any.whl" } ] }