summaryrefslogtreecommitdiff
path: root/liveengine/bin/data/makeplaylist.py
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-09-14 19:24:39 +0100
committerTim Redfern <tim@eclectronics.org>2012-09-14 19:24:39 +0100
commit4fda3af17e55c0afff35b3f3ebbe5b4fd1ffad7e (patch)
treeca47926461a8c7176c3542ff7734ec74833abdba /liveengine/bin/data/makeplaylist.py
parent639dfe9190c06bba4dced32f282ad1fddc573b59 (diff)
working nicely multiscreen
Diffstat (limited to 'liveengine/bin/data/makeplaylist.py')
-rwxr-xr-xliveengine/bin/data/makeplaylist.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/liveengine/bin/data/makeplaylist.py b/liveengine/bin/data/makeplaylist.py
new file mode 100755
index 0000000..92ff865
--- /dev/null
+++ b/liveengine/bin/data/makeplaylist.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+
+from lxml import etree
+import sys,os
+
+if len(sys.argv)<2:
+ print "usage: makeplaylist source_directory"
+ sys.exit(0)
+
+sourcedir=sys.argv[1]
+
+page = etree.Element('playlist')
+doc = etree.ElementTree(page)
+
+dirList=sorted(os.listdir(sourcedir))
+note = 36
+while note<100:
+ for fname in dirList:
+ pageElement = etree.SubElement(page, 'svglayer',
+ note=str(note),
+ file=sourcedir+"/"+fname)
+ note +=1
+ if note>100:
+ break
+
+file= open(sourcedir+".xml", "w")
+doc.write(file, xml_declaration=True, encoding='utf-8',pretty_print=True)
+file.close() \ No newline at end of file