#!/usr/bin/env ruby require 'optparse' check_notes = false options = {} choices = OptionParser.new do |opts| opts.banner = "Usage: notion_orbit --check-notes" opts.on("-h", "--help", "Prints help instructions") do puts opts exit end opts.on("--check-notes", "Check for new notes") do check_notes = true end end.parse! $LOAD_PATH.unshift(File.expand_path('../lib/notion_orbit', __dir__)) require_relative '../lib/notion_orbit' require_relative '../scripts/check_notes' if check_notes puts "Checking for new notes and posting them to your Orbit workspace..." ARGV[0] = 'render' NotionOrbit::Scripts::CheckNotes.start(ARGV) end