Tmx file support

Does codea 2.0 have support for tmx files. Thanks

What is a tmx file?

I don’t get what you mean by “supporting” a type of file. Any file type can be opened with file IO.

@SkyTheCoder:

http://en.wikipedia.org/wiki/Translation_Memory_eXchange

So, if I created something in itilemaps, I could get it to work using file io?

@kirorp I didn’t know what TMX was, so I googled it. It looks like there’s different file formats that make up the files. You can read any file with Codea’s file io, but you’ll have to break down each file you read into the different formats based on what’s in the headers. I would say Codea doesn’t do anything for you other than reading the files.

@SkyTheCoder, @dave1707. So, theoretically itilemaps ( https://itunes.apple.com/gb/app/itilemaps/id432784227?mt=8 ) should work with codea. Well, file io

@kirorp Here is a very simple example of a TMX file. This is what you will see if you read the file with Codea’s file io, except it won’t look formatted like this but just one long string. You’ll have to write code to break down every tag into the information you want. I’m not even sure if this comes close to all the different types of tags you’ll see. I’m an experienced programmer and I wouldn’t even try to do this with Codea. Of course I have no need for a TMX file, so maybe that also has some influence on whether I would want to try it or not.

EDIT: See this link for the TMX file format.

http://www.ttt.org/oscarstandards/tmx/tmx13.htm

Sample file


<?xml version="1.0" ?>
<!DOCTYPE tmx SYSTEM "tmx13.dtd">
<!-- Example of TMX document -->
<tmx version="1.3">
   <header
      creationtool="XYZTool"
      creationtoolversion="1.01-023"
      datatype="PlainText"
      segtype="sentence"
      adminlang="en-us"
      srclang="EN"
      o-tmf="ABCTransMem"
      creationdate="19970101T163812Z"
      creationid="ThomasJ"
      changedate="19970314T023401Z"
      changeid="Amity"
      o-encoding="iso-8859-1"
   >
      <note>This is a note at document level.</note>
      <prop type="RTFPreamble">{\\rtf1\\ansi\\tag etc...{\\fonttbl}</prop>
      <ude name="MacRoman" base="Macintosh">
         <map unicode="#xF8FF" code="#xF0" ent="Apple_logo" subst="[Apple]"/>
      </ude>
   </header>

   <body>
      <tu
         tuid="0001"
         datatype="Text"
         usagecount="2"
         lastusagedate="19970314T023401Z"
      >
         <note>Text of a note at the TU level.</note>
         <prop type="x-Domain">Computing</prop>
         <prop type="x-Project">P&#x00E6;gasus</prop>
         <tuv
            xml:lang="EN"
            creationdate="19970212T153400Z"
            creationid="BobW"
         >
            <seg>data (with a non-standard character: &#xF8FF;).</seg>
         </tuv>
         <tuv
            xml:lang="FR-CA"
            creationdate="19970309T021145Z"
            creationid="BobW"
            changedate="19970314T023401Z"
            changeid="ManonD"
         >
            <prop type="Origin">MT</prop>
            <seg>donn&#xE9;es (avec un caract&#x00E8;re non standard: &#xF8FF;).</seg>
         </tuv>
      </tu>
      <tu tuid="0002" srclang="*all*">
         <prop type="Domain">Cooking</prop>
         <tuv xml:lang="EN">
            <seg>menu</seg>
         </tuv>
         <tuv xml:lang="FR-CA">
            <seg>menu</seg>
         </tuv>
         <tuv xml:lang="FR-FR">
            <seg>menu</seg>
         </tuv>
      </tu>
   </body>

</tmx>