Sha256: ab9040412062a953041a1eff7e4f336bb242cd8664e14920e89e84b1c7072c39

Contents?: true

Size: 898 Bytes

Versions: 62

Compression:

Stored size: 898 Bytes

Contents

# -*- coding: utf-8 -*-
#
# Copyright 2013 whiteleaf. All rights reserved.
#

require_relative "../helper"

module Command
  class Folder < CommandBase
    def self.oneline_help
      "小説の保存フォルダを開きます"
    end

    def initialize
      super("<target> [<target2> ...]")
      @opt.separator <<-EOS

  ・指定した小説の保存フォルダを開きます。

  Examples:
    narou folder n9669bk
    narou folder musyoku
    narou folder 0
    narou f 0
      EOS
    end

    def execute(argv)
      super
      if argv.empty?
        puts @opt.help
        return
      end
      tagname_to_ids(argv)
      argv.each do |target|
        dir = Downloader.get_novel_data_dir_by_target(target)
        if dir
          Helper.open_directory(dir)
          puts dir
        else
          error "#{target} は存在しません"
        end
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
narou-3.2.5.1 lib/command/folder.rb
narou-3.2.5 lib/command/folder.rb
narou-3.2.4 lib/command/folder.rb
narou-3.2.3 lib/command/folder.rb
narou-3.2.2 lib/command/folder.rb
narou-3.2.1 lib/command/folder.rb
narou-3.2.0.1 lib/command/folder.rb
narou-3.2.0 lib/command/folder.rb
narou-3.1.11 lib/command/folder.rb
narou-3.1.10 lib/command/folder.rb
narou-3.1.9 lib/command/folder.rb
narou-3.1.8 lib/command/folder.rb
narou-3.1.7 lib/command/folder.rb
narou-3.1.6 lib/command/folder.rb
narou-3.1.5 lib/command/folder.rb
narou-3.1.4 lib/command/folder.rb
narou-3.1.3 lib/command/folder.rb
narou-3.1.2 lib/command/folder.rb
narou-3.1.1 lib/command/folder.rb
narou-3.0.5.1 lib/command/folder.rb