Sha256: 6a869dc73e9521f23067ce0ce91005e74a9a34673502058ddf50e8219f44ced8
Contents?: true
Size: 1.14 KB
Versions: 1
Compression:
Stored size: 1.14 KB
Contents
#!/usr/bin/env ruby require 'optparse' require 'methadone' require 'filentory.rb' class App include Methadone::Main include Methadone::CLILogging main do |name, path, server| # Add args you want: |like,so| absolute_path = File.expand_path(path) info("name: #{name}") info "path: #{absolute_path}" info "server: #{server}" info "type: #{options[:type]}" data_store = Datastore.new (name) data_store.type = options[:type] collector = Collector.new data_store.files << collector.collect(absolute_path) puts data_store.to_json # your program code here # You can access CLI options via # the options Hash end # supplemental methods here # Declare command-line interface here description "A tool to create an filentory-cli of a storage medium" # Options: on("-t TYPE", "--type TYPE", "The type of the media to add to the filentory-cli") # Arguments of Filentory-cli arg :name # required argument arg :path arg :server, :optional # optional argument # # # Make an argument optional # arg :optional_arg, :optional version Filentory::VERSION use_log_level_option go! end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
filentory-cli-0.2.0 | bin/filentory-cli |