# Account information
#
# Add information about each of your accounts to the accounts dictionary.
#
# You can use the dedent function to strip leading whitespace from
# multi-line remarks.  You can use the character sets and exclude function
# to create alphabets for you character-base passwords.
#
# Example:
# To create an alphabet with all characters except tabs use either:
#     'alphabet': exclude(PRINTABLE, '\t')
# or:
#     'alphabet': ALPHANUMERIC + PUNCTUATION + ' '

from avendesora import (
    # Basics
    Account, Hidden, GPG,

    # Character sets
    exclude, LOWERCASE, UPPERCASE, LETTERS, DIGITS, ALPHANUMERIC,
    HEXDIGITS, PUNCTUATION, WHITESPACE, PRINTABLE, DISTINGUISHABLE,

    # Secrets
    Password, Passphrase, PIN, Question, MixedPassword, BirthDate,

    # Account Discovery
    RecognizeAll, RecognizeAny, RecognizeTitle, RecognizeURL, RecognizeCWD,
    RecognizeHost, RecognizeUser, RecognizeEnvVar,
)

master_password = Hidden(
    'c2VjcmV0IG1lc3NhZ2UsIHN1Y2Nlc3NmdWxseSBkZWNvZGVkIQ==',
    secure=False
)
ken = Hidden(
    'c2VjcmV0IG1lc3NhZ2UsIHN1Y2Nlc3NmdWxseSBkZWNvZGVkIQ==',
    secure=False
)

# Accounts
# AAA {{{1
class AlertSCC(Account):
    aliases = ['scc']
    email = 'pizzaman@pizza.com'
    comments = '''
        Account where I signed up for local alert messages from the county 
        covernment.
    '''
    master = ken
    default  = 'password'
    password = Password()
    account = Hidden('MTIzNDU2LTc4OTA=')
    birthdate = BirthDate(2016, 25, 55)
    questions = [
        Question('What city were you born in?'),
        Question('What street did you grow up on?'),
        Question('What was your childhood nickname?'),
    ]
    discovery = [
        RecognizeAll(
            RecognizeURL('https://alertscc.bbcportal.com/Validation'),
            RecognizeUser('ken'),
            script='{birthdate}{return}'
        ),
        RecognizeAll(
            RecognizeURL('https://alertscc.bbcportal.com'),
            RecognizeUser('ken'),
            script='{email}{tab}{password}{return}'
        ),
    ]

# BBB {{{1
# CCC {{{1
# DDD {{{1
# EEE {{{1
# FFF {{{1
# GGG {{{1
# HHH {{{1
# III {{{1
# JJJ {{{1
# KKK {{{1
# LLL {{{1
class Login(Account):
    aliases = ['luks']
    passcode = Passphrase(length=6)
    discovery = [
        RecognizeAll(
            RecognizeHost('kundert'),
            RecognizeTitle(
                # these are used in the terminal
                'sudo', 'sudo *',

                # this is used in for virt-manager
                'Authentication',

                # this is used in for xxx (my logout script)
                '/bin/csh -f /home/ken/bin/xxx'
            ),
            script='{passcode}{return}'
        ),
    ]

# MMM {{{1
class MyBank(Account):
    aliases = ['mb']
    username = 'pizzaman'
    email = 'pizzaman@pizza.com'
    url = 'https://mb.com'
    passcode = Password()
    verbal = Passphrase(length=2)
    pin = PIN()
    questions = [
        Question('What city were you born in?'),
        Question('What street did you grow up on?'),
        Question('What was your childhood nickname?'),
    ]
    accounts = {
        'checking':   Hidden('MTIzNDU2Nzg='),
        'savings':    Hidden('MjM0NTY3ODk='),
        'creditcard': Hidden('MzQ1Njc4OTA='),
    }
    customer_service = '1-866-229-6633'

# NNN {{{1
# OOO {{{1
# PPP {{{1
# QQQ {{{1
# RRR {{{1
# SSS {{{1
# TTT {{{1
# UUU {{{1
# VVV {{{1
# WWW {{{1
# XXX {{{1
# YYY {{{1
# ZZZ {{{1

# vim: filetype=python sw=4 sts=4 et ai ff=unix :
