Re: [Pingus-Devel] Convert XML levels to .pingus format
On Sat, Aug 13, 2016 at 7:15 PM, Ingo Ruhnke wrote: > Some of the resource names got cleaned up, there are is a program to > generate a sed script to fix that in the git history: I added that sed script to the repository now so that people don't have to dig through history: https://github.com/Pingus/pingus/blob/master/tools/pingus-old-resource-convert.sed ___ Pingus-Devel mailing list Pingus-Devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/pingus-devel
Re: [Pingus-Devel] Convert XML levels to .pingus format
On Thu, Aug 11, 2016 at 11:34 AM, Geoffrey De Belie wrote: > 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. Some of the resource names got cleaned up, there are is a program to generate a sed script to fix that in the git history: https://github.com/Pingus/pingus/commit/db0b9818a0281d58e887b3699666363c15d4d794 https://github.com/Pingus/pingus/commit/f7aee5aedd950e57afd82a2b737661d1c11adc02 > What's the difference between Pingus format level 2 and Pingus format level > 3? No idea, it got changed in this commit: https://github.com/Pingus/pingus/commit/96d76c676db4e2c9c9fe0aaf58d8dd2955118709 But it doesn't seem to contain any important changes. -- 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
Re: [Pingus-Devel] Convert XML levels to .pingus format
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 wrote > On Wed, Aug 10, 2016 at 6:55 PM, Geoffrey De Belie > 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
Re: [Pingus-Devel] Convert XML levels to .pingus format
On Wed, Aug 10, 2016 at 6:55 PM, Geoffrey De Belie 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
[Pingus-Devel] Convert XML levels to .pingus format
Hi, I wonder if there exists a tool to convert the (old) XML level format to the new pingus format? Kind regards, Geoffrey De Belie ___ Pingus-Devel mailing list Pingus-Devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/pingus-devel