{"id":24566213,"url":"https://github.com/archer884/grabinput","last_synced_at":"2025-04-22T10:36:32.176Z","repository":{"id":62439714,"uuid":"48770523","full_name":"archer884/grabinput","owner":"archer884","description":"Unixy lib for reading from a file or from stdin","archived":false,"fork":false,"pushed_at":"2019-01-04T21:12:29.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T10:36:16.330Z","etag":null,"topics":["input","read","rust","rust-library","stdin"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/archer884.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-29T22:50:54.000Z","updated_at":"2019-01-04T21:12:30.000Z","dependencies_parsed_at":"2022-11-01T22:00:41.231Z","dependency_job_id":null,"html_url":"https://github.com/archer884/grabinput","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/archer884%2Fgrabinput","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archer884%2Fgrabinput/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archer884%2Fgrabinput/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archer884%2Fgrabinput/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/archer884","download_url":"https://codeload.github.com/archer884/grabinput/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250221679,"owners_count":21394746,"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":["input","read","rust","rust-library","stdin"],"created_at":"2025-01-23T12:18:52.734Z","updated_at":"2025-04-22T10:36:32.033Z","avatar_url":"https://github.com/archer884.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grabinput\nUnixy lib for reading from a file or from stdin\n\n[![Build Status](https://travis-ci.org/archer884/grabinput.svg?branch=master)](https://travis-ci.org/archer884/grabinput)\n\n\u003e Note: This library provides no real safety features. If you don't want simple, no-hassle input, don't use it. This is intended to blow up in your face if anything goes wrong. That's a feature, not a bug. Seriously, it doesn't even lock standard input before reading it. Ok? Ok. Just wanted to be sure we were clear on that. :)\n\n## Installation\nAdd `grabinput = \"*\"` to your cargo dependencies.\n\n## Usage\nThis library really is intended to be dirt simple. It doesn't do much--just allows you to skip some typing when you want to read something. Like, say you want to write a program to add up all the integers in a file...\n\n```rust\nlet n: i32 = grabinput::from_args().with_fallback()\n    .filter_map(|n| n.trim().parse::\u003ci32\u003e().ok())\n    .sum();\n```\n\nThat's your whole program now. I thought about having the library trim newlines from the end of each line, because .NET's similar library functions will do that, but I guess I just figured it was faster to let the user decide--no reason to make them pay for the work if they don't care if it's done or not, right? Anyway...\n\n## License\nLicensed under either of\n * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\nat your option.\n\n### Contribution\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcher884%2Fgrabinput","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcher884%2Fgrabinput","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcher884%2Fgrabinput/lists"}