<commit_before>//
//  Config.swift
//  Yomu
//
//  Created by <NAME> on 7/29/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import AppKit
import Hue

private let bundle = Bundle.main
private let info = bundle.infoDictionary!

internal struct Style {
  let actionButtonColor = NSColor(hex: "#2674A8")
  let borderColor = NSColor(hex: "#F0F0F0")
  let inputBorderColor = NSColor(hex: "#D0D0D0")
  let buttonBackgroundColor = NSColor(hex: "#FFFFFF")
  let cornerRadius = CGFloat(7.0)
  let darkenBackgroundColor = NSColor(hex: "#F4F4F4")
  let inputBackgroundColor = NSColor(hex: "#FFFFFF")
  let noteColor = NSColor(hex: "#555555")
  let primaryBackgroundColor = NSColor(hex: "#FFFFFF")
  let selectedBackgroundColor = NSColor(hex: "22BDFC")
  let primaryFontColor = NSColor(hex: "#474747")
}

internal struct Icon {
  let plus: NSImage = #imageLiteral(resourceName: "Plus")
  let pin: NSImage = #imageLiteral(resourceName: "Pin")
}

internal struct IconName {
  let ascending = "Ascending"
  let descending = "Descending"
}

internal struct ChapterPageSize {
  let width = 730
  let height = 1040
  let minimumZoomScale = 0.1
  let zoomScaleStep = 0.1
}

public struct Config {
  static let YomuAPI: String = info["YomuAPI"] as! String
  static let style = Style()
  static let icon = Icon()
  static let iconName = IconName()
  static let chapterPageSize = ChapterPageSize()

  static fileprivate var iconByName: [String: NSImage] = [:]

  static func icon(name: String) -> NSImage {
    if let icon = iconByName[name] {
      return icon
    }

    let _icon = bundle.image(forResource: name)!
    iconByName[name] = _icon

    return _icon
  }
}<commit_msg>Add config for keyboard event<commit_after>//
//  Config.swift
//  Yomu
//
//  Created by <NAME> on 7/29/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import AppKit
import Hue

private let bundle = Bundle.main
private let info = bundle.infoDictionary!

internal struct Style {
  let actionButtonColor = NSColor(hex: "#2674A8")
  let borderColor = NSColor(hex: "#F0F0F0")
  let inputBorderColor = NSColor(hex: "#D0D0D0")
  let buttonBackgroundColor = NSColor(hex: "#FFFFFF")
  let cornerRadius = CGFloat(7.0)
  let darkenBackgroundColor = NSColor(hex: "#F4F4F4")
  let inputBackgroundColor = NSColor(hex: "#FFFFFF")
  let noteColor = NSColor(hex: "#555555")
  let primaryBackgroundColor = NSColor(hex: "#FFFFFF")
  let selectedBackgroundColor = NSColor(hex: "22BDFC")
  let primaryFontColor = NSColor(hex: "#474747")
}

internal struct Icon {
  let plus: NSImage = #imageLiteral(resourceName: "Plus")
  let pin: NSImage = #imageLiteral(resourceName: "Pin")
}

internal struct IconName {
  let ascending = "Ascending"
  let descending = "Descending"
}

internal struct ChapterPageSize {
  let width = 730
  let height = 1040
  let minimumZoomScale = 0.1
  let zoomScaleStep = 0.1
}

public struct Config {
  static let YomuAPI: String = info["YomuAPI"] as! String
  static let style = Style()
  static let icon = Icon()
  static let iconName = IconName()
  static let chapterPageSize = ChapterPageSize()

  static fileprivate var iconByName: [String: NSImage] = [:]

  static func icon(name: String) -> NSImage {
    if let icon = iconByName[name] {
      return icon
    }

    let _icon = bundle.image(forResource: name)!
    iconByName[name] = _icon

    return _icon
  }

  enum KeyboardEvent: String {
    case nextChapter = "l"
    case previousChapter = "h"
  }
}
{'fraction_non_alphanumeric': 0.11391304347826087, 'fraction_numerical': 0.028985507246376812, 'mean_word_length': 3.9370529327610875, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '5288623', 'n_tokens_mistral': 1196, 'n_tokens_neox': 1127, 'n_words': 335}