Sha256: 4915698f90196b454fa2353bbc0e8f5123265ef6153e42f1ed2688177af54856

Contents?: true

Size: 519 Bytes

Versions: 1

Compression:

Stored size: 519 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require_relative '../lib/sonic_pass'
require_relative '../cli_ext/base'
require 'clipboard'

length = ARGV[0] ? ARGV[0].to_i : 12
count  = ARGV[1] ? ARGV[1].to_i : 1

passwords = SonicPass.generate(length, count)

if count == 1
  Clipboard.copy(passwords)
  puts "Password: #{passwords} copied to clipboard"
else
  begin
    # puts "#{count} passwords generated:"
    SonicPass::CLI.call(passwords)
  rescue StandardError => _e
    puts passwords.join("\n")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sonic_pass-1.0.1 bin/sonic_pass