{"id":25743833,"url":"https://github.com/leoho0722/sfsymbolsgenerator","last_synced_at":"2026-05-13T01:06:20.451Z","repository":{"id":197631220,"uuid":"699024874","full_name":"leoho0722/SFSymbolsGenerator","owner":"leoho0722","description":"Simplifying SF Symbols Enumeration Generation with Swift!","archived":false,"fork":false,"pushed_at":"2025-06-28T09:26:33.000Z","size":151,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2026-03-12T10:58:21.217Z","etag":null,"topics":["command-line-tool","macos","sf-symbols","swift","swift-package-manager"],"latest_commit_sha":null,"homepage":"https://swiftpackageindex.com/leoho0722/SFSymbolsGenerator","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/leoho0722.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":"2023-10-01T17:42:41.000Z","updated_at":"2026-02-28T14:06:34.000Z","dependencies_parsed_at":"2025-02-26T10:32:14.614Z","dependency_job_id":"3ea95e2d-951c-449b-b13e-082441320881","html_url":"https://github.com/leoho0722/SFSymbolsGenerator","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"aefc79ddb686f80da9fdadf3e95e2ddebfc2fa76"},"previous_names":["leoho0722/sfsymbolsgenerator"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/leoho0722/SFSymbolsGenerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoho0722%2FSFSymbolsGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoho0722%2FSFSymbolsGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoho0722%2FSFSymbolsGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoho0722%2FSFSymbolsGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leoho0722","download_url":"https://codeload.github.com/leoho0722/SFSymbolsGenerator/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoho0722%2FSFSymbolsGenerator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32963180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"ssl_error","status_checked_at":"2026-05-12T23:30:18.191Z","response_time":102,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["command-line-tool","macos","sf-symbols","swift","swift-package-manager"],"created_at":"2025-02-26T10:30:51.927Z","updated_at":"2026-05-13T01:06:20.438Z","avatar_url":"https://github.com/leoho0722.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SFSymbolsGenerator\n\n**🌐 Language / 語言選擇**\n\n- [English](README.md) | [繁體中文](README_zh-TW.md)\n\n[![Swift Version](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fleoho0722%2FSFSymbolsGenerator%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/leoho0722/SFSymbolsGenerator)\n[![Supported Platforms](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fleoho0722%2FSFSymbolsGenerator%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/leoho0722/SFSymbolsGenerator)\n![GitHub release (with filter)](https://img.shields.io/github/v/release/leoho0722/SFSymbolsGenerator?sort=semver\u0026label=Release)\n\n**Simplifying SF Symbols Enumeration Generation with Swift!**\n\nA Swift-based command-line utility that generates type-safe Swift enumerations for SF Symbols with proper availability annotations, built with clean architecture principles.\n\n## ✨ Features\n\n- 🎯 **Type-Safe Generation**: Creates Swift enumerations with compile-time safety\n- 📱 **Availability Annotations**: Automatic `@available` attributes for proper platform support\n- 🔄 **Dual Version Support**: Works with both stable and beta SF Symbols versions\n- 🏗️ **Clean Architecture**: Well-structured codebase following SOLID principles\n- ⚡ **Performance Optimized**: Fast symbol processing and code generation\n- 🛠️ **Keyword Handling**: Proper handling of Swift reserved keywords\n- 📝 **Documentation**: Comprehensive inline documentation and comments\n\n## 📋 Requirements\n\n- **macOS**: 14.0 or later\n- **Xcode**: 15.0 or later\n- **Swift**: 5.8 or later\n- **SF Symbols App**: Version 5.0 or later (stable) / Version 7.0 or later (beta)\n\n## 🏗️ Project Architecture\n\nThis project follows Clean Architecture principles with a clear separation of concerns:\n\n```text\nSources/\n├── Application/                   # Application Layer\n│   ├── Commands/                  # CLI command implementations\n│   └── SFSymbolsGenerator.swift\n├── Domain/                        # Domain Layer\n│   ├── Models/                    # Domain models and extensions\n│   └── Services/                  # Core business logic services\n├── Infrastructure/                # Infrastructure Layer\n│   ├── FileSystem/                # File operations\n│   └── Errors/                    # Error handling\n└── Foundation/                    # Foundation Layer\n    └── Types/                     # Type aliases and basic types\n```\n\n### Architecture Benefits\n\n- **Maintainability**: Clear separation makes the code easy to understand and modify\n- **Testability**: Each layer can be independently tested\n- **Scalability**: Easy to add new features without affecting existing code\n- **Reusability**: Components can be reused across different contexts\n\n## 📦 Installation\n\n### Homebrew Installation (Recommended)\n\n```bash\nbrew tap leoho0722/tap\nbrew install sf-symbols-generator\n```\n\n### From Releases\n\n1. Download the latest binary from [GitHub Releases](https://github.com/leoho0722/SFSymbolsGenerator/releases)\n2. Extract and place the binary in your desired location\n3. Make it executable: `chmod +x sf-symbols-generator`\n\n### Build from Source\n\n```bash\ngit clone https://github.com/leoho0722/SFSymbolsGenerator.git\ncd SFSymbolsGenerator\nswift build -c release\n# Binary will be at .build/release/sf-symbols-generator\n```\n\n## 🚀 Usage\n\n### Command Structure\n\n```bash\nsf-symbols-generator generate \u003cfilepath\u003e [--name \u003cname\u003e] [--enum-name \u003cenum-name\u003e] [--use-beta]\nsf-symbols-generator version\n```\n\n### Generate Command\n\n```bash\n# Basic usage\nsf-symbols-generator generate /path/to/output\n\n# With custom filename\nsf-symbols-generator generate /path/to/output --name CustomSymbols\n\n# Using beta version\nsf-symbols-generator generate /path/to/output --use-beta\n\n# Complete example\nsf-symbols-generator generate ~/Desktop --name MySymbols --use-beta\n```\n\n### Command Options\n\n| Option        | Description                                      | Default          | Required |\n|---------------|--------------------------------------------------|------------------|----------|\n| `filepath`    | Directory where the Swift file will be generated | -                | ✅        |\n| `--name`      | Specify filename of output                       | `SFSymbols+Enum` | ❌        |\n| `--enum-name` | Specify enum name of output                      | `SFSymbols`      | ❌        |\n| `--use-beta`  | Whether use beta version of SF Symbols or not    | `false`          | ❌        |\n\n## 📝 Generated Output\n\nThe tool generates a Swift enumeration file with the following structure:\n\n```swift\n// SFSymbols.swift\n// Generated by SFSymbolsGenerator\n// Do not edit this file manually.\n\nimport Foundation\n\npublic enum SFSymbols: String, CaseIterable {\n    /// SF Symbols's name：arrow.left\n    @available(iOS 13.0, macOS 10.15, *)\n    case arrowLeft = \"arrow.left\"\n    \n    /// SF Symbols's name：star.fill\n    @available(iOS 14.0, macOS 11.0, *)\n    case starFill = \"star.fill\"\n    \n    public static var allCases: [SFSymbols] {\n        var allCases: [SFSymbols] = []\n        if #available(iOS 13.0, macOS 10.15, *) {\n            allCases.append(.arrowLeft)\n        }\n        if #available(iOS 14.0, macOS 11.0, *) {\n            allCases.append(.starFill)\n        }\n        return allCases\n    }\n}\n```\n\n## 🛠️ Development\n\n### Building the Project\n\n```bash\nswift build\n```\n\n### Running Tests\n\n```bash\nswift test\n```\n\n### Project Structure Details\n\n- **Application Layer**: Contains the main CLI interface and command handling\n- **Domain Layer**: Core business logic for symbol processing and code generation\n- **Infrastructure Layer**: File I/O operations and error handling infrastructure\n- **Foundation Layer**: Basic types, aliases, and utility definitions\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n### Development Guidelines\n\n1. Follow Swift coding conventions\n2. Maintain clean architecture principles\n3. Add tests for new functionality\n4. Update documentation as needed\n\n## 🎯 Usage Examples\n\n### Using in iOS/macOS Projects\n\n```swift\nimport UIKit\n\nclass ViewController: UIViewController {\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        // Use the generated enumeration\n        let imageView = UIImageView()\n        imageView.image = UIImage(systemName: SFSymbols.starFill.rawValue)\n        \n        // Check availability\n        if SFSymbols.allCases.contains(.arrowLeft) {\n            print(\"Arrow left symbol is available\")\n        }\n    }\n}\n```\n\n### Using in SwiftUI\n\n```swift\nimport SwiftUI\n\nstruct ContentView: View {\n\n    var body: some View {\n        VStack {\n            Image(systemName: SFSymbols.starFill.rawValue)\n                .font(.largeTitle)\n            \n            Text(\"Available symbols: \\\\(SFSymbols.allCases.count)\")\n        }\n    }\n}\n```\n\n## 🔧 Advanced Features\n\n### Error Handling\n\nThe tool provides detailed error messages for various scenarios:\n\n- SF Symbols application not installed\n- File permission issues\n- Data format errors\n- Code generation failures\n\n### Symbol Name Conversion\n\nThe tool automatically handles:\n\n- Dot notation to camelCase conversion (`arrow.left` → `arrowLeft`)\n- Swift keyword handling (`return` → `` `return` ``)\n- Numbers at the beginning (`1.circle` → `_1Circle`)\n\n### Availability Annotations\n\nAutomatically generates based on SF Symbols release timeline:\n\n- iOS 13.0+: Symbols released in 2019\n- iOS 14.0+: Symbols released in 2020\n- iOS 15.0+: Symbols released in 2021\n- And so on...\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n**Q: SF Symbols application not found**\n\nA: Make sure you have downloaded and installed the SF Symbols app from Apple Developer website.\n\n**Q: Generated file is empty**\n\nA: Check that your SF Symbols app version is correct and that symbol data is available.\n\n**Q: Permission denied**\n\nA: Ensure the output directory has write permissions, or run the command with `sudo`.\n\n### Reporting Issues\n\nIf you encounter issues, please create a GitHub issue with:\n\n1. Error message\n2. Command executed\n3. System environment (macOS version, SF Symbols version)\n4. Expected vs actual behavior\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- [jollyjinx/SFSymbolEnum](https://github.com/jollyjinx/SFSymbolEnum) - Original inspiration\n- Apple Inc. - For creating SF Symbols\n\n## 📚 Documentation\n\nFor more detailed documentation, please check:\n\n- [繁體中文說明文件](README_zh-TW.md)\n- Source code documentation (inline comments)\n\n## 🔗 Related Links\n\n- [SF Symbols Official Page](https://developer.apple.com/sf-symbols/)\n- [Swift Package Manager](https://swift.org/package-manager/)\n- [Swift ArgumentParser](https://github.com/apple/swift-argument-parser)\n\n---\n\n**Made with ❤️ by Leo Ho**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoho0722%2Fsfsymbolsgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleoho0722%2Fsfsymbolsgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoho0722%2Fsfsymbolsgenerator/lists"}