Thanks a lot. I've managed to convert them all, but they need cleanup. I'm 
writing a script for that (see below).

For example, the converted pingus file contains entrances/entrances, 
exits/exits which Pingus does not have. Pingus only knows about exits/ and 
entrances/. Currently this is the script I have to convert the XML version 1 
files to XML version 2, then to Pingus file format. 

=================
#!/bin/bash

IFS=$'\n'

for f in ./*.xml
do
echo "$f"
filename=$(basename "$f")
filename="${filename%.*}"
xsltproc pingusv1tov2.xsl "$f" > "xml-converted/$filename.xml"
ruby xml2sexpr.rb "xml-converted/$filename.xml" "$filename.pingus" > 
"$filename.pingus"
done

#Replace a few odd occurences with valid ones so that Pingus recognises them
sed -i -- 's/entrances\/entrances/entrances/g' *.pingus
sed -i -- 's/liquids\/Liquid/liquids/g' *.pingus
sed -i -- 's/exits\/exits/exits/g' *.pingus
sed -i -- 's/textures\/textures/textures/g' *.pingus
=================

 What's the difference between Pingus format level 2 and Pingus format level 3?

Kind regards,
Geoffrey De Belie


---- On wo, 10 aug 2016 20:49:47 +0200 Ingo Ruhnke <grum...@gmail.com>wrote 
---- 

 > On Wed, Aug 10, 2016 at 6:55 PM, Geoffrey De Belie 
 > <computergeoff...@zoho.com> wrote: 
 > > I wonder if there exists a tool to convert the (old) XML level format to 
 > > the 
 > > new pingus format? 
 >  
 > There are two scripts that you need to use in succession. 
 >  
 > The first one updates the .xml from version 1 to version 2: 
 >  
 > https://github.com/Pingus/pingus/blob/master/tools/pingusv1tov2.xsl 
 >  
 > The second one then converts the .xml to the current .pingus format: 
 >  
 > https://github.com/Pingus/pingus/blob/master/tools/xml2sexpr.rb 
 >  
 > I haven't touched the scripts in quite some years, so not sure if they 
 > still work. If in doubt, send the levels to the mailing list and I'll 
 > see what I can do. 
 >  
 > --  
 > Blog:     http://grumbel.blogspot.com/ 
 > JabberID: xmpp:grum...@jabber.org 
 > ICQ:      59461927 
 > 


_______________________________________________
Pingus-Devel mailing list
Pingus-Devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pingus-devel

Reply via email to