Sha256: afa7bf3a1f85eb442e8f2bcd0340b2e25f9456f993858bce059e51086cf5342c

Contents?: true

Size: 849 Bytes

Versions: 1

Compression:

Stored size: 849 Bytes

Contents

require "thor"
require "filerary/version"
require "filerary/librarian"

module Filerary
  class Command < Thor
    desc "version", "Show version number"
    def version
      puts VERSION
    end

    desc "list", "List filenames in the collection"
    def list
      puts Filerary::Librarian.new.list
    end

    desc "collect FILE...", "Collect files (takes time)"
    def collect(*files)
      Filerary::Librarian.new.collect(files)
    end

    desc "search WORD", "Search for files in the collection"
    def search(word)
      puts Filerary::Librarian.new.search(word)
    end

    desc "cleanup", "Remove deleted files in the collection"
    def cleanup
      Filerary::Librarian.new.cleanup
    end

    desc "remove PATH", "Remove a file in the collection"
    def remove(path)
      Filerary::Librarian.new.remove(path)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
filerary-0.0.6 lib/filerary/command.rb