pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r4096 - trunk/pingus/tools


From: grumbel at BerliOS
Subject: [Pingus-CVS] r4096 - trunk/pingus/tools
Date: Wed, 2 Dec 2009 22:16:57 +0100

Author: grumbel
Date: 2009-12-02 22:16:57 +0100 (Wed, 02 Dec 2009)
New Revision: 4096

Added:
   trunk/pingus/tools/pingus-0.6-to-0.7.sh
Modified:
   trunk/pingus/tools/xml2sexpr.rb
Log:
0.6 - 0.7 conversion script fix

Added: trunk/pingus/tools/pingus-0.6-to-0.7.sh
===================================================================
--- trunk/pingus/tools/pingus-0.6-to-0.7.sh     2009-12-01 02:50:45 UTC (rev 
4095)
+++ trunk/pingus/tools/pingus-0.6-to-0.7.sh     2009-12-02 21:16:57 UTC (rev 
4096)
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+xsltproc pingusv1tov2.xsl "$1" | ./xml2sexpr.rb
+
+# EOF #


Property changes on: trunk/pingus/tools/pingus-0.6-to-0.7.sh
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/pingus/tools/xml2sexpr.rb
===================================================================
--- trunk/pingus/tools/xml2sexpr.rb     2009-12-01 02:50:45 UTC (rev 4095)
+++ trunk/pingus/tools/xml2sexpr.rb     2009-12-02 21:16:57 UTC (rev 4096)
@@ -305,8 +305,13 @@
 end
 
 i = 0
-dir = File.dirname(ARGV[0])
-doc = REXML::Document.new(File.new(ARGV[0]))
+if ARGV.empty?
+  file = $stdin
+else
+  file = File.new(ARGV[0])
+end
+
+doc = REXML::Document.new(file)
 puts ";; generated by xml2sexpr.rb from file '#{ARGV[1]}'"
 doc.children.each{ |el|
   xml2array("", "", el)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]