]> kaliko git repositories - mpd-goodies.git/blob - src/lib/goodies.py
* add Goodie class (wraps mpdclass and startop together)
[mpd-goodies.git] / src / lib / goodies.py
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2012 Kaliko Jack <kaliko.jack@azylum.org>
4 #
5 #   This program is free software: you can redistribute it and/or modify
6 #   it under the terms of the GNU General Public License as published by
7 #   the Free Software Foundation, either version 3 of the License, or
8 #   (at your option) any later version.
9 #
10 #   This program is distributed in the hope that it will be useful,
11 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 #   GNU General Public License for more details.
14 #
15 #   You should have received a copy of the GNU General Public License
16 #   along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 #
18
19 """
20 DOC:
21     All goodies inherit from Goodie which in turn inherits from StartOpt and
22     MPDClass.
23
24     StartOpt deals with command line argument and options, it will look for env.
25     var. $MPD_HOST and $MPD_PORT as well
26
27     MPDClass is a plain MPD client
28 """
29
30 from lib.mpdclass import MPDClass
31 from lib.startop import StartOpt
32
33
34 class Goodie(StartOpt, MPDClass):
35     """"""
36
37     def __init__(self, script_info, extra_options=[]):
38         """"""
39         StartOpt.__init__(self, script_info, extra_options)
40         self.con_id = dict({'host': self.cli_options.host,
41                        'port': self.cli_options.port})
42         MPDClass.__init__(self)
43
44
45 # Script starts here
46 if __name__ == '__main__':
47     pass
48
49 # VIM MODLINE
50 # vim: ai ts=4 sw=4 sts=4 expandtab