Add checker class to check if generation of font are required + Split CLIToolCore in multiple file (one by class)
This commit is contained in:
@@ -9,7 +9,7 @@ import Foundation
|
||||
import CLIToolCore
|
||||
|
||||
class FontToolHelper {
|
||||
static func getFontsData(fromInputFolder inputFolder: String) -> (fontsNames: [String], fontsFileNames: [String]) {
|
||||
static func getFontsFilenames(fromInputFolder inputFolder: String) -> [String] {
|
||||
// Get a enumerator for all files
|
||||
let fileManager = FileManager()
|
||||
|
||||
@@ -28,10 +28,12 @@ class FontToolHelper {
|
||||
return false
|
||||
}
|
||||
|
||||
return fontsFileNames
|
||||
}
|
||||
|
||||
static func getFontsNames(fontsFileNames: [String]) -> [String] {
|
||||
// Get font name (font name and font file name can be different)
|
||||
let fontsNames = fontsFileNames.compactMap { getFontName(atPath: "\(inputFolder)/\($0)") }
|
||||
|
||||
return (fontsNames: fontsNames, fontsFileNames: fontsFileNames)
|
||||
fontsFileNames.compactMap { getFontName(atPath: $0) }
|
||||
}
|
||||
|
||||
private static func getFontName(atPath path: String) -> String {
|
||||
|
||||
Reference in New Issue
Block a user