#!/usr/bin/python3
#Insecure Password Manager

import sys
import pyperclip

passwords = {'email': 'SDJLKf08913hfdhf',
             'blog': 'LASKDJfoiajswdlkfja10324',
             'luggage': '123456'}

if len(sys.argv) < 2: # verify input is the name of an account (most likely greater than single character)
    print('Usage:: python pw.py [account] - copy account password')
    sys.exit()

account = sys.argv[1] # first command lin arg is the account name

if account in passwords:
    pyperclip.copy(passwords[account])
    print('Password for ' + account + ' copied to clipboard.')
else:
    print('There is no account named ' + account + '. Please enter a password for ' + account)
    passwords[account] = input()
