{"id":31953214,"url":"https://github.com/mcrich23/accessibletext","last_synced_at":"2025-10-14T13:42:21.417Z","repository":{"id":311841086,"uuid":"1045175851","full_name":"Mcrich23/AccessibleText","owner":"Mcrich23","description":"A macro designed to help make static text more accessible by generating dynamically scaling text instead.","archived":false,"fork":false,"pushed_at":"2025-09-09T01:21:47.000Z","size":73,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-01T10:07:42.087Z","etag":null,"topics":["llm","lmstudio","macros","swift","swiftui","xcode"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mcrich23.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-08-26T19:05:49.000Z","updated_at":"2025-09-09T01:21:50.000Z","dependencies_parsed_at":"2025-08-27T08:16:49.259Z","dependency_job_id":"c0aced9c-04ff-47c2-b824-e7f75a80569b","html_url":"https://github.com/Mcrich23/AccessibleText","commit_stats":null,"previous_names":["mcrich23/accessibletext"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Mcrich23/AccessibleText","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mcrich23%2FAccessibleText","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mcrich23%2FAccessibleText/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mcrich23%2FAccessibleText/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mcrich23%2FAccessibleText/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mcrich23","download_url":"https://codeload.github.com/Mcrich23/AccessibleText/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mcrich23%2FAccessibleText/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018720,"owners_count":26086613,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["llm","lmstudio","macros","swift","swiftui","xcode"],"created_at":"2025-10-14T13:42:19.006Z","updated_at":"2025-10-14T13:42:21.409Z","avatar_url":"https://github.com/Mcrich23.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AccessibleText\nA macro designed to help make static text more accessible by generating dynamically scaling text instead.\n\n## Installing The Package\n\n### Xcode\nGo to File \u003e Add Package Dependencies and paste in [https://github.com/Mcrich23/AccessibleText.git](https://github.com/Mcrich23/AccessibleText.git) and add the `AccessibleText` framework to your target.\n\n### Swift Package Manager\n\nAdd the following to the `dependencies` section of your `Package.swift`:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/Mcrich23/AccessibleText.git\", from: \"1.0.0\")\n]\n```\n\nThen add `AccessibleText` to your target dependencies:\n\n```swift\ntargets: [\n    .target(\n        name: \"YourTarget\",\n        dependencies: [\n            .product(name: \"AccessibleText\", package: \"AccessibleText\")\n        ]\n    )\n]\n```\n\n## Setup the Macro\nBefore you can use this macro, you have to set it up with the project.\n\n### Pull A Model\nAccessibleText uses [LM Studio](https://lmstudio.ai). It will use `qwen3:4b` unless otherwise specified with the environment variable `LM_STUDIO_MODEL`.\n\n\u003e Note: The model will automatically download if it is not already present on your machine.\n\n### Add The Compile Script\n1. Go to your target's `Build Phases` tab and create a new `Run Script` phase.\n2. Drag the phase to be above your `Compile Sources` phase\n3. Uncheck `Based on dependency analysis`\n4. Paste in the following code\n\n```bash\nbase_url=\"$(echo \"$BUILT_PRODUCTS_DIR\" | sed -E 's|(.*DerivedData/[^/]+).*|\\1|')\"\n\nbash \"$base_url/SourcePackages/checkouts/AccessibleText/Scripts/text-gen.sh\" \"$SRCROOT/\u003cTarget Folder\u003e\"\n```\n5. Replace `\u003cTarget Folder\u003e` with the folder that contains the code for the target.\n\n\u003e Note: You can also override the default prompt by setting the `PROMPT_INSTRUCTIONS` environment variable.\n\n### Disable User Scripting Sandbox\nThe run phase references the shell script from this package's source files and then creates a file in your project. To do this, you must disable `User Scripting Sandbox`.\n\n1. Go to your target's `Build Settings` tab\n2. Filter for `User Scripting Sandbox`\n3. Set `User Scripting Sandbox` to `No`\n\n## Using the Macros\n\n### #accessibleText\n`accessibleText` is a dynamic text scaler for SwiftUI. To use `accessibleText`, reference it in a `View` body with a static string.\n\n\u003e Note: While the string should be mostly static, you can use variables in it.\n\nWhen you build your project, the compile script you added when setting up the macro will create/update `AccessibleTextContainer.swift` with text options for the string in your macro call.\n\n\u003e Note: This will not be modified unless you change the string in the macro. You can change the text options that were generated without any concern.\n\n#### Example Use\n\n```swift\nstruct ContentView: View {\n    let name: String = \"Morris\"\n    let feature = \"accessibility\"\n    var body: some View {\n        VStack {\n            Image(systemName: \"globe\")\n                .imageScale(.large)\n                .foregroundStyle(.tint)\n            #accessibleText(\"Hi \\(name)! I am testing \\(feature)\")\n        }\n        .padding()\n    }\n}\n```\n\n### #accessibleNavigationTitle\n`accessibleNavigationTitle` dynamically scales the `navigationTitle` for its contents. To use `accessibleNavigationTitle`, reference it in a `View` body with a static string.\n\n\u003e Note: While the string should be mostly static, you can use variables in it.\n\nWhen you build your project, the compile script you added when setting up the macro will create/update `AccessibleTextContainer.swift` with text options for the string in your macro call.\n\n\u003e Note: This will not be modified unless you change the string in the macro. You can change the text options that were generated without any concern.\n\n#### Example Use\n\n```swift\n struct ContentView: View {\n    let name: String = \"Morris\"\n    let feature = \"accessibility\"\n    var body: some View {\n        #accessibleNavigationTitle(\"Hi \\(name)! I am testing \\(feature)\", content: {\n            ScrollView {\n                VStack {\n                    Image(systemName: \"globe\")\n                        .imageScale(.large)\n                        .foregroundStyle(.tint)\n                    #accessibleText(\"Hi \\(name)! I am testing \\(feature)\")\n                }\n                .padding()\n            }\n        })\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcrich23%2Faccessibletext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcrich23%2Faccessibletext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcrich23%2Faccessibletext/lists"}