{"id":20596850,"url":"https://github.com/mcritz/textbundle","last_synced_at":"2025-04-14T23:52:02.604Z","repository":{"id":63917754,"uuid":"314951952","full_name":"mcritz/TextBundle","owner":"mcritz","description":"Markdown TextBundle implemented in 100% Swift","archived":false,"fork":false,"pushed_at":"2021-12-09T21:19:48.000Z","size":74,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T23:51:48.300Z","etag":null,"topics":["markdown","swift","textbundle"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/mcritz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-22T03:33:19.000Z","updated_at":"2024-06-14T02:31:14.000Z","dependencies_parsed_at":"2023-01-14T13:45:53.511Z","dependency_job_id":null,"html_url":"https://github.com/mcritz/TextBundle","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcritz%2FTextBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcritz%2FTextBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcritz%2FTextBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcritz%2FTextBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcritz","download_url":"https://codeload.github.com/mcritz/TextBundle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248981260,"owners_count":21193144,"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":["markdown","swift","textbundle"],"created_at":"2024-11-16T08:19:06.106Z","updated_at":"2025-04-14T23:52:02.570Z","avatar_url":"https://github.com/mcritz.png","language":"Swift","readme":"# [mcritz / TextBundle](https://github.com/mcritz/TextBundle)\n\nSwift-first, Swift-best package for [TextBundle](http://textbundle.org). Supports [version 2 of the spec](http://textbundle.org/spec/).\n\nIf you’re looking for an alternative implemenetation, try [shinyfrog/TextBundle](https://github.com/shinyfrog/TextBundle).\n\n---\n\n## Installation\n\nIn `Package.swift`\n\n```\ndependencies: [\n    .package(url: \"https://github.com/mcritz/TextBundle.git\", .upToNextMajor(from: \"1.0.0\")),\n],\n```\n\n... and further down in targets…\n\n```\ndependencies: [\n    .product(name: \"TextBundle\", package: \"TextBundle\"),\n],\n```\n\n## Usage\n\n\n### Reading from Disk\nRead a TextBundle as either `.textbundle` or `.textpack` from disk\n\n```\nlet myFileURL: URL = ...\nlet myTextBundle = try TextBundle.read(myFileURL)\nlet contents: String = myTextBundle.textContents\n```\n\n### Creating a bundle\n\n```\nlet myBundle = TextBundle(name: \"HelloWorld\", contents: \"# Hello, World!\")\n```\n\n### Writing to disk\n\n```\nmyBundle.bundle(destinationURL: myURL) { bundleFileURL in\n    print(bundleFileURL.path)\n}\n```\n\n---\n\nThanks to Guillermo Casales @gcasales for making this photo available freely on Unsplash 🎁\nhttps://unsplash.com/photos/LQfcolSv2M0\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcritz%2Ftextbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcritz%2Ftextbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcritz%2Ftextbundle/lists"}