{"id":14235588,"url":"https://github.com/alacritty/copypasta","last_synced_at":"2025-06-12T15:08:54.223Z","repository":{"id":37269843,"uuid":"233135381","full_name":"alacritty/copypasta","owner":"alacritty","description":"Cross-platform Rust system clipboard library","archived":false,"fork":false,"pushed_at":"2025-05-09T16:33:48.000Z","size":67,"stargazers_count":332,"open_issues_count":5,"forks_count":38,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-11T15:19:32.204Z","etag":null,"topics":["clipboard","cross-platform","rust"],"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/alacritty.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.apache2","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-01-10T21:45:08.000Z","updated_at":"2025-06-06T06:00:04.000Z","dependencies_parsed_at":"2023-10-13T12:28:31.805Z","dependency_job_id":"8eff8cc7-cc4e-40f6-a9a3-2f6430f72785","html_url":"https://github.com/alacritty/copypasta","commit_stats":{"total_commits":31,"total_committers":6,"mean_commits":5.166666666666667,"dds":0.5806451612903225,"last_synced_commit":"94e44c83dbaf08582309b297f0ae3b1b8cd1b17c"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/alacritty/copypasta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alacritty%2Fcopypasta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alacritty%2Fcopypasta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alacritty%2Fcopypasta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alacritty%2Fcopypasta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alacritty","download_url":"https://codeload.github.com/alacritty/copypasta/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alacritty%2Fcopypasta/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259490551,"owners_count":22865769,"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":["clipboard","cross-platform","rust"],"created_at":"2024-08-20T21:02:07.536Z","updated_at":"2025-06-12T15:08:54.149Z","avatar_url":"https://github.com/alacritty.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# copypasta\n\ncopypasta is a [rust-clipboard](https://github.com/aweinstock314/rust-clipboard) fork, adding support for the Wayland clipboard.\n\nrust-clipboard is a cross-platform library for getting and setting the contents of the OS-level clipboard.  \n\n## Example\n\n```rust\nextern crate copypasta;\n\nuse copypasta::{ClipboardContext, ClipboardProvider};\n\nfn main() {\n    let mut ctx = ClipboardContext::new().unwrap();\n\n    let msg = \"Hello, world!\";\n    ctx.set_contents(msg.to_owned()).unwrap();\n\n    let content = ctx.get_contents().unwrap();\n\n    println!(\"{}\", content);\n}\n```\n\n## API\n\nThe `ClipboardProvider` trait has the following functions:\n\n```rust\nfn get_contents(\u0026mut self) -\u003e Result\u003cString, Box\u003cError\u003e\u003e;\nfn set_contents(\u0026mut self, String) -\u003e Result\u003c(), Box\u003cError\u003e\u003e;\n```\n\n`ClipboardContext` is a type alias for one of {`WindowsClipboardContext`, `OSXClipboardContext`, `X11ClipboardContext`, `NopClipboardContext`}, all of which implement `ClipboardProvider`. Which concrete type is chosen for `ClipboardContext` depends on the OS (via conditional compilation).\n\n## License\n\n`rust-clipboard` is dual-licensed under MIT and Apache2.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falacritty%2Fcopypasta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falacritty%2Fcopypasta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falacritty%2Fcopypasta/lists"}