{"id":28727716,"url":"https://github.com/dagronf/textclippingkit","last_synced_at":"2025-06-27T17:36:54.473Z","repository":{"id":286720985,"uuid":"962329946","full_name":"dagronf/TextClippingKit","owner":"dagronf","description":"A convenience for loading and saving Apple .textClipping files.","archived":false,"fork":false,"pushed_at":"2025-04-08T02:15:25.000Z","size":221,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T10:17:30.952Z","etag":null,"topics":["clipping","text","textclipping"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/dagronf.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,"publiccode":null,"codemeta":null}},"created_at":"2025-04-08T02:03:22.000Z","updated_at":"2025-04-25T16:04:13.000Z","dependencies_parsed_at":"2025-04-08T03:23:49.546Z","dependency_job_id":"10443e2e-a20a-4571-9cc5-cf569da8b8e3","html_url":"https://github.com/dagronf/TextClippingKit","commit_stats":null,"previous_names":["dagronf/textclippingkit"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dagronf/TextClippingKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FTextClippingKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FTextClippingKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FTextClippingKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FTextClippingKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dagronf","download_url":"https://codeload.github.com/dagronf/TextClippingKit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FTextClippingKit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259995849,"owners_count":22943480,"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":["clipping","text","textclipping"],"created_at":"2025-06-15T15:15:13.993Z","updated_at":"2025-06-27T17:36:54.459Z","avatar_url":"https://github.com/dagronf.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TextClippingKit\n\nA convenience for loading and saving Apple `.textClipping` files.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/tag/dagronf/TextClippingKit\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-lightgrey\" /\u003e\n    \u003ca href=\"https://swift.org/package-manager\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/spm-compatible-brightgreen.svg?style=flat\" alt=\"Swift Package Manager\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nOn a Mac, if you drag some text from any application onto a Finder window, it creates a `.textClipping` file.\n\nThe file format is somewhat convoluted, as it contains multiple representations of the text that was dropped.\n\nThe `TextClipping` struct provides a wrapper around reading and writing these files\n\n## Reading a textClipping file\n\n```swift \nlet clipping = try TextClipping(fileURL: ...some file URL...)\n\n// Get the basic text represetation\nlet text = clipping.utf8\n\n// Get the attributed string representation (preserves formatting)\nlet text = clipping.rtf\n\n// Get the HTML representation\nlet html = clipping.html\n```\n\n## Writing a textClipping file\n\n```swift\n// Generate raw textClipping data from a string\nlet data = try TextClipping.Encode(\"This is a test\")\n\n// Write an attributed string to a textClipping file\nlet ats = NSAttributedString(...)\ntry TextClipping.Encode(ats, to: ...some file URL...)\n```\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2025 Darren Ford\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagronf%2Ftextclippingkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdagronf%2Ftextclippingkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagronf%2Ftextclippingkit/lists"}