{"id":18325020,"url":"https://github.com/maxdeviant/adventurous","last_synced_at":"2025-04-06T00:31:08.188Z","repository":{"id":57480134,"uuid":"159968227","full_name":"maxdeviant/adventurous","owner":"maxdeviant","description":"A companion crate for solving Advent of Code puzzles.","archived":false,"fork":false,"pushed_at":"2023-12-03T04:41:01.000Z","size":46,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T13:53:31.099Z","etag":null,"topics":["advent-of-code","advent-of-code-2023","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/adventurous/","language":"Rust","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/maxdeviant.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2018-12-01T17:12:23.000Z","updated_at":"2023-12-02T20:20:18.000Z","dependencies_parsed_at":"2024-11-05T18:53:27.614Z","dependency_job_id":null,"html_url":"https://github.com/maxdeviant/adventurous","commit_stats":{"total_commits":31,"total_committers":1,"mean_commits":31.0,"dds":0.0,"last_synced_commit":"3fed31ad54ade138639556f7ab8414c8b2e5dca0"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdeviant%2Fadventurous","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdeviant%2Fadventurous/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdeviant%2Fadventurous/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdeviant%2Fadventurous/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxdeviant","download_url":"https://codeload.github.com/maxdeviant/adventurous/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419597,"owners_count":20936009,"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","advent-of-code-2023","rust"],"created_at":"2024-11-05T18:36:33.329Z","updated_at":"2025-04-06T00:31:06.662Z","avatar_url":"https://github.com/maxdeviant.png","language":"Rust","readme":"# Adventurous\n\nAdventurous is a companion crate to assist you in solving [Advent of Code](https://adventofcode.com) puzzles.\n\n[![crates.io](https://img.shields.io/crates/v/adventurous.svg)](https://crates.io/crates/adventurous)\n[![docs.rs](https://docs.rs/adventurous/badge.svg)](https://docs.rs/adventurous)\n[![license](https://img.shields.io/crates/l/adventurous.svg)](https://github.com/maxdeviant/adventurous/blob/main/LICENSE)\n\n## Installation\n\n```toml\n[dependencies]\nadventurous = \"0.3.0\"\n```\n\n## Examples\n\n### Solving a puzzle\n\n```rust no_run\nuse adventurous::Input;\nuse anyhow::Result;\n\n#[adventurous::part_one]\nfn part_one(input: \u0026Input) -\u003e Result\u003cusize\u003e {\n    Ok(input\n        .traverse(|line| {\n            // Do something with the line...\n            line.parse::\u003cusize\u003e()\n        })?\n        .sum())\n}\n\n#[adventurous::part_two]\nfn part_two(_input: \u0026Input) -\u003e Result\u003cusize\u003e {\n    todo!()\n}\n\nfn main() -\u003e Result\u003c()\u003e {\n    adventurous::run(\"input.txt\", part_one, part_two)\n}\n```\n\n### Regression testing\n\nOnce a solution has been solved, you can provide the correct answer for each part using the `#[part_one]` and `#[part_two]` attributes.\n\nCalling `test_solutions!()` inside of your `tests` module will generate regression tests that ensure the output from your solvers matches the correct answer.\n\n```rust\nuse adventurous::Input;\nuse anyhow::Result;\n\n#[adventurous::part_one(answer = \"73\")]\nfn part_one(input: \u0026Input) -\u003e Result\u003cusize\u003e {\n    Ok(input\n        .traverse(|line| {\n            // Do something with the line...\n            line.parse::\u003cusize\u003e()\n        })?\n        .sum())\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    adventurous::test_solutions!();\n}\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxdeviant%2Fadventurous","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxdeviant%2Fadventurous","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxdeviant%2Fadventurous/lists"}