Showing posts with label XML. Show all posts
Showing posts with label XML. Show all posts

Sunday, March 9, 2014

STATE as a Writing Tool for "Felix"

I continued to use the STATE animation program to help me rewrite "Felix" this week. I finished a couple of scenes.

I made a few changes to the scene I started on last week. In it the two astronauts explore "the target area". Then I extracted the dialogue from the STATE file. STATE stores the dialogue and other information in an XML file. All I needed to do was open it up and do a little reformatting.

I transferred the dialogue to Word, and then I used that as a basis to write the version for the story. I did make some minor changes to the dialogue, but most of the work was to add in descriptions of the location and the action.

I felt that it went quite smoothly. I feel that the text flows quite well.

I went on to do another scene. In it the astronauts explore a cave next to "the target area". For some reason this didn't seem to work as well. I'm not sure why. Maybe I tried to go too fast. I went through the same process to convert the dialogue into text for the story. Nevertheless, I felt that the process did help and the result was better than if I had just worked with the text and not the animation.


Next week looks like I'll be busy with other things, so I won't likely get much done on "Felix".

This post is a mirror from my main blog http://www.dynamiclethargyfilms.ca/blog

Sunday, June 16, 2013

“The Barrier” Progress and File Conversion

Progress

I did four new scenes for “The Barrier” this week. That added about a minute and a half, which brings me up to just under 62 minutes in total. I expect the total will end up a bit over 100 minutes, although it will end up a bit shorted after I’ve cut it all together.

The scenes I did were fairly simple. Each had just two characters, and the characters didn’t move around much. For the most part, the scenes come directly from the stories, which made them easier to do. Two of them were scenes where Arthur’s boss chews him out for something he did.

I started on a fifth scene, but didn’t get far with it.

File Conversion

I wanted to convert the Xtranormal state files into Celtx files so I would have a script of the movie. I experimented a bit and came up with a way to do the conversion. The method is a bit clunky, but works well enough. The method doesn’t convert the actions in the film. I can add that, but I’m not sure that it is worth the effort, since I would need to edit them extensively.

The Xtranormal state files are zipped files that contain several files. One of these, document.xml, is an XML file that contains the dialogue and actions. The process uses two batch files to extract this file, builds up a larger file with all of the scenes, and then uses an XSL file to convert the XML file into HTML. Finally, I use copy and paste to put the dialogue into Celtx. I’ve listed the batch files and XSL file below.

I had to over come a few snags. I had to add the lines “<wholescript>” at the top of the file and “</wholescript>” at the bottom of the file, otherwise the XSL wouldn’t work. When I combined the files, a “” was added after each new file. I don’t know why that happened. I have to edit the combined file and delete all of the “” or the XSL won’t work.

My programming skills are somewhat limited and I’m sure that a more skilled person could improve this method. If anyone does come up with a better version, please let me know.

barrier_cnv_main.bat
erase t1.xml
erase t1.zip
erase script.xml
copy top.xml script.xml
call cnv_sub.bat Scene01.state
call cnv_sub.bat Scene02.state
copy script.xml+bottom.xml

cnv_sub.bat
copy %1 t1.zip
"c:\program files\winzip\wzunzip" t1.zip document.xml
copy script.xml+document.xml
erase document.xml
erase t1.zip

top.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="convert.xsl"?>
<wholemovie>

bottom.xml
</wholemovie>

convert.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

   <xsl:template match="scene">
<html>
<head>
<title>
   <xsl:value-of select="@title"/>
</title>
<style>
p.sceneheading { font-family: "courier"; test- transform: "uppercase"}
p.character { font-family: "courier"; test-transform: "uppercase"; text-indent:250}
p.dialog { font-family: "courier"; text-indent:150}
</style>
</head>
<body>
<p class="sceneheading">
   <xsl:value-of select="@title"/>
</p>
   <xsl:apply-templates/>
</body>
</html>
   </xsl:template>     

   <xsl:template match="line">
<p class="character">
   <xsl:value-of select="@speaker"/>
</p>
   <xsl:apply-templates/>
   </xsl:template>

   <xsl:template match="text">
<p class="dialog">
   <xsl:apply-templates/>
</p>
   </xsl:template>

   <xsl:template match="listener">
   </xsl:template>

   <xsl:template match="stance">
   </xsl:template>

   </xsl:stylesheet>



This post is a mirror from my main blog http://www.dynamiclethargyfilms.ca/blog