aboutsummaryrefslogtreecommitdiff
path: root/tools/host_tools/FormatConverter/lamedb2satxml.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2009-06-11 12:46:49 +0200
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2009-06-11 12:46:49 +0200
commit510fe63aa7bf232fcca7f2a3d0fdab2c45307b78 (patch)
tree1d1fabf5758a4db48982d7dafd37d9d0c51bce2d /tools/host_tools/FormatConverter/lamedb2satxml.py
parent30562d78ee2be5fe628a88cce45f7671ff0644bb (diff)
downloadenigma2-510fe63aa7bf232fcca7f2a3d0fdab2c45307b78.tar.gz
enigma2-510fe63aa7bf232fcca7f2a3d0fdab2c45307b78.zip
add a format converter, i.e. to convert from lamedb to sat.xml files
the main destination format of this converter is a sat.xml file easily extendable with further datasources
Diffstat (limited to 'tools/host_tools/FormatConverter/lamedb2satxml.py')
-rwxr-xr-xtools/host_tools/FormatConverter/lamedb2satxml.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/host_tools/FormatConverter/lamedb2satxml.py b/tools/host_tools/FormatConverter/lamedb2satxml.py
new file mode 100755
index 00000000..d6adc1f3
--- /dev/null
+++ b/tools/host_tools/FormatConverter/lamedb2satxml.py
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+from datasource import genericdatasource
+from satxml import satxml
+from lamedb import lamedb
+
+import sys
+
+if len(sys.argv) != 3:
+ print "usage: %s <lamedb> <satellites.xml>" % sys.argv[0]
+ sys.exit()
+
+gen = genericdatasource()
+db = lamedb(sys.argv[1])
+xml = satxml(sys.argv[2])
+
+db.read()
+gen.source = db
+gen.destination = xml
+gen.docopymerge(action = "copy")
+xml.write()
+