#!/usr/bin/env python

import ConfigParser

from os.path import expanduser
from os.path import join

from xl_helper.Engine import Engine
from xl_helper.Argh import Argh

if __name__ == "__main__":
    args = Argh.createParser().parse_args()

    config = ConfigParser.RawConfigParser(allow_no_value=True,)
    config.read([join(expanduser("~"), '.xl-helper')])

    Engine(args.path, config).run(
        op=args.action,
        subject=args.subject,
        version=args.version,
        distribution_path=args.dist,
        upgrade_from_path=args.upgrade_from_path,
        start=args.start,
        plugin_name=args.plugin)
    
    print "Done!"