Skip to content

Commit

Permalink
Support Swift Package Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
leoho0722 committed Oct 27, 2023
1 parent 09d7d34 commit 20a6e7e
Show file tree
Hide file tree
Showing 16 changed files with 316 additions and 689 deletions.
149 changes: 7 additions & 142 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,144 +1,9 @@

# ---> Objective-C
=======

# Created by https://www.gitignore.io/api/xcode,swift,macos,cocoapods
# Edit at https://www.gitignore.io/?templates=xcode,swift,macos,cocoapods

### CocoaPods ###
## CocoaPods GitIgnore Template

# CocoaPods - Only use to conserve bandwidth / Save time on Pushing
# - Also handy if you have a large number of dependant pods
# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE
Pods/
Podfile.lock

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Swift ###
>>>>>>> 6473ef460d0d87bb717651119157caf8ecbdf4a9
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
/.build
/Packages
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
*.xcuserstate

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
.build/

# CocoaPods
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
# Pods/
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# Accio dependency management
Dependencies/
.accio/

# fastlane
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

### Xcode ###
# Xcode
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)

## Xcode Patch
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno

### Xcode Patch ###
**/xcshareddata/WorkspaceSettings.xcsettings

# End of https://www.gitignore.io/api/xcode,swift,macos,cocoapods
DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D01233BF2AC9D89900E5892E"
BlueprintIdentifier = "SFSymbolsGenerator"
BuildableName = "SFSymbolsGenerator"
BlueprintName = "SFSymbolsGenerator"
ReferencedContainer = "container:SFSymbolsGenerator.xcodeproj">
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -38,16 +38,15 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
viewDebuggingEnabled = "No">
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D01233BF2AC9D89900E5892E"
BlueprintIdentifier = "SFSymbolsGenerator"
BuildableName = "SFSymbolsGenerator"
BlueprintName = "SFSymbolsGenerator"
ReferencedContainer = "container:SFSymbolsGenerator.xcodeproj">
ReferencedContainer = "container:">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
Expand All @@ -61,10 +60,10 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D01233BF2AC9D89900E5892E"
BlueprintIdentifier = "SFSymbolsGenerator"
BuildableName = "SFSymbolsGenerator"
BlueprintName = "SFSymbolsGenerator"
ReferencedContainer = "container:SFSymbolsGenerator.xcodeproj">
ReferencedContainer = "container:">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down
Binary file added Assets/Command Usage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "SFSymbolsGenerator",
platforms: [.macOS(.v13)],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.0"),
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.executableTarget(
name: "SFSymbolsGenerator",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
]
),
]
)
40 changes: 26 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,41 @@ Simplifying SF Symbols Enumeration Generation with Swift!

## How to Use

### git clone

1. Clone this Project
2. Use Xcode to open it
3. Command + R
4. Find outputPath in Output area, and Happy use it!

### Terminal
![Command Usage](./Assets/Command Usage.png)

1. Download binary file from Latest Releases
2. Open Terminal.app (notes: check current path exists SFSymbolsGenerator binary file!)
3. run ```./SFSymbolsGenerator```, and find outputPath in Terminal, and Happy use it!
3. run ```./SFSymbolsGenerator <filepath>```, and Happy use it!

#### Argument

| Argument | Description | Required or Optional |
|------------|-----------------------------| :------------------: |
| filepath | Specify filepath of output. | **Required** |

#### Arguments
#### Flag

| Argument | Description |
|------------|---------------------|
| --use-beta | Use SF Symbols beta |
| Argument | Description | Required or Optional |
|------------|-----------------------------| :------------------: |
| --name | Specify filename of output. | **Optional** |

#### Flag

| Argument | Description | Required or Optional |
|------------|---------------------| :------------------: |
| --use-beta | Use SF Symbols beta | **Optional** |

##### Example

```shell
./SFSymbolsGenerator --use-beta
# Normal Usage
./SFSymbolsGenerator /Users/leoho/Desktop

# Specify filename Usage
./SFSymbolsGenerator /Users/leoho/Desktop --name SFSymbols

# beta version Usage
./SFSymbolsGenerator /Users/leoho/Desktop --use-beta
```

## Thanks
Expand Down
Loading

0 comments on commit 20a6e7e

Please sign in to comment.