<commit_before>//
//  AppIconSet.swift
//  AppIconSetGen
//
//  Created by <NAME> on 11/05/2017.
//
//

import Foundation
import Cocoa
import Commander
import AppIconSetGenCore

let main = command(
    Argument<String>("input file", description: "Path to an image file (.pdf, .png, etc)"),
    Flag("iOS", description: "Generates app icons for iOS"),
    Flag("watchOS", description: "Generates app icons for watchOS"),
    Flag("macOS", description: "Generates app icons for macOS"),
    Option("output", ".", description: "Output folder of the generated App Icon set"),
    Option("appIconSetName", "AppIcon", description: "App icon set name")

) { inputFile, iOS, watchOS, macOS, output, appIconSetName in

    guard iOS || watchOS || macOS else {
        throw "At least one of --iOS, --watchOS or --macOS flag must be specified!"
    }

    guard let image = NSImage(byReferencingFile: inputFile), image.isValid else {
        throw "Unable to open file: \(inputFile)!"
    }

    var iconInfoItems = [IconInfo]()

    if iOS {<commit_msg>Updated to latest Commander API<commit_after>//
//  AppIconSet.swift
//  AppIconSetGen
//
//  Created by <NAME> on 11/05/2017.
//
//

import Foundation
import Cocoa
import Commander
import AppIconSetGenCore

let main = command(
    Argument<String>("input file", description: "Path to an image file (.pdf, .png, etc)"),
    Flag("iOS", description: "Generates app icons for iOS"),
    Flag("watchOS", description: "Generates app icons for watchOS"),
    Flag("macOS", description: "Generates app icons for macOS"),
    Option("output", default: ".", description: "Output folder of the generated App Icon set"),
    Option("appIconSetName", default: "AppIcon", description: "App icon set name")
) { inputFile, iOS, watchOS, macOS, output, appIconSetName in

    guard iOS || watchOS || macOS else {
        throw "At least one of --iOS, --watchOS or --macOS flag must be specified!"
    }

    guard let image = NSImage(byReferencingFile: inputFile), image.isValid else {
        throw "Unable to open file: \(inputFile)!"
    }

    var iconInfoItems = [IconInfo]()

    if iOS {
{'fraction_non_alphanumeric': 0.13000471031559113, 'fraction_numerical': 0.007536504945831371, 'mean_word_length': 3.519148936170213, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2208277', 'n_tokens_mistral': 656, 'n_tokens_neox': 621, 'n_words': 228}