{"id":20145860,"url":"https://github.com/usagi/build-pretty","last_synced_at":"2025-04-09T19:20:39.770Z","repository":{"id":57676452,"uuid":"488452471","full_name":"usagi/build-pretty","owner":"usagi","description":null,"archived":false,"fork":false,"pushed_at":"2022-05-04T04:33:17.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T21:11:28.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/usagi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-04T04:33:15.000Z","updated_at":"2023-01-16T13:16:39.000Z","dependencies_parsed_at":"2022-09-02T15:02:18.707Z","dependency_job_id":null,"html_url":"https://github.com/usagi/build-pretty","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/usagi%2Fbuild-pretty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi%2Fbuild-pretty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi%2Fbuild-pretty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi%2Fbuild-pretty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usagi","download_url":"https://codeload.github.com/usagi/build-pretty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248094991,"owners_count":21046770,"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":[],"created_at":"2024-11-13T22:18:27.500Z","updated_at":"2025-04-09T19:20:39.745Z","avatar_url":"https://github.com/usagi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![github]](https://github.com/usagi/build-pretty)\u0026ensp;[![crates-io]](https://crates.io/crates/build-pretty)\u0026ensp;[![docs-rs]](https://docs.rs/build-pretty)\u003cbr\u003e\n\n[github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge\u0026labelColor=555555\u0026logo=github\n[crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge\u0026labelColor=555555\u0026logo=rust\n[docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge\u0026labelColor=555555\u0026logoColor=white\u0026logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K\n\n\u003cimg src=\"https://imgur.com/yZIc3WP.png\" alt=\"image1\"\u003e\n\n# build-pretty\n\nThis lib crate is one of workarround solution for log displaying of [Build Scripts]() issue such as [rust-lang/cargo#985]().\n\n[Build Scripts]: https://doc.rust-lang.org/cargo/reference/build-scripts.html\n[rust-lang/cargo#985]: https://github.com/rust-lang/cargo/issues/985\n\n## Usage\n\n1. Add `build-pretty` dependency in `[build-dependencies]` of your project's `Cargo.toml`\n\n```toml\n[package]\n...\nbuild = \"build.rs\"\n...\n[build-dependencies]\nbuild-pretty = \"*\"\n```\n\n2. Write your `build.rs` with `build-pretty`:\n\n```rust\nuse build_pretty::{\n build_pretty,\n CommandBuilder\n};\n\nfn main()\n{\n build_pretty!()\n  .enque_command(\"Drink a cup of tea\", CommandBuilder::new_with_arg(\"echo\", \"🍵 Green!\\n☕ Black!\\n🧋 Bubbles!\").into())\n  .enque_command(\"Eat a hotdog\", CommandBuilder::new_with_arg(\"echo\", \"🌭 Hotdog!\\n♨️ Hot?\\n🐕 Dog!\\n🌶️ Hot?\\n🐶 Dog?\").into())\n  .enque_command(\"ls -l -a\", CommandBuilder::new_with_args(\"ls\", \u0026[\"-l\", \"-a\"]).into())\n  .enque_fn(\"Ofcourse Fn can be used\", Box::new(|output|{ *output = \"brabrabra\\nmewmewmew\\nnekonyankonyanko🐾\".to_string(); Ok(()) }))\n  .enque_command(\"Sleep\", CommandBuilder::new_with_arg(\"echo\", \"😴 I'm sleee....\\n💤...\\n🛌....pyyyyy....\").into());\n}\n```\n\nand then:\n\n\u003cimg src=\"https://imgur.com/yZIc3WP.png\" alt=\"image1\"\u003e\n\n## Examples:\n\n- [examples/might_be_complete/](examples/might_be_complete/)\n- [examples/might_be_safe_panic/](examples/might_be_safe_panic/)\n\n## Features:\n\n- `std::process::Command` runner with STDOUT/STRERR log capturing!\n- `Fn` runner with `String` output capturing!\n- `cargo_warning_ln!` macro, it's also to Build Script version `println!`.\n- runtime message customize feature. on/off, change message detail as your like with easy template keywords.\n- i18n subsystem support. (using [rust-i18n](https://crates.io/crates/rust-i18n))\n  - Currently supported: en ja\n  - Welcome your additional language support PR!😆\n\n## LICENSE\n\n- [MIT](LICENSE.md)\n\n## Author\n\n- USAGI.NETWORK / Usagi Ito \u003chttps://github.com/usagi/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusagi%2Fbuild-pretty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusagi%2Fbuild-pretty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusagi%2Fbuild-pretty/lists"}