Sha256: 0f912610511dc0514cefbcc01cb9a62726c3f73a2c6fe81fd2bd7370cf33d235

Contents?: true

Size: 414 Bytes

Versions: 2

Compression:

Stored size: 414 Bytes

Contents

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

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

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

passwords = SonicPass.generate(length, count)

# Copy the generated password to the clipboard
if count == 1
  Clipboard.copy(passwords[0])
  puts "Password: #{passwords[0]} copied to clipboard"
else
  puts passwords.join("\n")
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sonic_pass-0.2.1 bin/sonic_pass
sonic_pass-0.2.0 bin/sonic_pass