Sha256: 4e77bd0faa875de82ce88fc38da5b924a6bd58f77fc317015bd15e398e4d05f1

Contents?: true

Size: 1011 Bytes

Versions: 1

Compression:

Stored size: 1011 Bytes

Contents

#!/usr/bin/env ruby

require 'slackdo'

config = Slackdo::Config.new
config.configure_init

case ARGV[0]
	when 'configure'
	  config.configure_slack_webhook if ARGV[1] == 'slack'
	  config.configure_trello_api if ARGV[1] == 'trello' && ARGV[2].nil?
	when 'category'
	  config.add_category if ARGV[1] == 'add'
	  config.remove_category if ARGV[1] == 'remove'
	when 'label'
	  config.add_label if ARGV[1] == 'add'
	when 'disable'
	  config.disable_trello if ARGV[1] == 'trello'
	when 'enable'
      config.enable_trello if ARGV[1] == 'trello'
	when 'task'
	  slack = Slackdo::Task.new
      slack.add_task
	  file = File.read("#{ENV['HOME']}/.slackdo/config.json")
      hash = JSON.parse(file)
	  if hash['allow_trello_pushing'] == 'true'
		card_name = slack.get_message
		card_desc = slack.get_notes
		card_category = slack.get_category
		trello = Slackdo::Card.new
	    trello.add_card(card_category, card_name, card_desc)
	  end
	when 'reminder'
	  slack = Slackdo::Reminder.new
	  slack.add_reminder
    end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slackdo-0.3.4 bin/slackdo