# Path: sofine/plugins/plugin_base.py
# class PluginBase(object):
#     def __init__(self):
#     def get_adds_keys(self):
#     def parse_args(self, argv):
#     def get_schema(self, args=None):
#     def get_namespaced_schema(self):


import logging
import os
import re
import sys
import mechanize
from urllib2 import HTTPError
from optparse import OptionParser
from bs4 import BeautifulSoup
from sofine.plugins import plugin_base as plugin_base
Retrieves data for the portfolio identified by the args passed in. 
"""
        customer_id, pin, account_id, customer_email = args
        br = _get_fidelity_logged_in_browser_session(customer_id, pin, account_id, customer_email)
        data = _get_fidelity_position_data(br, account_id)
        return data


    def parse_args(self, argv):
        """
WARNING: This script requires that you pass your username, password 
and accountId. This script calls cleartext only to the login form. 
Once logged in subsequent HTML calls are https. That said, you are 
passing this in clear text when running this from your shell, 
so your system must be secure and that is YOUR responsibility. Also, 
of course, do NOT store this information unencryted in a plain text
file anywhere, ever.

* `[-c|--customer-id]` - Customer Id. Required.
* `[-p|--pin]` - Customer PIN number or password. Required.
* `[-a|--account-id]` - Customer account from which to retrieve position information. Required.
* `[-e|--customer-email]` - Customer email. Required.
"""

        usage = """
WARNING: This script requires that you pass your username, password 
and accountId. This script calls cleartext only to the login form. 
Once logged in subsequent HTML calls are https. That said, you are 
passing this in clear text when running this from your shell, 
so your system must be secure and that is YOUR responsibility. Also, 

# Path: sofine/plugins/plugin_base.py
# class PluginBase(object):
#     def __init__(self):
#     def get_adds_keys(self):
#     def parse_args(self, argv):
#     def get_schema(self, args=None):
#     def get_namespaced_schema(self):


# Path: sofine/plugins/example/fidelity.py
import logging
import os
import re
import sys
import mechanize
from urllib2 import HTTPError
from optparse import OptionParser
from bs4 import BeautifulSoup
from sofine.plugins import plugin_base as plugin_base

Retrieves data for the portfolio identified by the args passed in. 
"""
        customer_id, pin, account_id, customer_email = args
        br = _get_fidelity_logged_in_browser_session(customer_id, pin, account_id, customer_email)
        data = _get_fidelity_position_data(br, account_id)
        return data


    def parse_args(self, argv):
        """
WARNING: This script requires that you pass your username, password 
and accountId. This script calls cleartext only to the login form. 
Once logged in subsequent HTML calls are https. That said, you are 
passing this in clear text when running this from your shell, 
so your system must be secure and that is YOUR responsibility. Also, 
of course, do NOT store this information unencryted in a plain text
file anywhere, ever.

* `[-c|--customer-id]` - Customer Id. Required.
* `[-p|--pin]` - Customer PIN number or password. Required.
* `[-a|--account-id]` - Customer account from which to retrieve position information. Required.
* `[-e|--customer-email]` - Customer email. Required.
"""

        usage = """
WARNING: This script requires that you pass your username, password 
and accountId. This script calls cleartext only to the login form. 
Once logged in subsequent HTML calls are https. That said, you are 
passing this in clear text when running this from your shell, 
so your system must be secure and that is YOUR responsibility. Also, 

of course, do NOT store this information unencryted in a plain text