{"id":13778893,"url":"https://github.com/tomfran/advent-of-code-setup","last_synced_at":"2025-04-23T05:30:48.670Z","repository":{"id":97586954,"uuid":"572948095","full_name":"tomfran/advent-of-code-setup","owner":"tomfran","description":"Automate input downloads and solution creation for Advent of Code","archived":false,"fork":false,"pushed_at":"2022-12-01T18:14:10.000Z","size":21,"stargazers_count":18,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-03T18:13:28.623Z","etag":null,"topics":["advent-of-code"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomfran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-12-01T11:27:35.000Z","updated_at":"2024-07-27T09:18:49.000Z","dependencies_parsed_at":"2023-03-17T13:15:36.782Z","dependency_job_id":null,"html_url":"https://github.com/tomfran/advent-of-code-setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomfran%2Fadvent-of-code-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomfran%2Fadvent-of-code-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomfran%2Fadvent-of-code-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomfran%2Fadvent-of-code-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomfran","download_url":"https://codeload.github.com/tomfran/advent-of-code-setup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223909967,"owners_count":17223592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advent-of-code"],"created_at":"2024-08-03T18:00:58.626Z","updated_at":"2024-11-10T04:11:26.323Z","avatar_url":"https://github.com/tomfran.png","language":"Python","funding_links":[],"categories":["Project Templates"],"sub_categories":[],"readme":"# Advent of code setup\n\nJumpstart your Advent of Code experience. Automate input downloads and easily create templates for your solutions, so you can focus on solving the challenges.\n\n## Setup\nRun `make setup`, this will create the `inputs` directory and the `session.cookie` file, please remember to fill the latter with your session cookie to auto-download inputs, and add a newline after it, just in case.\nTo find it on Chrome: right-click, inspect, Application tab, Storage, Cookies, session.\n\nIf you plan on making a fork public, you might want to add this file to `.gitignore`.\n\n## Creating a new solution\n\n```make new``` creates a new file for today, it checks for the files in `src/` and creates the \"next int\" one. On the first run it will create `01.py`, later `02.py`, and so on.\n\nA new solution is initialized as follows: \n```\nfrom utils.api import get_input\n\ninput_str = get_input(1)\n\n# WRITE YOUR SOLUTION HERE\n```\nThe `get_input` function takes a day and returns the content of the input for that day, this internally makes a request to obtain the input if it is not found on disk. \n\n## Running a new solution\n\nFrom the main directory, run `python src/\u003cDAY\u003e.py`.\n\n## Pretty README\n`make readme` creates a cool `README.md` file with a list of the solutions in the source directory, with working links. Note that this original readme will be overwritten.\nIf you want to use this, please edit `src/utils/build_md.py` with the correct repository link.\nAlso, the `parse` method could be extended to display what you want for each solution. For instance, by uncommenting line 8, and renaming your files like `DAY_Cool_Problem_name.py`, you will get a list entry like `DAY. Cool Problem name`.\n\n## Solving other years\nThis repo can be used to setup past years aswell, the only downside is that you need to change the `YEAR = 2022` variable on `src/utils/api.py`.\n\n--- \nIf you found this useful please leave a star, or even better get in touch! Happy coding :christmas_tree:","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomfran%2Fadvent-of-code-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomfran%2Fadvent-of-code-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomfran%2Fadvent-of-code-setup/lists"}