{"id":46320370,"url":"https://github.com/yuniqueunic/cargo-thanku","last_synced_at":"2026-03-04T15:01:34.793Z","repository":{"id":282435613,"uuid":"948030421","full_name":"YuniqueUnic/cargo-thanku","owner":"YuniqueUnic","description":"cargo-thanku | Rust Dependency Acknowledgment Generator 🦀 ❤️‍🔥 Enhanced cargo-thanks, give an Acknowledgment to your rust project for thanks. Automatically generate polished acknowledgments for your Rust project's dependencies ✨ Multi-format outputs (Markdown/JSON/YAML/CSV) • 🚀 Concurrent GitHub/crates.io API integration • 🌐 Multi-languages","archived":false,"fork":false,"pushed_at":"2025-11-21T05:43:55.000Z","size":559,"stargazers_count":32,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-21T06:07:05.085Z","etag":null,"topics":["acknowledgement","cargo","cli","rust","thanks","tool"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/cargo-thanku","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/YuniqueUnic.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-13T16:24:06.000Z","updated_at":"2025-11-21T05:43:59.000Z","dependencies_parsed_at":"2025-03-14T16:39:15.160Z","dependency_job_id":"0201da4c-d40e-4925-a6b5-10e58387c1df","html_url":"https://github.com/YuniqueUnic/cargo-thanku","commit_stats":null,"previous_names":["yuniqueunic/cargo-thanku"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/YuniqueUnic/cargo-thanku","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuniqueUnic%2Fcargo-thanku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuniqueUnic%2Fcargo-thanku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuniqueUnic%2Fcargo-thanku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuniqueUnic%2Fcargo-thanku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YuniqueUnic","download_url":"https://codeload.github.com/YuniqueUnic/cargo-thanku/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuniqueUnic%2Fcargo-thanku/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30084685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["acknowledgement","cargo","cli","rust","thanks","tool"],"created_at":"2026-03-04T15:01:33.519Z","updated_at":"2026-03-04T15:01:34.766Z","avatar_url":"https://github.com/YuniqueUnic.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cargo Thanku\n\n[中文 README.md](./README_CN.md)\n\nA command-line tool for generating acknowledgments for your Rust project dependencies.\n\n## Key Features\n\n- Generates acknowledgments in multiple formats (Markdown table/list, JSON, TOML, CSV, YAML)\n- Fetches dependency information from crates.io and GitHub\n- Supports concurrent processing with configurable limits\n- Implements retry mechanism for failed requests\n- Offers command-line completion for Bash, Zsh, Fish, PowerShell, and Elvish\n- Provides internationalization support (zh/en/ja/ko/es/fr/de/it)\n\n## Architecture Overview\n\n- `src/app` owns CLI bootstrapping, command dispatch (`convert`, `completions`, `test`), logging initialization, and the asynchronous dependency-processing pipeline built on `tokio` semaphores plus `FuturesUnordered` for smoother bounded concurrency.\n- `src/output` is split into focused modules:\n  - `output/dependency.rs` defines the domain entities (`DependencyInfo`, `DependencyKind`, parsing helpers, failure helpers).\n  - `output/markdown/tokenizer.rs` exposes a lightweight tokenizer for Markdown list headers/items so parsing no longer relies on brittle string splits.\n  - `output/format/` hosts Markdown, CSV, and structured (JSON/TOML/YAML) formatters behind a shared `Formatter` trait and `OutputFormat` enum.\n  - `output/manager.rs` centralizes writer orchestration so CLI and the converter can stream results to stdout/files uniformly.\n- `sources.rs` keeps HTTP clients (crates.io + GitHub) isolated; integration-style tests that hit the network are flagged with `#[ignore]` so the default `cargo test` run stays deterministic/offline-friendly.\n- `travert::Converter` parses once using a streaming `BufReader` and writes each target file via `BufWriter`, which reduces peak memory and improves throughput for large conversion batches.\n- `tests/` mirrors the module layout (`config_tests.rs`, `markdown_format_tests.rs`, etc.) and runs entirely through the public API; ignored cases (like live crates.io calls) are clearly tagged so CI remains deterministic.\n\nA quick glance at `app/pipeline.rs` + `output/` is usually all you need to understand how new data sources or formats plug into the tool.\n\n## Installation\n\nEnsure you have the Rust toolchain installed on your system, then execute:\n\n```bash\n# Install cargo-thanku\ncargo install cargo-thanku\n\n# Generate shell completions (optional)\ncargo thanku completions bash \u003e ~/.local/share/bash-completion/completions/cargo-thanku\n```\n\n## Usage\n\n### Basic Usage\n\n```bash\n# Generate acknowledgments for your project\ncargo thanku\n\n# Specify output format\ncargo thanku -f markdown-table  # or markdown-list, json, csv, yaml, toml\n\n# Set GitHub token for more information and automatic starring\ncargo thanku -t YOUR_GITHUB_TOKEN\n\n# Change language\ncargo thanku -l en  # supports zh/en/ja/ko/es/fr/de/it\n```\n\n### Advanced Options\n\n```bash\n# Configure concurrent requests\ncargo thanku -j 10  # Set maximum concurrent requests to 10\n\n# Adjust retry attempts\ncargo thanku -r 5   # Set maximum retry attempts to 5\n\n# Customize output file\ncargo thanku -o custom_thanks.md\n\n# Enable verbose logging\ncargo thanku -v\n\n# Filter out libraries imported with relative paths\ncargo thanku --no-relative-libs\n```\n\n### Format Conversion\n\nConvert between different output formats:\n\n```bash\n# Do support `cargo thanku convert` syntax to invoke converter \n# Convert a single file to multiple formats\ncargo-thanku convert input.md -o markdown-table,json,yaml,toml\n\n# Short command aliases\ncargo-thanku cvt input.csv -o mt,yaml\ncargo-thanku conv input.md -o json,csv\ncargo-thanku convt input.yaml -o markdown-list\n```\n\nThe converter will:\n- Create a `converted` directory in the same location as the input file\n- Generate output files with appropriate extensions\n- Support conversion between all supported formats (mt[markdown-table], ml[markdown-list], json, toml, yaml, csv)\n\n#### Command-Line Arguments\n  \n| Argument            | Description                                        | Default Value     |\n|---------------------|----------------------------------------------------|-------------------|\n| `-i, --input`       | Input Cargo.toml file path                         | -                 |\n| `-o, --outputs`     | Output file formats                                | -                 |\n| `-l, --language`    | Language (zh/en/ja/ko/es/fr/de/it)                 | `zh`              |\n| `-v, --verbose`     | Enable verbose logging                             | `false`           |\n\n### Command-Line Completion\n\nGenerate command-line completion scripts for various shells:\n\n```bash\n# Bash\ncargo thanku completions bash \u003e ~/.local/share/bash-completion/completions/cargo-thanku\n\n# Zsh\ncargo thanku completions zsh \u003e ~/.zsh/_cargo-thanku\n\n# Fish\ncargo thanku completions fish \u003e ~/.config/fish/completions/cargo-thanku.fish\n\n# PowerShell\nmkdir -p $PROFILE\\..\\Completions\ncargo thanku completions powershell \u003e $PROFILE\\..\\Completions\\cargo-thanku.ps1\n\n# Elvish\ncargo thanku completions elvish \u003e ~/.elvish/lib/cargo-thanku.elv\n```\n\n## Testing\n\nRun the entire suite (unit-style and integration) with:\n\n```bash\ncargo test\n```\n\nNetwork-dependent checks are ignored by default; include them with `cargo test -- --ignored` when you have connectivity and credentials.\n\n## Command-Line Arguments\n\n| Argument            | Description                                        | Default Value     |\n|---------------------|----------------------------------------------------|-------------------|\n| `-i, --input`       | Input Cargo.toml file path                         | `Cargo.toml`      |\n| `-o, --output`      | Output file path                                   | `thanks.md`       |\n| `-f, --format`      | Output format                                      | `markdown-table`  |\n| `-t, --token`       | GitHub API token                                   | -                 |\n| `-l, --language`    | Language (zh/en/ja/ko/es/fr/de/it)                 | `zh`              |\n| `-v, --verbose`     | Enable verbose logging                             | `false`           |\n| `-j, --concurrent`  | Maximum concurrent requests                        | `5`               |\n| `-r, --retries`     | Maximum retry attempts                             | `3`               |\n| `--no-relative-libs`| Filter out libraries imported with relative paths  | `false`           |\n\n## Output Formats\n\n### Markdown Table\n```markdown\n| Name | Description | Source | Stats | Status |\n|------|-------------|--------|-------|--------|\n|🔍   |  Normal     |        |       |        |\n|[serde](https://crates.io/crates/serde) | Serialization framework | [GitHub](https://github.com/serde-rs/serde) | 🌟 3.5k | ✅ |\n```\n\n### Markdown List\n```markdown\n# Dependencies\n\n- [serde](https://crates.io/crates/serde) [Serialization framework](https://github.com/serde-rs/serde) (🌟 3.5k) ✅\n```\n\n### MARKDOWN/JSON/TOML/YAML/CSV\nAlso supports structured output formats for programmatic use.\n\n## Important Notes\n\n1. Setting a GitHub token (`-t` or `GITHUB_TOKEN` env) enables:\n   - Fetching additional repository information\n   - Automatic fetching stars of dependency repositories\n   - Higher API rate limits\n\n2. Failed dependency processing:\n   - Won't interrupt the overall process\n   - Will be marked with ❌ in the output\n   - Shows error messages for debugging\n\n3. Language codes:\n   - Supports flexible formats (e.g., \"en\", \"en_US\", \"en_US.UTF-8\")\n   - Falls back to primary language code\n   - Suggests similar codes for typos\n\n## Acknowledgments\n\nThis project itself is built with many excellent Rust crates. Here are some key dependencies:\n\n\u003e [!TIP]\n\u003e Generated by `cargo-thanku` tool\n\n| Name | Description | Crates.io | Source | Stats | Status |\n|------|--------|--------|-------|-------|--------|\n|🔍|Normal| | | | |\n| anyhow | Flexible concrete Error type built on std::error::Error | [anyhow](https://crates.io/crates/anyhow) | [GitHub](https://github.com/dtolnay/anyhow) | ❓ | ✅ |\n| cargo_metadata | structured access to the output of `cargo metadata` | [cargo_metadata](https://crates.io/crates/cargo_metadata) | [GitHub](https://github.com/oli-obk/cargo_metadata) | ❓ | ✅ |\n| clap | A simple to use, efficient, and full-featured Command Line Argument Parser | [clap](https://crates.io/crates/clap) | [GitHub](https://github.com/clap-rs/clap) | ❓ | ✅ |\n| clap_complete | Generate shell completion scripts for your clap::Command | [clap_complete](https://crates.io/crates/clap_complete) | [GitHub](https://github.com/clap-rs/clap) | ❓ | ✅ |\n| futures | An implementation of futures and streams featuring zero allocations, composability, and iterator-like interfaces.  | [futures](https://crates.io/crates/futures) | [GitHub](https://github.com/rust-lang/futures-rs) | ❓ | ✅ |\n| reqwest | higher level HTTP client library | [reqwest](https://crates.io/crates/reqwest) | [GitHub](https://github.com/seanmonstar/reqwest) | ❓ | ✅ |\n| rust-i18n | Rust I18n is use Rust codegen for load YAML file storage translations on compile time, and give you a t! macro for simply get translation texts. | [rust-i18n](https://crates.io/crates/rust-i18n) | [GitHub](https://github.com/longbridge/rust-i18n) | ❓ | ✅ |\n| serde | A generic serialization/deserialization framework | [serde](https://crates.io/crates/serde) | [GitHub](https://github.com/serde-rs/serde) | ❓ | ✅ |\n| serde_json | A JSON serialization file format | [serde_json](https://crates.io/crates/serde_json) | [GitHub](https://github.com/serde-rs/json) | ❓ | ✅ |\n| serde_yaml | YAML data format for Serde | [serde_yaml](https://crates.io/crates/serde_yaml) | [GitHub](https://github.com/dtolnay/serde-yaml) | ❓ | ✅ |\n| strsim | Implementations of string similarity metrics. Includes Hamming, Levenshtein, OSA, Damerau-Levenshtein, Jaro, Jaro-Winkler, and Sørensen-Dice.  | [strsim](https://crates.io/crates/strsim) | [GitHub](https://github.com/rapidfuzz/strsim-rs) | ❓ | ✅ |\n| thiserror | derive(Error) | [thiserror](https://crates.io/crates/thiserror) | [GitHub](https://github.com/dtolnay/thiserror) | ❓ | ✅ |\n| tokio | An event-driven, non-blocking I/O platform for writing asynchronous I/O backed applications.  | [tokio](https://crates.io/crates/tokio) | [GitHub](https://github.com/tokio-rs/tokio) | ❓ | ✅ |\n| toml | A native Rust encoder and decoder of TOML-formatted files and streams. Provides implementations of the standard Serialize/Deserialize traits for TOML data to facilitate deserializing and serializing Rust structures.  | [toml](https://crates.io/crates/toml) | [GitHub](https://github.com/toml-rs/toml) | ❓ | ✅ |\n| tracing | Application-level tracing for Rust.  | [tracing](https://crates.io/crates/tracing) | [GitHub](https://github.com/tokio-rs/tracing) | ❓ | ✅ |\n| tracing-subscriber | Utilities for implementing and composing `tracing` subscribers.  | [tracing-subscriber](https://crates.io/crates/tracing-subscriber) | [GitHub](https://github.com/tokio-rs/tracing) | ❓ | ✅ |\n| url | URL library for Rust, based on the WHATWG URL Standard | [url](https://crates.io/crates/url) | [GitHub](https://github.com/servo/rust-url) | ❓ | ✅ |\n|🔧|Development| | | | |\n| assert_fs | Filesystem fixtures and assertions for testing. | [assert_fs](https://crates.io/crates/assert_fs) | [GitHub](https://github.com/assert-rs/assert_fs.git) | ❓ | ✅ |\n| pretty_assertions | Overwrite `assert_eq!` and `assert_ne!` with drop-in replacements, adding colorful diffs. | [pretty_assertions](https://crates.io/crates/pretty_assertions) | [GitHub](https://github.com/rust-pretty-assertions/rust-pretty-assertions) | ❓ | ✅ |\n| tokio-test | Testing utilities for Tokio- and futures-based code  | [tokio-test](https://crates.io/crates/tokio-test) | [GitHub](https://github.com/tokio-rs/tokio) | ❓ | ✅ |\n\nFor a complete list of dependencies and their acknowledgments, run:\n\n```bash\ncargo thanku\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE.md) file for details. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuniqueunic%2Fcargo-thanku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuniqueunic%2Fcargo-thanku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuniqueunic%2Fcargo-thanku/lists"}