]> kaliko git repositories - mpd-goodies.git/blobdiff - src/lib/goodies.py
* add Goodie class (wraps mpdclass and startop together)
[mpd-goodies.git] / src / lib / goodies.py
diff --git a/src/lib/goodies.py b/src/lib/goodies.py
new file mode 100755 (executable)
index 0000000..3cda566
--- /dev/null
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2012 Kaliko Jack <kaliko.jack@azylum.org>
+#
+#   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 3 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, see <http://www.gnu.org/licenses/>.
+#
+
+"""
+DOC:
+    All goodies inherit from Goodie which in turn inherits from StartOpt and
+    MPDClass.
+
+    StartOpt deals with command line argument and options, it will look for env.
+    var. $MPD_HOST and $MPD_PORT as well
+
+    MPDClass is a plain MPD client
+"""
+
+from lib.mpdclass import MPDClass
+from lib.startop import StartOpt
+
+
+class Goodie(StartOpt, MPDClass):
+    """"""
+
+    def __init__(self, script_info, extra_options=[]):
+        """"""
+        StartOpt.__init__(self, script_info, extra_options)
+        self.con_id = dict({'host': self.cli_options.host,
+                       'port': self.cli_options.port})
+        MPDClass.__init__(self)
+
+
+# Script starts here
+if __name__ == '__main__':
+    pass
+
+# VIM MODLINE
+# vim: ai ts=4 sw=4 sts=4 expandtab