{"id":17149514,"url":"https://github.com/herbygillot/cargo2ports","last_synced_at":"2025-09-08T09:42:32.476Z","repository":{"id":37414562,"uuid":"264736611","full_name":"herbygillot/cargo2ports","owner":"herbygillot","description":"Generate cargo.crates stanzas for MacPorts from a Rust project's Cargo.lock file","archived":false,"fork":false,"pushed_at":"2023-11-30T22:40:22.000Z","size":11,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T11:49:26.569Z","etag":null,"topics":["macports","rust-cargo"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/herbygillot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-05-17T19:01:16.000Z","updated_at":"2023-11-30T22:40:27.000Z","dependencies_parsed_at":"2025-04-13T11:43:46.634Z","dependency_job_id":"803c07f4-778d-4bb6-aa76-babba86960bd","html_url":"https://github.com/herbygillot/cargo2ports","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/herbygillot/cargo2ports","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbygillot%2Fcargo2ports","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbygillot%2Fcargo2ports/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbygillot%2Fcargo2ports/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbygillot%2Fcargo2ports/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/herbygillot","download_url":"https://codeload.github.com/herbygillot/cargo2ports/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbygillot%2Fcargo2ports/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274166741,"owners_count":25233959,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["macports","rust-cargo"],"created_at":"2024-10-14T21:33:19.594Z","updated_at":"2025-09-08T09:42:32.451Z","avatar_url":"https://github.com/herbygillot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cargo2ports\n\nSimple Python utility to generate a `cargo.crates` stanza for a MacPorts\nPortfile from a Rust project's lockfile.\n\nFor example, taking in a `Cargo.lock` file that looks like this:\n\n```\n# This file is automatically @generated by Cargo.\n# It is not intended for manual editing.\n[[package]]\nname = \"ahash\"\nversion = \"0.3.4\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"9c251dce3391a07b43218ca070203ecb8f9f520d35ab71312296a59dbceab154\"\ndependencies = [\n \"const-random\",\n]\n\n[[package]]\nname = \"aho-corasick\"\nversion = \"0.7.10\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada\"\ndependencies = [\n \"memchr\",\n]\n...\n```\n\n...this utility will generate this:\n\n```\ncargo.crates \\\n    ahash                            0.3.4  9c251dce3391a07b43218ca070203ecb8f9f520d35ab71312296a59dbceab154 \\\n    aho-corasick                    0.7.10  8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada \\\n    ansi_term                       0.11.0  ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b \\\n    arrayref                         0.3.6  a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544 \\\n    arrayvec                         0.5.1  cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8 \\\n    atty                            0.2.14  d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8 \\\n    autocfg                          1.0.0  f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d \\\n    base64                          0.11.0  b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7 \\\n    bitflags                         1.2.1  cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693 \\\n    blake2b_simd                    0.5.10  d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a \\\n...\n```\n\n### Installation\n\nYou can install `cargo2ports` by running the following command in a virtualenv:\n\n```\npython setup.py install\n```\n\nFollow these steps to install `pipx` from MacPorts and install `cargo2ports` globally\n\n```\nsudo port selfupdate\nsudo port install pipx\npipx install git+https://github.com/herbygillot/cargo2ports.git\n```\n\nNote: Update your `$PATH` to add the pipx bin directory or update the `PIPX_BIN_DIR` environment variable.\n\n### Usage\n\n`cargo2ports ./Cargo.lock`\n\nIf you are already in a directory containing a `Cargo.lock` file, you run just the command with no parameters:\n\n`cargo2ports`\n\nIf you would like to change the number of spaces each stanza line is indented by, use `-i`:\n\n`cargo2ports -i 2 ./Cargo.lock`\n\nYou can also change the width of the field containing the name and version usin `-w`:\n\n`cargo2ports -w 25 ./Cargo.lock`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherbygillot%2Fcargo2ports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fherbygillot%2Fcargo2ports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherbygillot%2Fcargo2ports/lists"}