|
1 | 1 | # AoC Tiles
|
2 | 2 |
|
3 |
| -This script creates a graphic for each day for each year of the Advent of Code. |
4 |
| -A tile is an image which represents both parts of a day, it looks like this: |
5 |
| - |
6 |
| - |
7 |
| - |
8 |
| -It uses the personal [AoC Leaderboard](https://adventofcode.com/2021/leaderboard/self) to get the data for each day using your cookie. |
9 |
| - |
10 |
| - |
11 |
| -## Installation |
12 |
| - |
13 |
| -Feel free to use it, here is a short description of how to get it working: |
14 |
| - |
15 |
| -Copy this entire folder into your AoC repository. Then install the requirements. |
16 |
| - |
17 |
| -### Requirements |
18 |
| - |
19 |
| -Install at least Python 3.10 (because of the new typing union `|`, if you cannot do so you can |
20 |
| -change the `type1 | type2` annotations to `Union[type1, type2]`). |
21 |
| - |
22 |
| -Install the requirements (`pillow` for creating images, `requests` for the leaderboard data and `pyyaml` to parse the language config): |
23 |
| - |
24 |
| -``` |
25 |
| -pip install -r requirements.txt |
26 |
| -``` |
27 |
| - |
28 |
| -### Configuration |
29 |
| - |
30 |
| -To use this script, you need to have a file named "session.cookie" in the same folder as this script. |
31 |
| -It should contain a single line, the "session" cookie from https://adventofcode.com when you are logged in. |
32 |
| -No prefix is needed, only the string of length 128. |
33 |
| - |
34 |
| -Now add `<!-- AOC TILES BEGIN -->` and `<!-- AOC TILES END -->` in your README, everything between these 2 tags |
35 |
| -will always be replaced by the script, so do not add additional information there. Note that these are HTML comments, |
36 |
| -so they will not be visible in the rendered README. |
37 |
| - |
38 |
| -Your year/day script structure likely looks different. You can change the patterns for years and days in the |
39 |
| -[create_aoc_tiles.py](create_aoc_tiles.py) file. |
40 |
| - |
41 |
| -The variables at the top of the script have comments to explain what they do. |
42 |
| - |
43 |
| -To try whether it works you can run the script directly: |
44 |
| - |
45 |
| -``` |
46 |
| -python3 create_aoc_tiles.py |
47 |
| -``` |
48 |
| - |
49 |
| -### Pre-commit hook |
50 |
| - |
51 |
| -Add [.pre-commit-config.yaml](/.pre-commit-config.yaml) to your repository and run `pre-commit install` to install the hook. |
52 |
| - |
53 |
| - |
54 |
| -## Customization |
55 |
| - |
56 |
| -There are various flags and variables which can be set to change the look of your tiles. Some of them are listed here |
57 |
| -with examples showing how it changes the look. |
58 |
| - |
59 |
| -**Note that in order to regenerate images you have to either delete the images or delete the .aoc-tiles-cache!** |
60 |
| - |
61 |
| -* `SHOW_CHECKMARK_INSTEAD_OF_TIME_RANK`: |
62 |
| - |
63 |
| -| `False` (default) | `True` | |
64 |
| -|---------------------------|--------------------------------| |
65 |
| -|  |  | |
66 |
| - |
67 |
| -* `CONTRAST_IMPROVEMENT_TYPE`: |
68 |
| - |
69 |
| -| `"outline"` (default) | `"dark"` | `"none"` | |
70 |
| -|-----------------------------|--------------------------|--------------------------| |
71 |
| -|  |  |  | |
| 3 | +This script has moved to [LiquidFun/aoc_tiles](https://github.com/LiquidFun/aoc_tiles). It has been improved and can now easily be run as a pre-commit hook. See the link for more details. |
0 commit comments