Sha256: 55c984b29adf6e67636ebe45e4b2e1f00c14b438837815d3533d68ada8c0b1b3
Contents?: true
Size: 1.38 KB
Versions: 1
Compression:
Stored size: 1.38 KB
Contents
#!/usr/bin/env ruby require "bundler/setup" # Load main APP. require 'getapp' # Thor is a toolkit for building powerful command-line interfaces. require 'thor' # Pry is a runtime developer console and IRB alternative with powerful introspection capabilities. require "pry" # == GetAppImportCLI Methods # # Provides a way to run using commandline # # Can be called using commandline as : # # getapp_import capterra <Yaml file path> # getapp_import softwareadvice <JSON file path> # getapp_import third_provider <Valid URI that provides CSV> # class GetAppImportCLI < Thor class_option :verbose, type: :boolean, aliases: "-v" desc "capterra", "Import products from capterra. Format supported yaml" def capterra(path) puts "Importing from capterra" if options[:verbose] puts "capterra: file path: #{path}" if options[:verbose] Getapp::Import::Capterra.new(path, options[:verbose]).import end desc "softwareadvice", "Import products from softwareadvice. Format supported json" def softwareadvice(path) puts "softwareadvice" if options[:verbose] puts "softwareadvice: file path: #{path}" if options[:verbose] end desc "third_provider", "Import products from third provider. Format supported CSV / CSV Link" def third_provider(url) puts "third_provider" if options[:verbose] puts "third_provider: Url: #{url}" if options[:verbose] end end GetAppImportCLI.start(ARGV)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
getapp-0.1.2 | bin/getapp_import |