{"id":19337674,"url":"https://github.com/sheetjs/pb","last_synced_at":"2025-07-25T06:41:49.451Z","repository":{"id":57321130,"uuid":"9330867","full_name":"SheetJS/pb","owner":"SheetJS","description":":clipboard: Access HTML and other pasteboards from JS and command line","archived":false,"fork":false,"pushed_at":"2022-04-24T07:59:43.000Z","size":16,"stargazers_count":37,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-19T08:38:19.645Z","etag":null,"topics":["clipboard","copy-paste","osx","pasteboard","pbpaste"],"latest_commit_sha":null,"homepage":"http://sheetjs.com","language":"JavaScript","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/SheetJS.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}},"created_at":"2013-04-09T20:28:03.000Z","updated_at":"2025-01-11T01:17:00.000Z","dependencies_parsed_at":"2022-08-25T22:41:23.512Z","dependency_job_id":null,"html_url":"https://github.com/SheetJS/pb","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SheetJS%2Fpb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SheetJS%2Fpb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SheetJS%2Fpb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SheetJS%2Fpb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SheetJS","download_url":"https://codeload.github.com/SheetJS/pb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250352220,"owners_count":21416458,"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","copy-paste","osx","pasteboard","pbpaste"],"created_at":"2024-11-10T03:15:05.974Z","updated_at":"2025-04-23T01:31:04.769Z","avatar_url":"https://github.com/SheetJS.png","language":"JavaScript","readme":"# pb\n\nImproved pbcopy/pbpaste for OSX\n\nThe standard pbcopy and pbpaste utilities can manipulate the plaintext clipboard\nbut have no easy way of accessing the HTML pasteboard.  This module and CLI tool\nprovide a more convenient way to access the pasteboard from node.\n\n\n## Command-Line Tool Usage\n\nTo get data from a specific pasteboard:\n\n```bash\n$ npx pb [type]\n$ npx pb -m \u003ctype\u003e\n```\n\nTo set a specific pasteboard, pipe data into pb:\n\n```bash\n$ get_data | npx pb -s [type]\n```\n\nTo list available pasteboards:\n\n```bash\n$ npx pb -l\n```\n\nFor example, to grab the contents of the HTML pasteboard and put it on the\nplaintext pasteboard:\n\n```bash\n$ npx pb -m html | npx pb -s\n```\n\n\n## Library Usage\n\nFrom node, `pb` exposes:\n\n- `get(type)`: get pasteboard data from specified pasteboard\n- `set(type, data)`: set pasteboard data (overwrites other pasteboards)\n- `available()`: enumerate available pasteboards\n\nThis example gets the pasteboard HTML data and copies to plaintext pasteboard:\n\n```js\nvar pb = require('pb');\nvar HTMLOutput = pb.get('html');\npb.set('text', HTMLOutput);\n```\n\n\n## Supported Pasteboards\n\n| type                 | description |\n|:---------------------|:------------|\n| `NSStringPboardType` | plaintext   |\n| `NSHTMLPboardType`   | HTML        |\n| `NSRTFPboardType`    | RTF         |\n\n\n## License\n\nPlease consult the attached LICENSE file for details.  All rights not explicitly\ngranted by the Apache 2.0 license are reserved by the Original Author.\n\n[![Analytics](https://ga-beacon.appspot.com/UA-36810333-1/SheetJS/pb?pixel)](https://github.com/SheetJS/pb)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheetjs%2Fpb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsheetjs%2Fpb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheetjs%2Fpb/lists"}