#!/usr/bin/env ruby require "rbnotes" include Rbnotes DEBUG = true class App def run(args) cmd = args.shift Commands.load(cmd).execute(args, Rbnotes.conf) end end app = App.new begin app.run(ARGV) rescue MissingArgumentError, MissingTimestampError, NoEditorError, ProgramAbortError => e puts e.message exit 1 end