diff --git a/Package.resolved b/Package.resolved index 23d472c..a2a1761 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-argument-parser", "state" : { - "revision" : "8f4d2753f0e4778c76d5f05ad16c74f707390531", - "version" : "1.2.3" + "revision" : "41982a3656a71c768319979febd796c6fd111d5c", + "version" : "1.5.0" } }, { diff --git a/Package.swift b/Package.swift index b5bece5..2411125 100644 --- a/Package.swift +++ b/Package.swift @@ -10,7 +10,7 @@ let package = Package( // Dependencies declare other packages that this package depends on. .package( url: "https://github.com/apple/swift-argument-parser", - from: "1.0.0" + from: "1.5.0" ), .package( url: "https://github.com/jpsim/Yams.git", @@ -35,7 +35,7 @@ let package = Package( ) ], plugins: [ - .plugin(name: "SwiftLint", package: "SwiftLintPlugin") + // .plugin(name: "SwiftLint", package: "SwiftLintPlugin") ] ), diff --git a/SampleFiles/Colors/Generated/ColorYolo+GenAllScript.swift b/SampleFiles/Colors/Generated/ColorYolo+GenAllScript.swift index 6856326..0f2db97 100644 --- a/SampleFiles/Colors/Generated/ColorYolo+GenAllScript.swift +++ b/SampleFiles/Colors/Generated/ColorYolo+GenAllScript.swift @@ -1,4 +1,4 @@ -// Generated by ResgenSwift.Color 1.2 +// Generated by ResgenSwift.Color 2.1.0 import SwiftUI diff --git a/SampleFiles/Colors/Generated/UIhkjhkColorYolo+GenAllScript.swift b/SampleFiles/Colors/Generated/UIhkjhkColorYolo+GenAllScript.swift new file mode 100644 index 0000000..a13b200 --- /dev/null +++ b/SampleFiles/Colors/Generated/UIhkjhkColorYolo+GenAllScript.swift @@ -0,0 +1,21 @@ +// Generated by ResgenSwift.Color 2.1.0 + +import UIKit + +extension UIhkjhkColorYolo { + + /// Color red is #FF0000 (light) or #FF0000 (dark)" + @objc var red: UIColor { + UIColor(named: "red")! + } + + /// Color green_alpha_50 is #A000FF00 (light) or #A000FF00 (dark)" + @objc var green_alpha_50: UIColor { + UIColor(named: "green_alpha_50")! + } + + /// Color blue_light_dark is #0000FF (light) or #0000AA (dark)" + @objc var blue_light_dark: UIColor { + UIColor(named: "blue_light_dark")! + } +} diff --git a/SampleFiles/Fonts/Generated/FontYolo+GenAllScript.swift b/SampleFiles/Fonts/Generated/FontYolo+GenAllScript.swift index 76efac3..382f26b 100644 --- a/SampleFiles/Fonts/Generated/FontYolo+GenAllScript.swift +++ b/SampleFiles/Fonts/Generated/FontYolo+GenAllScript.swift @@ -1,4 +1,4 @@ -// Generated by ResgenSwift.Fonts 1.2 +// Generated by ResgenSwift.Fonts 2.1.0 import SwiftUI diff --git a/SampleFiles/Fonts/Generated/UIFontYolo+GenAllScript.swift b/SampleFiles/Fonts/Generated/UIFontYolo+GenAllScript.swift index 11d04c0..dcb865a 100644 --- a/SampleFiles/Fonts/Generated/UIFontYolo+GenAllScript.swift +++ b/SampleFiles/Fonts/Generated/UIFontYolo+GenAllScript.swift @@ -1,4 +1,4 @@ -// Generated by ResgenSwift.Fonts 1.2 +// Generated by ResgenSwift.Fonts 2.1.0 import UIKit diff --git a/SampleFiles/Images/Generated/ImageYolo+GenAllScript.swift b/SampleFiles/Images/Generated/ImageYolo+GenAllScript.swift index 602c0c2..dbc114f 100644 --- a/SampleFiles/Images/Generated/ImageYolo+GenAllScript.swift +++ b/SampleFiles/Images/Generated/ImageYolo+GenAllScript.swift @@ -1,4 +1,4 @@ -// Generated by ResgenSwift.Images 1.2 +// Generated by ResgenSwift.Images 2.1.0 // Images from sampleImages import SwiftUI diff --git a/SampleFiles/Images/Generated/UIImageYolo+GenAllScript.swift b/SampleFiles/Images/Generated/UIImageYolo+GenAllScript.swift new file mode 100644 index 0000000..27d751f --- /dev/null +++ b/SampleFiles/Images/Generated/UIImageYolo+GenAllScript.swift @@ -0,0 +1,31 @@ +// Generated by ResgenSwift.Images 2.1.0 +// Images from sampleImages + +import UIKit + +extension UIImageYolo { + + var article_notification_pull_detail: UIImage { + UIImage(named: "article_notification_pull_detail")! + } + + var article_notification_pull: UIImage { + UIImage(named: "article_notification_pull")! + } + + var new_article: UIImage { + UIImage(named: "new_article")! + } + + var welcome_background: UIImage { + UIImage(named: "welcome_background")! + } + + var article_trash: UIImage { + UIImage(named: "article_trash")! + } + + var ic_close_article: UIImage { + UIImage(named: "ic_close_article")! + } +} diff --git a/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/Contents.json b/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/Contents.json index a83e01f..280e0e3 100644 --- a/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/Contents.json +++ b/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/Contents.json @@ -1,23 +1,16 @@ { "images" : [ { - "idiom" : "universal", - "scale" : "1x", - "filename" : "article_notification_pull.png" - }, - { - "idiom" : "universal", - "scale" : "2x", - "filename" : "article_notification_pull@2x.png" - }, - { - "idiom" : "universal", - "scale" : "3x", - "filename" : "article_notification_pull@3x.png" + "filename" : "article_notification_pull.svg", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "ResgenSwift-Imagium" + "author" : "ResgenSwift-Imagium", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "original" } } \ No newline at end of file diff --git a/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/article_notification_pull.png b/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/article_notification_pull.png deleted file mode 100644 index 59607c1..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/article_notification_pull.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/article_notification_pull.svg b/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/article_notification_pull.svg new file mode 100644 index 0000000..051989a --- /dev/null +++ b/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/article_notification_pull.svg @@ -0,0 +1,21 @@ + + + article_notification_pull + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/article_notification_pull@2x.png b/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/article_notification_pull@2x.png deleted file mode 100644 index ac7e5af..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/article_notification_pull@2x.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/article_notification_pull@3x.png b/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/article_notification_pull@3x.png deleted file mode 100644 index 5546ca1..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/article_notification_pull.imageset/article_notification_pull@3x.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/Contents.json b/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/Contents.json index caa7fed..d4f4f5f 100644 --- a/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/Contents.json +++ b/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/Contents.json @@ -1,23 +1,16 @@ { "images" : [ { - "idiom" : "universal", - "scale" : "1x", - "filename" : "article_notification_pull_detail.png" - }, - { - "idiom" : "universal", - "scale" : "2x", - "filename" : "article_notification_pull_detail@2x.png" - }, - { - "idiom" : "universal", - "scale" : "3x", - "filename" : "article_notification_pull_detail@3x.png" + "filename" : "article_notification_pull_detail.svg", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "ResgenSwift-Imagium" + "author" : "ResgenSwift-Imagium", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "original" } } \ No newline at end of file diff --git a/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/article_notification_pull_detail.png b/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/article_notification_pull_detail.png deleted file mode 100644 index fcb75e1..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/article_notification_pull_detail.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/article_notification_pull_detail.svg b/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/article_notification_pull_detail.svg new file mode 100644 index 0000000..15ae41f --- /dev/null +++ b/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/article_notification_pull_detail.svg @@ -0,0 +1,21 @@ + + + article_notification_pull_detail + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/article_notification_pull_detail@2x.png b/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/article_notification_pull_detail@2x.png deleted file mode 100644 index 3966828..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/article_notification_pull_detail@2x.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/article_notification_pull_detail@3x.png b/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/article_notification_pull_detail@3x.png deleted file mode 100644 index b16455b..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/article_notification_pull_detail.imageset/article_notification_pull_detail@3x.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/article_trash.imageset/Contents.json b/SampleFiles/Images/imagium.xcassets/article_trash.imageset/Contents.json index 1ec6fce..a46bee9 100644 --- a/SampleFiles/Images/imagium.xcassets/article_trash.imageset/Contents.json +++ b/SampleFiles/Images/imagium.xcassets/article_trash.imageset/Contents.json @@ -1,23 +1,16 @@ { "images" : [ { - "idiom" : "universal", - "scale" : "1x", - "filename" : "article_trash.png" - }, - { - "idiom" : "universal", - "scale" : "2x", - "filename" : "article_trash@2x.png" - }, - { - "idiom" : "universal", - "scale" : "3x", - "filename" : "article_trash@3x.png" + "filename" : "article_trash.svg", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "ResgenSwift-Imagium" + "author" : "ResgenSwift-Imagium", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "original" } } \ No newline at end of file diff --git a/SampleFiles/Images/imagium.xcassets/article_trash.imageset/article_trash.png b/SampleFiles/Images/imagium.xcassets/article_trash.imageset/article_trash.png deleted file mode 100644 index 3b1d655..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/article_trash.imageset/article_trash.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/article_trash.imageset/article_trash.svg b/SampleFiles/Images/imagium.xcassets/article_trash.imageset/article_trash.svg new file mode 100644 index 0000000..8a65860 --- /dev/null +++ b/SampleFiles/Images/imagium.xcassets/article_trash.imageset/article_trash.svg @@ -0,0 +1,4 @@ + + + + diff --git a/SampleFiles/Images/imagium.xcassets/article_trash.imageset/article_trash@2x.png b/SampleFiles/Images/imagium.xcassets/article_trash.imageset/article_trash@2x.png deleted file mode 100644 index 9232208..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/article_trash.imageset/article_trash@2x.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/article_trash.imageset/article_trash@3x.png b/SampleFiles/Images/imagium.xcassets/article_trash.imageset/article_trash@3x.png deleted file mode 100644 index 940edca..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/article_trash.imageset/article_trash@3x.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/Contents.json b/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/Contents.json index c3c805a..59b3045 100644 --- a/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/Contents.json +++ b/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/Contents.json @@ -1,23 +1,16 @@ { "images" : [ { - "idiom" : "universal", - "scale" : "1x", - "filename" : "ic_close_article.png" - }, - { - "idiom" : "universal", - "scale" : "2x", - "filename" : "ic_close_article@2x.png" - }, - { - "idiom" : "universal", - "scale" : "3x", - "filename" : "ic_close_article@3x.png" + "filename" : "ic_close_article.svg", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "ResgenSwift-Imagium" + "author" : "ResgenSwift-Imagium", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "original" } } \ No newline at end of file diff --git a/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/ic_close_article.png b/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/ic_close_article.png deleted file mode 100644 index 3f1c26f..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/ic_close_article.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/ic_close_article.svg b/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/ic_close_article.svg new file mode 100644 index 0000000..9e247a8 --- /dev/null +++ b/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/ic_close_article.svg @@ -0,0 +1,4 @@ + + + diff --git a/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/ic_close_article@2x.png b/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/ic_close_article@2x.png deleted file mode 100644 index bf30527..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/ic_close_article@2x.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/ic_close_article@3x.png b/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/ic_close_article@3x.png deleted file mode 100644 index fbf5cd2..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/ic_close_article.imageset/ic_close_article@3x.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/new_article.imageset/Contents.json b/SampleFiles/Images/imagium.xcassets/new_article.imageset/Contents.json index ef1f43e..54f489d 100644 --- a/SampleFiles/Images/imagium.xcassets/new_article.imageset/Contents.json +++ b/SampleFiles/Images/imagium.xcassets/new_article.imageset/Contents.json @@ -1,23 +1,16 @@ { "images" : [ { - "idiom" : "universal", - "scale" : "1x", - "filename" : "new_article.png" - }, - { - "idiom" : "universal", - "scale" : "2x", - "filename" : "new_article@2x.png" - }, - { - "idiom" : "universal", - "scale" : "3x", - "filename" : "new_article@3x.png" + "filename" : "new_article.svg", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "ResgenSwift-Imagium" + "author" : "ResgenSwift-Imagium", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "original" } } \ No newline at end of file diff --git a/SampleFiles/Images/imagium.xcassets/new_article.imageset/new_article.png b/SampleFiles/Images/imagium.xcassets/new_article.imageset/new_article.png deleted file mode 100644 index c525aa4..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/new_article.imageset/new_article.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/new_article.imageset/new_article.svg b/SampleFiles/Images/imagium.xcassets/new_article.imageset/new_article.svg new file mode 100644 index 0000000..7bc8f21 --- /dev/null +++ b/SampleFiles/Images/imagium.xcassets/new_article.imageset/new_article.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SampleFiles/Images/imagium.xcassets/new_article.imageset/new_article@2x.png b/SampleFiles/Images/imagium.xcassets/new_article.imageset/new_article@2x.png deleted file mode 100644 index 3ca8bd0..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/new_article.imageset/new_article@2x.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/new_article.imageset/new_article@3x.png b/SampleFiles/Images/imagium.xcassets/new_article.imageset/new_article@3x.png deleted file mode 100644 index bb92267..0000000 Binary files a/SampleFiles/Images/imagium.xcassets/new_article.imageset/new_article@3x.png and /dev/null differ diff --git a/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/Contents.json b/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/Contents.json index 03a3ce7..73b1abc 100644 --- a/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/Contents.json +++ b/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/Contents.json @@ -1,23 +1,23 @@ { "images" : [ { + "filename" : "welcome_background.png", "idiom" : "universal", - "scale" : "1x", - "filename" : "welcome_background.png" + "scale" : "1x" }, { + "filename" : "welcome_background@2x.png", "idiom" : "universal", - "scale" : "2x", - "filename" : "welcome_background@2x.png" + "scale" : "2x" }, { + "filename" : "welcome_background@3x.png", "idiom" : "universal", - "scale" : "3x", - "filename" : "welcome_background@3x.png" + "scale" : "3x" } ], "info" : { - "version" : 1, - "author" : "ResgenSwift-Imagium" + "author" : "ResgenSwift-Imagium", + "version" : 1 } } \ No newline at end of file diff --git a/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/welcome_background.png b/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/welcome_background.png index 88a5366..5afc6eb 100644 Binary files a/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/welcome_background.png and b/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/welcome_background.png differ diff --git a/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/welcome_background@2x.png b/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/welcome_background@2x.png index 9df1caa..92b5492 100644 Binary files a/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/welcome_background@2x.png and b/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/welcome_background@2x.png differ diff --git a/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/welcome_background@3x.png b/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/welcome_background@3x.png index ff0ba0e..a51fe74 100644 Binary files a/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/welcome_background@3x.png and b/SampleFiles/Images/imagium.xcassets/welcome_background.imageset/welcome_background@3x.png differ diff --git a/SampleFiles/Strings/Generated/String+GenAllScript.swift b/SampleFiles/Strings/Generated/String+GenAllScript.swift index d351b69..41b5731 100644 --- a/SampleFiles/Strings/Generated/String+GenAllScript.swift +++ b/SampleFiles/Strings/Generated/String+GenAllScript.swift @@ -1,4 +1,4 @@ -// Generated by ResgenSwift.Strings.Stringium 1.2 +// Generated by ResgenSwift.Strings.Stringium 2.1.0 import UIKit @@ -30,6 +30,9 @@ extension String { /// Translation in en : /// en + /// + /// Comment : + /// No comment var param_lang: String { NSLocalizedString("param_lang", tableName: kStringsFileName, bundle: Bundle.main, value: "en", comment: "") } @@ -38,24 +41,35 @@ extension String { /// Translation in en : /// Back + /// + /// Comment : + /// No comment var generic_back: String { NSLocalizedString("generic_back", tableName: kStringsFileName, bundle: Bundle.main, value: "Back", comment: "") } /// Translation in en : /// Loading data... + /// + /// Comment : + /// No comment var generic_loading_data: String { NSLocalizedString("generic_loading_data", tableName: kStringsFileName, bundle: Bundle.main, value: "Loading data...", comment: "") } /// Translation in en : /// Welcome \"%@\" ! + /// + /// Comment : + /// No comment var generic_welcome_firstname_format: String { NSLocalizedString("generic_welcome_firstname_format", tableName: kStringsFileName, bundle: Bundle.main, value: "Welcome \"%@\" !", comment: "") - } - + } /// Translation in en : /// Welcome \"%@\" ! + /// + /// Comment : + /// No comment func generic_welcome_firstname_format(arg0: String) -> String { String(format: self.generic_welcome_firstname_format, arg0) } @@ -64,6 +78,9 @@ extension String { /// Translation in en : /// 1€ = 1 point ! + /// + /// Comment : + /// No comment var test_equal_symbol: String { NSLocalizedString("test_equal_symbol", tableName: kStringsFileName, bundle: Bundle.main, value: "1€ = 1 point !", comment: "") } @@ -72,12 +89,17 @@ extension String { /// Translation in en : /// You %%: %2$@ %1$@ Age: %3$d + /// + /// Comment : + /// No comment var placeholders_test_one: String { NSLocalizedString("placeholders_test_one", tableName: kStringsFileName, bundle: Bundle.main, value: "You %%: %2$@ %1$@ Age: %3$d", comment: "") - } - + } /// Translation in en : /// You %%: %2$@ %1$@ Age: %3$d + /// + /// Comment : + /// No comment func placeholders_test_one(arg0: String, arg1: String, arg2: Int) -> String { String(format: self.placeholders_test_one, arg0, arg1, arg2) } diff --git a/SampleFiles/Strings/Generated/en-us.lproj/sampleStrings.strings b/SampleFiles/Strings/Generated/en-us.lproj/sampleStrings.strings index db0b0c9..2a28f11 100644 --- a/SampleFiles/Strings/Generated/en-us.lproj/sampleStrings.strings +++ b/SampleFiles/Strings/Generated/en-us.lproj/sampleStrings.strings @@ -1,6 +1,6 @@ /** * Apple Strings File - * Generated by ResgenSwift 1.2 + * Generated by ResgenSwift 2.1.0 * Language: en-us */ diff --git a/SampleFiles/Strings/Generated/en.lproj/sampleStrings.strings b/SampleFiles/Strings/Generated/en.lproj/sampleStrings.strings index f0c50ed..ff94e24 100644 --- a/SampleFiles/Strings/Generated/en.lproj/sampleStrings.strings +++ b/SampleFiles/Strings/Generated/en.lproj/sampleStrings.strings @@ -1,6 +1,6 @@ /** * Apple Strings File - * Generated by ResgenSwift 1.2 + * Generated by ResgenSwift 2.1.0 * Language: en */ diff --git a/SampleFiles/Strings/Generated/fr.lproj/sampleStrings.strings b/SampleFiles/Strings/Generated/fr.lproj/sampleStrings.strings index ad1d796..07f3181 100644 --- a/SampleFiles/Strings/Generated/fr.lproj/sampleStrings.strings +++ b/SampleFiles/Strings/Generated/fr.lproj/sampleStrings.strings @@ -1,6 +1,6 @@ /** * Apple Strings File - * Generated by ResgenSwift 1.2 + * Generated by ResgenSwift 2.1.0 * Language: fr */ diff --git a/SampleFiles/Tags/Generated/Analytics+GenAllScript.swift b/SampleFiles/Tags/Generated/Analytics+GenAllScript.swift index 3cd930c..6d0cf11 100644 --- a/SampleFiles/Tags/Generated/Analytics+GenAllScript.swift +++ b/SampleFiles/Tags/Generated/Analytics+GenAllScript.swift @@ -1,4 +1,4 @@ -// Generated by ResgenSwift.Analytics 1.2 +// Generated by ResgenSwift.Analytics 2.1.0 import MatomoTracker import FirebaseAnalytics @@ -6,6 +6,7 @@ import FirebaseAnalytics // MARK: - Protocol protocol AnalyticsManagerProtocol { + func logScreen(name: String, path: String) func logEvent( name: String, @@ -18,7 +19,7 @@ protocol AnalyticsManagerProtocol { // MARK: - Matomo class MatomoAnalyticsManager: AnalyticsManagerProtocol { - + // MARK: - Properties private var tracker: MatomoTracker @@ -32,11 +33,11 @@ class MatomoAnalyticsManager: AnalyticsManagerProtocol { siteId: siteId, baseURL: URL(string: url)! ) - + #if DEBUG tracker.dispatchInterval = 5 #endif - + #if DEBUG tracker.logger = DefaultLogger(minLevel: .verbose) #endif @@ -44,7 +45,7 @@ class MatomoAnalyticsManager: AnalyticsManagerProtocol { debugPrint("[Matomo service] Configured with content base: \(tracker.contentBase?.absoluteString ?? "-")") debugPrint("[Matomo service] Opt out: \(tracker.isOptedOut)") } - + // MARK: - Methods func logScreen(name: String, path: String) { @@ -100,7 +101,7 @@ class FirebaseAnalyticsManager: AnalyticsManagerProtocol { "action": action as NSObject, "category": category as NSObject, ] - + if let supplementaryParameters = params { for (newKey, newValue) in supplementaryParameters { if parameters.contains(where: { (key: String, value: NSObject) in @@ -108,11 +109,11 @@ class FirebaseAnalyticsManager: AnalyticsManagerProtocol { }) { continue } - + parameters[newKey] = newValue as? NSObject } } - + Analytics.logEvent( name.replacingOccurrences(of: [" "], with: "_"), parameters: parameters @@ -123,8 +124,9 @@ class FirebaseAnalyticsManager: AnalyticsManagerProtocol { // MARK: - Manager class AnalyticsManager { + static var shared = AnalyticsManager() - + // MARK: - Properties var managers: [AnalyticsManagerProtocol] = [] @@ -146,7 +148,7 @@ class AnalyticsManager { ) managers.append(FirebaseAnalyticsManager()) } - + private func logScreen(name: String, path: String) { guard isEnabled else { return } @@ -154,7 +156,7 @@ class AnalyticsManager { manager.logScreen(name: name, path: path) } } - + private func logEvent( name: String, action: String, diff --git a/SampleFiles/Tags/Generated/Tags+GenAllScript.swift b/SampleFiles/Tags/Generated/Tags+GenAllScript.swift index 45fc4ea..b3f1cb4 100644 --- a/SampleFiles/Tags/Generated/Tags+GenAllScript.swift +++ b/SampleFiles/Tags/Generated/Tags+GenAllScript.swift @@ -1,4 +1,4 @@ -// Generated by ResgenSwift.Strings.Tags 1.2 +// Generated by ResgenSwift.Strings.Tags 2.1.0 import UIKit @@ -8,12 +8,20 @@ extension Tags { /// Translation in ium : /// Ecran un + /// + /// Comment : + /// No comment + var screen_one: String { "Ecran un" } /// Translation in ium : /// Ecran deux + /// + /// Comment : + /// No comment + var screen_two: String { "Ecran deux" } diff --git a/SampleFiles/genAllRessources.sh b/SampleFiles/genAllRessources.sh index 425221d..b8e4930 100755 --- a/SampleFiles/genAllRessources.sh +++ b/SampleFiles/genAllRessources.sh @@ -9,46 +9,46 @@ swift run -c release ResgenSwift fonts $FORCE_FLAG "./Fonts/sampleFontsAll.txt" --extension-name-ui-kit "UIFontYolo" \ --extension-suffix "GenAllScript" \ --info-plist-paths "./Fonts/Generated/test.plist ./Fonts/Generated/test2.plist" -# -#echo "\n-------------------------\n" -# -## Color -#swift run -c release ResgenSwift colors $FORCE_FLAG "./Colors/sampleColors1.txt" \ -# --style all \ -# --xcassets-path "./Colors/colors.xcassets" \ -# --extension-output-path "./Colors/Generated/" \ -# --extension-name "ColorYolo" \ -# --extension-name-ui-kit "UIhkjhkColorYolo" \ -# --extension-suffix "GenAllScript" -# -#echo "\n-------------------------\n" -# -## Twine -#swift run -c release ResgenSwift strings twine $FORCE_FLAG "./Twine/sampleStrings.txt" \ -# --output-path "./Twine/Generated" \ -# --langs "fr en en-us" \ -# --default-lang "en" \ -# --extension-output-path "./Twine/Generated" -#echo "\n-------------------------\n" +echo "\n-------------------------\n" + +## Color +swift run -c release ResgenSwift colors $FORCE_FLAG "./Colors/sampleColors1.txt" \ + --style all \ + --xcassets-path "./Colors/colors.xcassets" \ + --extension-output-path "./Colors/Generated/" \ + --extension-name "ColorYolo" \ + --extension-name-ui-kit "UIhkjhkColorYolo" \ + --extension-suffix "GenAllScript" + +echo "\n-------------------------\n" + +## Twine +swift run -c release ResgenSwift strings twine $FORCE_FLAG "./Twine/sampleStrings.txt" \ + --output-path "./Twine/Generated" \ + --langs "fr en en-us" \ + --default-lang "en" \ + --extension-output-path "./Twine/Generated" + +echo "\n-------------------------\n" ## Strings -#swift run -c release ResgenSwift strings stringium $FORCE_FLAG "./Strings/sampleStrings.txt" \ -# --output-path "./Strings/Generated" \ -# --langs "fr en en-us" \ -# --default-lang "en" \ -# --extension-output-path "./Strings/Generated" \ -# --extension-name "String" \ -# --extension-suffix "GenAllScript" +swift run -c release ResgenSwift strings stringium $FORCE_FLAG "./Strings/sampleStrings.txt" \ + --output-path "./Strings/Generated" \ + --langs "fr en en-us" \ + --default-lang "en" \ + --extension-output-path "./Strings/Generated" \ + --extension-name "String" \ + --extension-suffix "GenAllScript" -#echo "\n-------------------------\n" +echo "\n-------------------------\n" ## Tags -#swift run -c release ResgenSwift strings tags $FORCE_FLAG "./Tags/sampleTags.txt" \ -# --lang "ium" \ -# --extension-output-path "./Tags/Generated" \ -# --extension-name "Tags" \ -# --extension-suffix "GenAllScript" +swift run -c release ResgenSwift strings tags $FORCE_FLAG "./Tags/sampleTags.txt" \ + --lang "ium" \ + --extension-output-path "./Tags/Generated" \ + --extension-name "Tags" \ + --extension-suffix "GenAllScript" #echo "\n-------------------------\n" @@ -59,12 +59,12 @@ swift run -c release ResgenSwift analytics $FORCE_FLAG "./Tags/sampleTags.yml" \ --extension-name "Analytics" \ --extension-suffix "GenAllScript" -#echo "\n-------------------------\n" -# +echo "\n-------------------------\n" + ## Images -#swift run -c release ResgenSwift images $FORCE_FLAG "./Images/sampleImages.txt" \ -# --xcassets-path "./Images/imagium.xcassets" \ -# --extension-output-path "./Images/Generated" \ -# --extension-name "ImageYolo" \ -# --extension-name-ui-kit "UIImageYolo" \ -# --extension-suffix "GenAllScript" +swift run -c release ResgenSwift images $FORCE_FLAG "./Images/sampleImages.txt" \ + --xcassets-path "./Images/imagium.xcassets" \ + --extension-output-path "./Images/Generated" \ + --extension-name "ImageYolo" \ + --extension-name-ui-kit "UIImageYolo" \ + --extension-suffix "GenAllScript" diff --git a/Sources/ResgenSwift/Images/Generator/XcassetsGenerator.swift b/Sources/ResgenSwift/Images/Generator/XcassetsGenerator.swift index c15663c..df6bf29 100644 --- a/Sources/ResgenSwift/Images/Generator/XcassetsGenerator.swift +++ b/Sources/ResgenSwift/Images/Generator/XcassetsGenerator.swift @@ -31,6 +31,7 @@ class XcassetsGenerator { func generateXcassets(inputPath: String, imagesToGenerate: [ParsedImage], xcassetsPath: String) { let fileManager = FileManager() let svgConverter = Images.getSvgConverterPath() + let magickConvert = Images.getMagickConvertPath() let allSubFiles = fileManager.getAllRegularFileIn(directory: inputPath) var generatedAssetsPaths = [String]() @@ -148,7 +149,7 @@ class XcassetsGenerator { // convert path/to/image.png -resize x300 path/to/output.png Shell.shell( [ - "convert", + "\(magickConvert)", "\(imageData.path)", "-resize", "\(convertArguments.x1.width ?? "")x\(convertArguments.x1.height ?? "")", @@ -157,7 +158,7 @@ class XcassetsGenerator { ) Shell.shell( [ - "convert", + "\(magickConvert)", "\(imageData.path)", "-resize", "\(convertArguments.x2.width ?? "")x\(convertArguments.x2.height ?? "")", @@ -166,7 +167,7 @@ class XcassetsGenerator { ) Shell.shell( [ - "convert", + "\(magickConvert)", "\(imageData.path)", "-resize", "\(convertArguments.x3.width ?? "")x\(convertArguments.x3.height ?? "")", diff --git a/Sources/ResgenSwift/Images/Images.swift b/Sources/ResgenSwift/Images/Images.swift index 792bbb5..5458f72 100644 --- a/Sources/ResgenSwift/Images/Images.swift +++ b/Sources/ResgenSwift/Images/Images.swift @@ -128,4 +128,22 @@ struct Images: ParsableCommand { print(error.description) Self.exit(withError: error) } + + @discardableResult + static func getMagickConvertPath() -> String { + // WARNING: The convert command is deprecated in IMv7, use "magick" instead of "convert" + let taskMagick = Shell.shell(["which", "magick"]) + if taskMagick.terminationStatus == 0 { + return taskMagick.output!.removeCharacters(from: CharacterSet.whitespacesAndNewlines) // swiftlint:disable:this force_unwrapping + } + + let taskConvert = Shell.shell(["which", "convert"]) + if taskConvert.terminationStatus == 0 { + return taskMagick.output!.removeCharacters(from: CharacterSet.whitespacesAndNewlines) // swiftlint:disable:this force_unwrapping + } + + let error = ImagesError.magickConvertNotFound + print(error.description) + Self.exit(withError: error) + } } diff --git a/Sources/ResgenSwift/Images/ImagesError.swift b/Sources/ResgenSwift/Images/ImagesError.swift index d4942e7..85bd5b9 100644 --- a/Sources/ResgenSwift/Images/ImagesError.swift +++ b/Sources/ResgenSwift/Images/ImagesError.swift @@ -15,6 +15,7 @@ enum ImagesError: Error { case unknownImageExtension(String) case getFileAttributed(String, String) case rsvgConvertNotFound + case magickConvertNotFound case writeFile(String, String) case createAssetFolder(String) case unknown(String) @@ -39,6 +40,9 @@ enum ImagesError: Error { case .rsvgConvertNotFound: return "error: [\(Images.toolName)] Can't find rsvg-convert (can be installed with 'brew remove imagemagick && brew install librsvg')" + case .magickConvertNotFound: + return "error: [\(Images.toolName)] Can't find magick or convert (can be installed with 'brew install imagemagick')" + case let .writeFile(subErrorDescription, filename): return "error: [\(Images.toolName)] An error occured while writing content to \(filename): \(subErrorDescription)" diff --git a/Sources/ResgenSwift/Images/Parser/ImageFileParser.swift b/Sources/ResgenSwift/Images/Parser/ImageFileParser.swift index a1c1527..fa948db 100644 --- a/Sources/ResgenSwift/Images/Parser/ImageFileParser.swift +++ b/Sources/ResgenSwift/Images/Parser/ImageFileParser.swift @@ -51,8 +51,6 @@ enum ImageFileParser { imagesToGenerate.append(image) } - print(imagesToGenerate) - return imagesToGenerate.filter { $0.tags.contains(platform.rawValue) } diff --git a/Sources/ResgenSwift/Strings/Generator/StringsFileGenerator.swift b/Sources/ResgenSwift/Strings/Generator/StringsFileGenerator.swift index 2ed3399..4de70c2 100644 --- a/Sources/ResgenSwift/Strings/Generator/StringsFileGenerator.swift +++ b/Sources/ResgenSwift/Strings/Generator/StringsFileGenerator.swift @@ -344,7 +344,6 @@ enum StringsFileGenerator { guard definition.hasOneOrMoreMatchingTags(inputTags: tags) == true else { return // Go to next definition } - debugPrint("Found definition") enumDefinition += " case \(definition.name) = \"\(definition.name)\"\n" } } @@ -363,7 +362,6 @@ enum StringsFileGenerator { guard definition.hasOneOrMoreMatchingTags(inputTags: tags) == true else { return // Go to next definition } - debugPrint("Found definition") enumDefinition += " case .\(definition.name): return \\\(extensionClassname).\(definition.name)\n" } } diff --git a/Sources/ResgenSwift/Strings/Stringium/Stringium.swift b/Sources/ResgenSwift/Strings/Stringium/Stringium.swift index bfb3894..934060d 100644 --- a/Sources/ResgenSwift/Strings/Stringium/Stringium.swift +++ b/Sources/ResgenSwift/Strings/Stringium/Stringium.swift @@ -32,21 +32,18 @@ struct Stringium: ParsableCommand { mutating func run() { print("[\(Self.toolName)] Starting strings generation") - print("[\(Self.toolName)] Will use inputFile \(options.inputFile) to generate strings for \(options.langs) (default lang: \(options.defaultLang)") + print("[\(Self.toolName)] Will use inputFile \(options.inputFile) to generate strings for \(options.langs) (default lang: \(options.defaultLang))") // Check requirements guard checkRequirements() else { return } - print("[\(Self.toolName)] Will generate strings") + print("[\(Self.toolName)] Will generate \(options.xcStrings ? "xcStrings catalog" : "legacy strings file")") // Parse input file let sections = TwineFileParser.parse(options.inputFile) // Generate strings files - print(options.xcStrings) if !options.xcStrings { - print("[\(Self.toolName)] Will generate strings") - StringsFileGenerator.writeStringsFiles( sections: sections, langs: options.langs, @@ -56,7 +53,6 @@ struct Stringium: ParsableCommand { inputFilenameWithoutExt: options.inputFilenameWithoutExt ) } else { - print("[\(Self.toolName)] Will generate xcStrings") StringsFileGenerator.writeXcStringsFiles( sections: sections, langs: options.langs,