{"id":20145863,"url":"https://github.com/usagi/fold-license","last_synced_at":"2025-04-09T19:20:40.741Z","repository":{"id":57678465,"uuid":"493831874","full_name":"usagi/fold-license","owner":"usagi","description":null,"archived":false,"fork":false,"pushed_at":"2022-05-18T21:40:38.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T23:03:14.344Z","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-18T21:34:17.000Z","updated_at":"2023-01-16T13:14:20.000Z","dependencies_parsed_at":"2022-09-14T03:22:44.811Z","dependency_job_id":null,"html_url":"https://github.com/usagi/fold-license","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%2Ffold-license","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi%2Ffold-license/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi%2Ffold-license/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usagi%2Ffold-license/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usagi","download_url":"https://codeload.github.com/usagi/fold-license/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248094992,"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:28.427Z","updated_at":"2025-04-09T19:20:40.713Z","avatar_url":"https://github.com/usagi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![github]](https://github.com/usagi/fold-license)\u0026ensp;[![crates-io]](https://crates.io/crates/fold-license)\u0026ensp;[![docs-rs]](https://docs.rs/fold-license)\u003cbr\u003e\n[![Build Status](https://travis-ci.org/usagi/fold-license.svg?branch=master)](https://travis-ci.org/usagi/fold-license)\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# fold-license\n\nFolding licenses from multiple dirs with `cargo`/Cargo.toml and `yarn`/package.json.\n\n- [x] multiple repos dirs support with glob patterns.\n  - eg.) `fold-license -i path/to/repos1 -i path/to/repos2 -i path/to/repos3`\n  - eg.) `fold-license -i path1/**/*/ -i path2/foo/bar`\n- Repos type:\n  - [x] `cargo`/Cargo.toml repos of a Rust project. (Need `cargo` CLI installed env.)\n  - [x] `yarn`/packages.json repos of a Node.js project. (Need `yarn` CLI installed env.)\n- Output to:\n  - [x] STDOUT\n  - [x] File\n- Output with:\n  - [x] TOML format, non-pretty or pretty.\n  - [x] JSON format, non-pretty or pretty.\n  - [x] MSGPACK format, binary.\n- [x] unification from a multiple licenses from a multiple source dirs.\n- Run-time configuration from:\n  - [x] Command line arguments.\n  - [x] Prepared configuration file.\n\n## Screenshots\n\n1. Run:\n\n![image](https://user-images.githubusercontent.com/115972/169159766-00356b61-1d60-410f-812f-33ea27a33e44.png)\n\n2. And then you got the licenses for all of indivisual repos dirs!\n\n![image](https://user-images.githubusercontent.com/115972/169160142-1504668a-5d67-4c55-a4d5-07c3f6fa6c23.png)\n\n### Install\n\n```sh\ncargo install fold-licenses\n```\n\n## Usage\n\nnote: This package include both of bin and lib. In this section, I explain only the bin version. See also lib.rs and docs if you want to use lib version.\n\n`fold-license --help`:\n\n```sh\nUSAGE:\n    fold-license [OPTIONS]\n\nOPTIONS:\n    -c, --conf \u003cCONF\u003e        Use configuration file if set the path. -c path/to/conf.toml\n        --cargo              `cargo`/Cargo.toml, enabled\n    -f, --format \u003cFORMAT\u003e    toml, json, msgpack. -e json\n    -h, --help               Print help information\n    -i, --in \u003cIN\u003e            input glob pattern(s). -i aaa -i bbb -i ccc ...\n    -o, --out \u003cOUT\u003e          output to the path if set. else, output to stdout\n    -p, --pretty             pretty output. **ONLY TO USE WITH A TEXT FORMAT**\n    -s, --silent             silet a log messages\n    -V, --version            Print version information\n        --yarn               `yarn`/packages.json, enabled\n```\n\n1. eg.) `fold-license -i . -i path/to/somewhere -i 'target/**/pattern/*' -o target/output.toml -s -p --cargo --yarn`\n2. eg.) `fold-license -c example/example-conf.toml` if you want to use `-c` and prepared configuration file:\n\n```toml\n# example-conf.toml; `fold-license -c example/example-conf.toml`\nformat = \"toml\"\nin = [\".\", \"path/to/somewhere\", \"target/**/pattern/*\"]\nout = \"target/output.toml\"\nsilent = true\npretty = true\ncargo = true\nyarn = true\n```\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%2Ffold-license","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusagi%2Ffold-license","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusagi%2Ffold-license/lists"}