<commit_before>@KDApps = {}

class KodingAppsController extends KDController

  escapeFilePath = FSHelper.escapeFilePath

  defaultManifest = (type, name)->
    {profile} = KD.whoami()
    fullName = Encoder.htmlDecode "#{profile.firstName} #{profile.lastName}"
    raw =
      devMode       : yes
      version       : "0.1"
      name          : "#{name or type.capitalize()}"
      identifier    : "com.koding.apps.#{__utils.slugify name or type}"
      path          : "~/Applications/#{name or type.capitalize()}.kdapp"
      homepage      : "#{profile.nickname}.koding.com/#{__utils.slugify name or type}"
      author        : "#{fullName}"
      repository    : "git://github.com/#{profile.nickname}/#{__utils.slugify name or type}.kdapp.git"
      description   : "#{name or type} : a Koding application created with the #{type} template."
      category      : "web-app" # can be web-app, add-on, server-stack, framework, misc
      source        :
        blocks      :
          app       :
            # pre     : ""
            files   : [ "./index.coffee" ]
            # post    : ""
      options       :
        type        : "tab"

    if type is "sample"
      raw.icns      =
        "64"        : "./resources/icon.64.png"
        "128"       : "./resources/icon.128.png"
        "160"       : "./resources/icon.160.png"
        "256"       : "./resources/icon.256.png"
        "512"       : "./resources/icon.512.png"
      raw.source.stylesheets = [ "./resources/style.css" ]

    json = JSON.stringify raw, null, 2

  @manifests = {}


  # #
  # HELPERS
  # #

  getAppPath = (manifest)->

    {profile} = KD.whoami()
    path = if /^~/.test manifest.path then "/Users/#{profile.nickname}#{manifest.path.substr(1)}" else manifest.path
    return path.replace /(\/+)$/, ""<commit_msg>Do not add all icons that we not provided in resources<commit_after>@KDApps = {}

class KodingAppsController extends KDController

  escapeFilePath = FSHelper.escapeFilePath

  defaultManifest = (type, name)->
    {profile} = KD.whoami()
    fullName = Encoder.htmlDecode "#{profile.firstName} #{profile.lastName}"
    raw =
      devMode       : yes
      version       : "0.1"
      name          : "#{name or type.capitalize()}"
      identifier    : "com.koding.apps.#{__utils.slugify name or type}"
      path          : "~/Applications/#{name or type.capitalize()}.kdapp"
      homepage      : "#{profile.nickname}.koding.com/#{__utils.slugify name or type}"
      author        : "#{fullName}"
      repository    : "git://github.com/#{profile.nickname}/#{__utils.slugify name or type}.kdapp.git"
      description   : "#{name or type} : a Koding application created with the #{type} template."
      category      : "web-app" # can be web-app, add-on, server-stack, framework, misc
      source        :
        blocks      :
          app       :
            # pre     : ""
            files   : [ "./index.coffee" ]
            # post    : ""
      options       :
        type        : "tab"
      icns          :
        "128"       : "./resources/icon.128.png"
      stylesheets   : [ "./resources/style.css" ]

    json = JSON.stringify raw, null, 2

  @manifests = {}


  # #
  # HELPERS
  # #

  getAppPath = (manifest)->

    {profile} = KD.whoami()
    path = if /^~/.test manifest.path then "/Users/#{profile.nickname}#{manifest.path.substr(1)}" else manifest.path
    return path.replace /(\/+)$/, ""
{'fraction_non_alphanumeric': 0.15023337222870478, 'fraction_numerical': 0.012252042007001166, 'mean_word_length': 1.9158163265306123, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3098449', 'n_tokens_mistral': 1120, 'n_tokens_neox': 1063, 'n_words': 228}