 md5File = require 'md5-file'
 filedel = require 'filedel'
 fileMove = require 'file-move'
-readline = require 'readline-sync'
-i18n = require("i18n");
+i18n = require 'i18n'
+#pixabay = require 'pixabayjs'
+yn = require 'yn'
+mkdirp = require 'mkdir-p'
+
+readline = require 'readline'
+
 
 locales = [
   'en'
   'eo'
 ]
-i18nconfig = 
+i18nconfig =
   locales: locales
   directory: './locales'
 i18n.configure i18nconfig

    + '    dest The file path to install the image to\n' \
    + '  remove <id>           Removes a dependency on an asset\n' \
    + '    id   The (hash) ID of the image to remove from dependencies'
  
    
# Interpret commands.
switch process.argv[2]
  when 'help' then help()

#
add = (args) ->
  id = args[3]

  # Check resolution.
  res = args[4]
  if !isValidResolution res
    log.error "That resolution '#{res}' isn't valid."
    return false

  # Add new image to configuration file.
  image =
    id: id
    resolution: getResolutionCode res
    destination: args[5]
  config.images.push image

  persistProject() # Update configuration file.

  log.info "Added image with ID '#{image.id}' as asset."

  install() # Freshly install all images.


# Removes an image from installed assets.
#
# @param [Object] args the arguments to the program
