#!/usr/bin/env ruby $LOAD_PATH.unshift File.expand_path("../../lib", __dir__) $LOAD_PATH.unshift File.expand_path("lib", __dir__) require "rbnotes" DEBUG = true module Rbnotes class App def initialize @conf = default_conf end def default_conf { :repository_type => :file_system, :repository_name => DEBUG ? "sandbox/notes_dev" : "notes", :repository_base => File.expand_path("~"), :pager => "bat", } end def run(args) cmd = args.shift Rbnotes::Commands.load(cmd).execute(args, @conf) end end end app = Rbnotes::App.new app.run(ARGV)