Sha256: 2561418d7cae60c7f06b8fe7349bbc2a25a2c9a2128178fdbf586357c0e8a5af

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 KB

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require "optparse"

check_comments = false
check_posts = false
historical_import = false

options = {}
choices = OptionParser.new do |opts|
  opts.banner = "Usage: circle_orbit --check-comments"
  opts.on("-h", "--help", "Prints help instructions") do
    puts opts
    exit
  end
  opts.on("--check-comments", "Check for new comments on your Circle Spaces posts") do
    check_comments = true
  end
  opts.on("--check-posts", "Check for new posts in your Circle Spaces") do
    check_posts = true
  end
  opts.on("--historical-import", "Performa historical import of all new Circle interactions") do
    historical_import = true
  end
end.parse!

$LOAD_PATH.unshift(File.expand_path("../lib/circle_orbit", __dir__))

require_relative "../lib/circle_orbit"
require_relative "../scripts/check_comments"
require_relative "../scripts/check_posts"

if check_comments
  puts "Checking for new Circle Spaces post comments within the past day and sending them to your Orbit workspace..."
  ARGV[0] = "render"
  ARGV[1] = historical_import
  CircleOrbit::Scripts::CheckComments.start(ARGV)
end

if check_posts
  puts "Checking for new Circle Spaces posts and sending them to your Orbit workspace..."
  ARGV[0] = "render"
  ARGV[1] = historical_import
  CircleOrbit::Scripts::CheckPosts.start(ARGV)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
circle_orbit-0.2.0 bin/circle_orbit
circle_orbit-0.1.0 bin/circle_orbit