#!/usr/bin/env python
#Pyxis and Original Sipie: Sirius Command Line Player
#Copyright (C) Corey Ling, Eli Criffield
#
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version 2
#of the License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

import os
import sys
from optparse import OptionParser

# Add pyxis to module search path when running locally
pyxis_dir = os.path.dirname(sys.path[0])
if os.path.exists(os.path.join(pyxis_dir, 'pyxis')):
    sys.path.append(pyxis_dir)

from pyxis import Interface

usage = "Usage: %prog [OPTIONS] [STATION]"
parser = OptionParser(usage=usage)
parser.add_option("-l", "--list", dest="list",
    action='store_true', default=False,
    help="list channels (Lots)")
parser.add_option("-s", "--setup", dest="setup",
    action='store_true', default=False,
    help="run setup")
parser.add_option("-q", "--quiet", dest="quiet",
    action='store_true', default=False,
    help="quiet the output to command line")
parser.add_option("-r", "--record", dest="record",
    action='store_true', default=False,
    help="record to a file")

(opts, args) = parser.parse_args()

station = None
if len(args) > 0:
    station = args[0]
Interface(opts, station)
