Sha256: d025c035c28c98a47ef47dd11931a8432d2e2571ae4d3bff80b545b537f1a26b

Contents?: true

Size: 1.05 KB

Versions: 7

Compression:

Stored size: 1.05 KB

Contents

module Transcriptic
  module CLI

    # manage projects
    #
    class Project < Thor

      desc "index", "upload FILENAME or DIRECTORY and launch it"
      def index
        if args.empty?
          error("Usage: transcriptic project NAME")
        end
        name = args.shift
        data = transcriptic.project_info(name)
        display "Project \"#{data["name"]}\":"
        display "  shortname: #{data["codename"]}"
        display "  active runs: #{data["active_runs"].length}"
        display "  archived runs: #{data["completed_runs"].length}"
        display "  datasets created: #{data["datasets"].length}"
        display "  created at: #{data["created_at"]}"
      end

      # transcriptic project:list
      desc "list", "list the projects the user can see"
      def list
        ret = transcriptic.list_projects
        if ret.empty?
          error("No projects for #{transcriptic.user}")
          return
        end
        ret.each do |project|
          display "\t" + project["codename"] + "\t\t" + project["name"]
        end
      end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
transcriptic-0.2.10 lib/transcriptic/commands/project.rb
transcriptic-0.2.5 lib/transcriptic/commands/project.rb
transcriptic-0.2.4 lib/transcriptic/commands/project.rb
transcriptic-0.2.3 lib/transcriptic/commands/project.rb
transcriptic-0.2.2 lib/transcriptic/commands/project.rb
transcriptic-0.2.1 lib/transcriptic/commands/project.rb
transcriptic-0.2.0 lib/transcriptic/commands/project.rb