Metadata-Version: 2.1
Name: advent
Version: 1.0.3
Summary: Get your Advent of Code puzzle input and much more!
Author-email: ravilnicki <ravilnicki@gmail.com>
License: MIT License
        
        Copyright (c) 2023 ravilnicki
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-dotenv>=1.0.0

# Advent

Advent is a Python package that contains useful functions for Advent of Code eg getting puzzle input or getting all integers present in a string.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install advent.

```bash
pip install advent
```

## Setup

To use this tool you need to create a .env file in your project directory and place there your session ID.

```
# .env file
SESSION_ID="your-session-id"
```
 It's stored in a cookie called session. You can find it by entering Inspect Mode in your browser, Application -> Cookies. Check out picture below:
![where to find session id](https://github.com/ravilnicki/advent/blob/main/session_id.png?raw=true)

## Usage

```python
from advent.functions import get_puzzle_input, get_ints

# returns "B X\nB Y\nA Y\nB Y\n..."
get_puzzle_input(2022, 22)

# returns [2, 3]
list(get_ints("Point x=2, y=3"))
```

## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License

[MIT](https://choosealicense.com/licenses/mit/)
