[sysadmin-bin: 94/168] Make extract-doap-info save the DOAP file in GIT_DIR



commit 23205d073d6c7fff65ec5fb5d3481dead643e53c
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Fri Apr 24 18:07:11 2009 -0400

    Make extract-doap-info save the DOAP file in GIT_DIR
    
    Write the original DOAP file into $GIT_DIR/gnome_doap so we can
    use it later without extracting it from git.

 extract-doap-info |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/extract-doap-info b/extract-doap-info
index a97d238..9f21d71 100755
--- a/extract-doap-info
+++ b/extract-doap-info
@@ -1,5 +1,6 @@
 #!/usr/bin/python
 
+from cStringIO import StringIO
 import os
 import sys
 
@@ -27,8 +28,15 @@ groups = {
     (GNOME + 'productivity'): 'productivity'
     }
 
+rdf = sys.stdin.read()
 
-nodes = semi_rdf.read_rdf(sys.stdin)
+# We save the entire DOAP file into GIT_DIR for later use
+fd = open(os.path.join(git_dir, "gnome_doap"), 'w')
+fd.write(rdf)
+fd.close()
+
+# And then pre-parse out a couple of particular properties
+nodes = semi_rdf.read_rdf(StringIO(rdf))
 for node in nodes:
     if node.name != (DOAP, "Project"):
         continue



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]