{"id":20985796,"url":"https://github.com/skanehira/deno-clippy","last_synced_at":"2025-05-14T17:32:18.114Z","repository":{"id":56863456,"uuid":"526138775","full_name":"skanehira/deno-clippy","owner":"skanehira","description":"cross-platform Deno module for writing and reading clipboard.","archived":false,"fork":false,"pushed_at":"2024-04-26T00:18:10.000Z","size":308,"stargazers_count":46,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-20T10:06:18.763Z","etag":null,"topics":["clipboard","deno"],"latest_commit_sha":null,"homepage":"https://deno.land/x/clippy","language":"TypeScript","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/skanehira.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-08-18T09:13:00.000Z","updated_at":"2024-04-26T06:16:10.000Z","dependencies_parsed_at":"2023-02-18T03:15:22.150Z","dependency_job_id":"fcbd97af-b26f-4c7d-92cf-e91cab3bc145","html_url":"https://github.com/skanehira/deno-clippy","commit_stats":{"total_commits":61,"total_committers":3,"mean_commits":"20.333333333333332","dds":"0.47540983606557374","last_synced_commit":"84381e5f05a7e647f46a06161fb59008e9945ce9"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skanehira%2Fdeno-clippy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skanehira%2Fdeno-clippy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skanehira%2Fdeno-clippy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skanehira%2Fdeno-clippy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skanehira","download_url":"https://codeload.github.com/skanehira/deno-clippy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225191607,"owners_count":17435576,"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","deno"],"created_at":"2024-11-19T06:10:52.800Z","updated_at":"2024-11-19T06:10:53.475Z","avatar_url":"https://github.com/skanehira.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deno-clippy\n\n\u003cimg src=\"./logo.svg\" alt=\"deno-clippy logo\" width=\"200\" height=\"200\" /\u003e\n\nThis is cross-platform Deno library for writing and reading clipboard.\\\nYou can read from/write image and text.\n\nThis library uses Rust's [arboard](https://github.com/1Password/arboard) through\n[FFI](https://deno.land/manual@v1.24.3/runtime/ffi_api).\\\nTherefore, it is basically not necessary to prepare some external commands when\nusing this library.\n\nHowever, if arboard returns an error, deno-clippy will fall back and use an\nexternal command (for example, `xclip` on Linux).\\\nIf arboard does not work properly and an error occurs, installing the external\ncommand may work.\n\n## Known issue.\n\nCurrently, arboard is not work on Linux.\\\nSo, please install `xclip` when you using library on Linux.\n\n## Support Version\n\n| `deno-clippy` | `Deno`               |\n| ------------- | -------------------- |\n| v0.1.0        | `v1.24.3` or earlier |\n| v0.2.0        | `v1.25.0` or later   |\n| v0.2.1 ~      | `v1.32.4` or later   |\n\n## Example\n\n```typescript\nimport * as clippy from \"https://deno.land/x/clippy/mod.ts\";\n\n// write image to clipboard\nconst data1 = await Deno.readFile(\"testdata/out.png\");\nawait clippy.writeImage(data1);\n\n// read image from clipboard\nconst data2 = await clippy.readImage();\nawait Deno.writeFile(\"example.png\", data2);\n\n// write text to clipboard\nawait clippy.writeText(\"hello clippy\");\n\n// read text from clipboard\nconst text = await clippy.readText();\nconsole.log(text);\n```\n\nRun script:\n\n```sh\n# You have to use `--unstable` because FFI is not stable.\ndeno run -A --unstable sample.ts\n```\n\n## Contribution\n\nAny contribution including documentations are welcome.\n\n## Development\n\nTo develop this library, the following must be installed.\n\n- Rust\n- Deno(`v1.32.4` or later)\n- [deno_bindgen](https://github.com/denoland/deno_bindgen)\n- xclip(on Linux)\n- make\n\nIf you modify the Rust code (under `src/`), you need to generate\n`bindings/bindings.ts` using `deno_bindgen`(just run `make build`).\\\n`bindings.ts` is the glue code to handle `dylib` from Deno, and basically should\nnot be edited and committed.\\\n`bindings.ts` will only be changed for new releases as follows when execute\n`VERSION=v0.1.0 make build`.\n\n```diff\n const url = new URL(\n-  \"https://github.com/skanehira/deno-clippy/releases/download/v0.0.1/\",\n+  \"https://github.com/skanehira/deno-clippy/releases/download/v0.1.0/\",\n   import.meta.url,\n )\n let uri = url.toString()\n```\n\nAfter implementation is complete, be sure to write tests as well.\\\nThe tests are to ensure the quality of this library.\n\nThe following is how to run the test.\n\n```sh\n# clean up dylib cache, and generate bindings.ts, dylib and run deno's test.\n$ make deno-test\n# run rust's tests.\n$ make ffi-test\n# run deno-test and ffi-test\n$ make test\n```\n\n## Author\n\nskanehira\n\nThe logo was designed by @hashrock, licensed under CC BY-NC-ND 4.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskanehira%2Fdeno-clippy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskanehira%2Fdeno-clippy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskanehira%2Fdeno-clippy/lists"}