#!/usr/bin/env ruby require_relative File.join '..', 'lib', 'h' CONF_PATH = File.join(File.expand_path('~'), '.h') unless File.exist?(CONF_PATH) print "Creating #{CONF_PATH} file... " File.open(CONF_PATH, 'w') do |f| f.write('secret') end File.chmod(0600, CONF_PATH) puts 'Done.' end h = H::Generator.new(File.open(CONF_PATH).readlines.first.chomp) puts h.input ARGV[0].to_s, if ARGV[1].nil? 44 else ARGV[1].to_i end