[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[myserver-commit] [3050] myserver-get: added xml config file and support
From: |
Daniele Perrone |
Subject: |
[myserver-commit] [3050] myserver-get: added xml config file and support, and license. |
Date: |
Tue, 07 Apr 2009 16:41:48 +0000 |
Revision: 3050
http://svn.sv.gnu.org/viewvc/?view=rev&root=myserver&revision=3050
Author: dperrone
Date: 2009-04-07 16:41:47 +0000 (Tue, 07 Apr 2009)
Log Message:
-----------
myserver-get: added xml config file and support, and license.
Modified Paths:
--------------
trunk/misc/myserver-get/myserver-get.py
trunk/misc/myserver-get/myserverGetLib/config.py
trunk/misc/myserver-get/myserverGetLib/console.py
trunk/misc/myserver-get/myserverGetLib/error.py
trunk/misc/myserver-get/myserverGetLib/general.py
trunk/misc/myserver-get/myserverGetLib/local.py
trunk/misc/myserver-get/myserverGetLib/remote.py
trunk/misc/myserver-get/myserverGetLib/remoteGenericUrl.py
Added Paths:
-----------
trunk/misc/myserver-get/myserver-get.xml
Modified: trunk/misc/myserver-get/myserver-get.py
===================================================================
--- trunk/misc/myserver-get/myserver-get.py 2009-04-04 11:32:38 UTC (rev
3049)
+++ trunk/misc/myserver-get/myserver-get.py 2009-04-07 16:41:47 UTC (rev
3050)
@@ -1,3 +1,19 @@
+# MyServer
+# Copyright (C) 2009 The MyServer Team
+# 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/>.
+
+
from myserverGetLib.general import MyServerGet
import sys
import getopt
@@ -10,7 +26,7 @@
def main(argv):
myserverGet = MyServerGet()
command = ""
-
+ myserverGetLib.config.loadConfig()
commands = {"":usage, "update":myserverGet.update,
"search":myserverGet.search,"install":myserverGet.install,"source":myserverGet.source,"source-auto":myserverGet.sourceAuto,"remove":myserverGet.remove}
Added: trunk/misc/myserver-get/myserver-get.xml
===================================================================
--- trunk/misc/myserver-get/myserver-get.xml (rev 0)
+++ trunk/misc/myserver-get/myserver-get.xml 2009-04-07 16:41:47 UTC (rev
3050)
@@ -0,0 +1,20 @@
+<MYSERVER-GET>
+
+ <REP_LIST_FILE>repositories.xml</REP_LIST_FILE>
+
+
+ <PLUGIN_LIST_FILES_DIR>list</PLUGIN_LIST_FILES_DIR>
+
+
+ <PLUGIN_LIST_PREFIX>myserver-get-</PLUGIN_LIST_PREFIX>
+
+
+ <PLUGIN_LIST_SUFFIX>-plugin-list.xml</PLUGIN_LIST_SUFFIX>
+
+
+
<MYSERVER_PLUGIN_DIR>../../myserver/binaries/plugins</MYSERVER_PLUGIN_DIR>
+
+ <MYSERVER_VERSION>0.9</MYSERVER_VERSION>
+
+ <MSHEADERS>/home/dany/srcprojects/myserver/myserver</MSHEADERS>
+</MYSERVER-GET>
\ No newline at end of file
Modified: trunk/misc/myserver-get/myserverGetLib/config.py
===================================================================
--- trunk/misc/myserver-get/myserverGetLib/config.py 2009-04-04 11:32:38 UTC
(rev 3049)
+++ trunk/misc/myserver-get/myserverGetLib/config.py 2009-04-07 16:41:47 UTC
(rev 3050)
@@ -1,4 +1,20 @@
+# MyServer
+# Copyright (C) 2009 The MyServer Team
+# 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/>.
+
+
CNFG_FILE = "myserver-get.xml"
REP_LIST_FILE = "repositories.xml"
@@ -19,3 +35,34 @@
arch = ""
+def loadConfig(file = CNFG_FILE):
+ import xml.dom.minidom
+ xmlCnfg = xml.dom.minidom.parse(file)
+
+ elements = xmlCnfg.getElementsByTagName("REP_LIST_FILE")
+ if len(elements)==1:
+ REP_LIST_FILE = elements[0].firstChild.data
+
+ elements = xmlCnfg.getElementsByTagName("PLUGIN_LIST_FILES_DIR")
+ if len(elements)==1:
+ PLUGIN_LIST_FILES_DIR = elements[0].firstChild.data
+
+ elements = xmlCnfg.getElementsByTagName("PLUGIN_LIST_PREFIX")
+ if len(elements)==1:
+ PLUGIN_LIST_PREFIX = elements[0].firstChild.data
+
+ elements = xmlCnfg.getElementsByTagName("PLUGIN_LIST_SUFFIX")
+ if len(elements)==1:
+ PLUGIN_LIST_SUFFIX = elements[0].firstChild.data
+
+ elements = xmlCnfg.getElementsByTagName("MYSERVER_PLUGIN_DIR")
+ if len(elements)==1:
+ MYSERVER_PLUGIN_DIR = elements[0].firstChild.data
+
+ elements = xmlCnfg.getElementsByTagName("MYSERVER_VERSION")
+ if len(elements)==1:
+ MYSERVER_VERSION = elements[0].firstChild.data
+
+ elements = xmlCnfg.getElementsByTagName("MSHEADERS")
+ if len(elements)==1:
+ MSHEADERS = elements[0].firstChild.data
\ No newline at end of file
Modified: trunk/misc/myserver-get/myserverGetLib/console.py
===================================================================
--- trunk/misc/myserver-get/myserverGetLib/console.py 2009-04-04 11:32:38 UTC
(rev 3049)
+++ trunk/misc/myserver-get/myserverGetLib/console.py 2009-04-07 16:41:47 UTC
(rev 3050)
@@ -1,3 +1,18 @@
+# MyServer
+# Copyright (C) 2009 The MyServer Team
+# 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/>.
+
import sys
def write(arg):
Modified: trunk/misc/myserver-get/myserverGetLib/error.py
===================================================================
--- trunk/misc/myserver-get/myserverGetLib/error.py 2009-04-04 11:32:38 UTC
(rev 3049)
+++ trunk/misc/myserver-get/myserverGetLib/error.py 2009-04-07 16:41:47 UTC
(rev 3050)
@@ -1,3 +1,17 @@
+# MyServer
+# Copyright (C) 2009 The MyServer Team
+# 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/>.
class Error(Exception):
Modified: trunk/misc/myserver-get/myserverGetLib/general.py
===================================================================
--- trunk/misc/myserver-get/myserverGetLib/general.py 2009-04-04 11:32:38 UTC
(rev 3049)
+++ trunk/misc/myserver-get/myserverGetLib/general.py 2009-04-07 16:41:47 UTC
(rev 3050)
@@ -1,3 +1,18 @@
+# MyServer
+# Copyright (C) 2009 The MyServer Team
+# 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/>.
+
import xml.dom.minidom
import local
import config
@@ -2,3 +17,2 @@
import remote
-import remoteSvn
import remoteGenericUrl
Modified: trunk/misc/myserver-get/myserverGetLib/local.py
===================================================================
--- trunk/misc/myserver-get/myserverGetLib/local.py 2009-04-04 11:32:38 UTC
(rev 3049)
+++ trunk/misc/myserver-get/myserverGetLib/local.py 2009-04-07 16:41:47 UTC
(rev 3050)
@@ -1,3 +1,18 @@
+# MyServer
+# Copyright (C) 2009 The MyServer Team
+# 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/>.
+
import xml.dom.minidom
import error
import config
Modified: trunk/misc/myserver-get/myserverGetLib/remote.py
===================================================================
--- trunk/misc/myserver-get/myserverGetLib/remote.py 2009-04-04 11:32:38 UTC
(rev 3049)
+++ trunk/misc/myserver-get/myserverGetLib/remote.py 2009-04-07 16:41:47 UTC
(rev 3050)
@@ -1,3 +1,18 @@
+# MyServer
+# Copyright (C) 2009 The MyServer Team
+# 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/>.
+
import string
class Repository:
Modified: trunk/misc/myserver-get/myserverGetLib/remoteGenericUrl.py
===================================================================
--- trunk/misc/myserver-get/myserverGetLib/remoteGenericUrl.py 2009-04-04
11:32:38 UTC (rev 3049)
+++ trunk/misc/myserver-get/myserverGetLib/remoteGenericUrl.py 2009-04-07
16:41:47 UTC (rev 3050)
@@ -1,3 +1,18 @@
+# MyServer
+# Copyright (C) 2009 The MyServer Team
+# 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/>.
+
import local
import error
import xml.dom.minidom
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [myserver-commit] [3050] myserver-get: added xml config file and support, and license.,
Daniele Perrone <=