{"id":18665039,"url":"https://github.com/lindell/aoc-loader","last_synced_at":"2025-04-11T22:30:46.181Z","repository":{"id":38243987,"uuid":"113174598","full_name":"lindell/aoc-loader","owner":"lindell","description":"Loads Advent of Code input data for a specified day and year.","archived":false,"fork":false,"pushed_at":"2025-03-31T23:25:42.000Z","size":308,"stargazers_count":3,"open_issues_count":21,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T00:25:49.393Z","etag":null,"topics":["advent","advent-of-code","aoc","puzzle"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lindell.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-05T11:39:48.000Z","updated_at":"2023-12-17T11:32:36.000Z","dependencies_parsed_at":"2023-09-28T21:26:03.537Z","dependency_job_id":"6612bb7d-58c5-4f73-ba1b-71a1baf4db18","html_url":"https://github.com/lindell/aoc-loader","commit_stats":{"total_commits":78,"total_committers":5,"mean_commits":15.6,"dds":0.5,"last_synced_commit":"e0926535cd2f0a0c8d68295cfc9dc4178b1a1665"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindell%2Faoc-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindell%2Faoc-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindell%2Faoc-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindell%2Faoc-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lindell","download_url":"https://codeload.github.com/lindell/aoc-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248489488,"owners_count":21112584,"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","advent-of-code","aoc","puzzle"],"created_at":"2024-11-07T08:26:01.671Z","updated_at":"2025-04-11T22:30:45.704Z","avatar_url":"https://github.com/lindell.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code Input Loader\n\nLoads [Advent of Code](http://adventofcode.com/) input data for a specified day and year. In order not to flood the website, the input data is cached in the temporary folder. The following executions, the data will be read from there.\n\n## Install\n\n```sh\nnpm install aoc-loader\n```\n\n## Use\n\n```javascript\nconst aocLoader = require('aoc-loader');\n\nconst year = 2020;\nconst day = 1;\n\naocLoader(year, day, sessionCookie).then((data) =\u003e {\n    console.log(data);\n});\n```\n\nIf no `sessionCookie` is provided, `aocLoader` will try to get it from the `AOC_SESSION` environment variable. This is the recommended way of using this package.\n\nIf neither `sessionCookie` nor the `AOC_SESSION` environment variable is defined, then `aocLoader` will throw an error.\n\n## Get the session cookie\n\n1. Sign in to Advent of Code.\n2. Open the developer tools of your browser.\n3. Locate the cookies for the website.\n    - E.g. in Chrome, you will find them under `Application -\u003e Cookies -\u003e https://adventofcode.com`\n4. Copy the value of the `session` cookie.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flindell%2Faoc-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flindell%2Faoc-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flindell%2Faoc-loader/lists"}