[Pkg-voip-commits] r6412 - in /freepbx-core/trunk: ./ debian/ module-location.py
odd_bloke-guest at alioth.debian.org
odd_bloke-guest at alioth.debian.org
Wed Nov 12 14:19:48 UTC 2008
Author: odd_bloke-guest
Date: Wed Nov 12 14:19:47 2008
New Revision: 6412
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=6412
Log:
Added script to return the location of a module, given a modules-m.n.xml and a module rawname.
Added:
freepbx-core/trunk/debian/
freepbx-core/trunk/module-location.py (with props)
Modified:
freepbx-core/trunk/ (props changed)
Propchange: freepbx-core/trunk/
------------------------------------------------------------------------------
--- bzr:file-ids (added)
+++ bzr:file-ids Wed Nov 12 14:19:47 2008
@@ -1,0 +1,2 @@
+debian debian-20081112105513-qj32w1ff226fxu87-1
+module-location.py modulelocation.py-20081112122401-ya4ynm0l0zf31cfk-1
Propchange: freepbx-core/trunk/
------------------------------------------------------------------------------
--- bzr:revision-id:v3-trunk1 (added)
+++ bzr:revision-id:v3-trunk1 Wed Nov 12 14:19:47 2008
@@ -1,0 +1,1 @@
+2 daniel at daniel-watkins.co.uk-20081112122419-zyl0378e811hikua
Propchange: freepbx-core/trunk/
------------------------------------------------------------------------------
--- bzr:revision-info (added)
+++ bzr:revision-info Wed Nov 12 14:19:47 2008
@@ -1,0 +1,4 @@
+timestamp: 2008-11-12 12:24:19.493000031 +0000
+committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
+properties:
+ branch-nick: freepbx-core
Propchange: freepbx-core/trunk/
------------------------------------------------------------------------------
bzr:text-parents =
Added: freepbx-core/trunk/module-location.py
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx-core/trunk/module-location.py?rev=6412&op=file
==============================================================================
--- freepbx-core/trunk/module-location.py (added)
+++ freepbx-core/trunk/module-location.py Wed Nov 12 14:19:47 2008
@@ -1,0 +1,20 @@
+#!/usr/bin/python
+
+"""
+A script that takes a freepbx modules-m.n.xml file and a module, and returns the
+location of that module's tarball.
+"""
+
+import sys
+
+from BeautifulSoup import BeautifulStoneSoup
+
+
+if __name__ == "__main__":
+ soup = BeautifulStoneSoup(file(sys.argv[1]))
+ module_name = sys.argv[2]
+
+ for location in soup.findAll('location'):
+ if module_name in location.string:
+ print location.string
+ break
Propchange: freepbx-core/trunk/module-location.py
------------------------------------------------------------------------------
svn:executable = *
More information about the Pkg-voip-commits
mailing list