Sha256: 3ee07d98d908fcb2cb0cf42ffec344f6d89b1408f480fca9fd046e9255d9d8d0
Contents?: true
Size: 1.39 KB
Versions: 6
Compression:
Stored size: 1.39 KB
Contents
#!/usr/bin/env ruby # frozen_string_literal: true # This file is part of Alexandria. # # See the file README.md for authorship and licensing information. require "gettext" require "alexandria" require "optparse" require "ostruct" store = Alexandria::LibraryStore.new(Alexandria::Library::DEFAULT_DIR) Alexandria::LibraryCollection.instance.library_store = store # options = OpenStruct.new OptionParser.new do |opts| opts.banner = "Usage: alexandria [options]" opts.on("-l", "--list", "List libraries in numbered format") do puts Alexandria.list_books_on_console exit end opts.on("-d", "--debug", "Run in debug mode") do $DEBUG = true end opts.on("-h", "--help", "Show help options") do puts opts exit end opts.on("-v", "--version", "Get version number") do puts Alexandria::VERSION exit end end.parse! begin Alexandria.main rescue StandardError => ex warn <<~EOS ----------------------- Alexandria just crashed ----------------------- Timestamp: #{Time.now} Message: #{ex.message} Backtrace: #{ex.backtrace.join("\n")} Release: #{Alexandria::VERSION}(#{Alexandria::DISPLAY_VERSION}) Uname -a: #{`uname -a`.chomp} -- Please report this dump to '#{Alexandria::BUGREPORT_URL}' with some additional information, such as the description of the crash and the steps to reproduce it (if it's possible). EOS exit 1 end
Version data entries
6 entries across 6 versions & 1 rubygems