{"id":14990001,"url":"https://github.com/breakthatbass/eggnog","last_synced_at":"2025-04-12T02:03:33.616Z","repository":{"id":45493875,"uuid":"354920813","full_name":"breakthatbass/eggnog","owner":"breakthatbass","description":"🎅🏻 Download inputs, puzzle directions, \u0026 submit answers to Advent of Code puzzles in your terminal","archived":false,"fork":false,"pushed_at":"2021-12-10T13:44:05.000Z","size":982,"stargazers_count":20,"open_issues_count":5,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T02:03:13.190Z","etag":null,"topics":["advent-of-code","christmas","cli","game","libcurl"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/breakthatbass.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}},"created_at":"2021-04-05T17:47:39.000Z","updated_at":"2024-12-03T17:27:51.000Z","dependencies_parsed_at":"2022-07-19T01:47:31.828Z","dependency_job_id":null,"html_url":"https://github.com/breakthatbass/eggnog","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/breakthatbass%2Feggnog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breakthatbass%2Feggnog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breakthatbass%2Feggnog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breakthatbass%2Feggnog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/breakthatbass","download_url":"https://codeload.github.com/breakthatbass/eggnog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505863,"owners_count":21115354,"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","christmas","cli","game","libcurl"],"created_at":"2024-09-24T14:19:18.129Z","updated_at":"2025-04-12T02:03:33.578Z","avatar_url":"https://github.com/breakthatbass.png","language":"C","funding_links":[],"categories":["Tools and Utilities"],"sub_categories":[],"readme":"\u003cimg src=\"eggnog.gif\" height=\"200\" alt=\"Clark Griswold\"\u003e \n\n# eggnog 🎄\nYet another Advent of Code CLI tool...\n\n`eggnog` is a tool that allows you to download [Advent of Code](https://adventofcode.com) puzzle inputs, puzzle directions, and submit answers in the terminal. \n\nIt caches everything - even when a wrong answer is submitted.\n#\n\n## Installation\n`eggnog` works on MacOS and Linux.  \n\nSet the `NOG_INSTALL_PATH` environment variable.\n```\n# an installation option...\nexport NOG_INSTALL_PATH=/usr/local/bin\n```\nThen run\n```\nmake install\n```\n### Dependencies\nIt relies on the [`libcurl`](https://curl.se/libcurl/) C library for http requests. Chances are it's already installed and you don't have to do anything. But if it doesn't work you may have to download it.  \n\n**MacOS**  \n```\nbrew install curl\n```\n**Linux**  \n```\nsudo apt update\nsudo apt-get install libcurl4-gnutls-dev\n# or whatever packager you use\n```\n#\n## Run Tests\n```\nmake tests\n```\n#\n## Usage\n```\nnog [--day=\u003cday\u003e --year=\u003cyear\u003e] [OPTION] \n```\n\nDay \u0026 year are required unless Advent is happening - latest puzzle will automatically\nbe returned.\n```\n    -y \u003cyear\u003e, --year=\u003cyear\u003e\n\tThe year of the puzzle you want to do.\n\n    -d \u003cday\u003e, --day=\u003cday\u003e\n\tThe day of the puzzle you want to do.\n```\n\n**Options**:\nIf no options are supplied, input is assumed.\n```\n    -i, --input\n\tDownload puzzle input.\n\n    -p, --directions\n\tGet puzzle directions.\n\n    -s, --submit=\u003canswer\u003e\n\tsubmit an answer to a puzzle. If no answer is supplied, read from\n\tstdin. Using '-s' automatically reads from stdin.\n\n    -l \u003cpuzzle part\u003e, --level=\u003cpuzzle part\u003e\n\tIndicate whether submitting an answer to part 1 or part 2 of a puzzle.\n\tIf left out, part 1 is assumed. **Required for submitting part 2 answers**.\n```\nGetting the puzzle input will print it to the terminal in the same way it would with `curl`.\nThe purpose of that is because many advent of code solutions read from `stdin` rather than a hardcoded file name in the code.\n\n\n### Example usage\nGet input for year 2020 day 1:  \n- `nog -y 2020 -d 1`\n- or save to a file --\u003e `nog -y 2020 -d 1 \u003e input.txt`\n- or pipe it into your program --\u003e   `nog -y 2020 -d 1 | ./myprogram`\n\nSubmit an answer for year 2020 day 1 part 1:  \n- `nog -y 2020 -d 1 --submit=1234`  \n\nOr read from `stdin` to provide your answer:  \n- `./myprogram | nog -y 2020 -d 1 -s`  \n\nSubmit an answer for part 2:  \n- `nog -y 2020 -d 1 -l 2 -s`\n\n## Cache\n`eggnog` creates a local cache in the `$HOME` directory called `.eggnog`.  \n\nPuzzle directions, inputs, and all right and wrong answer submission attempts are saved. The cache is always checked before querying Advent of Code servers.\n\nUnless the cache is deleted, any query to the servers happens only once.\n\n## To Do\n- WHen submitting an answer, if it's wrong, record the time. Require at least a minute to pass before sending another answer attempt.\n\n## Known Bugs\n- The bug that prevented from submitting answers to part 2 has been fixed ✔️\n\n## Contributing\nIf you would like to contribute, feel free to make a pull request.  \nOr if you find a bug, open an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreakthatbass%2Feggnog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbreakthatbass%2Feggnog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreakthatbass%2Feggnog/lists"}