Upcoming Games

No games to display

Full list
Add a game

Upcoming Events

No events to display

Convdata and the new format '.WTT' files

You are here: Home > Forum > General > General questions, comments, and issues > Convdata and the new format '.WTT' files

Page 1 of 1

Convdata and the new format '.WTT' files 04/02/2014 at 17:10 #55002
Lyn-Greenwood
Avatar
239 posts
Are there any plans to release a new version of Convdata which will understand the new-style '.WTT' files created by the Timetable Editor in the Loader sims?

I've noticed that these files are very much reduced in size and also incorporate what used to be in the '.WTR' files. Is there anywhere I can learn about the new structure of these files?

I tried to run Convdata on a '.WTT' file that was originally an old-style file but I'd modified it and then done a Timetable Save. Of course, Convdata didn't understand the file's contents so it returned a failure message, which puzzled me until I'd combed through the Forum and found references to the new-style '.WTT' files.

Cheers,

Lyn Greenwood

Log in to reply
Convdata and the new format '.WTT' files 04/02/2014 at 18:18 #55004
GeoffM
Avatar
6282 posts
Online
Well... there are two aspects to convdata as I see it:
1. Converting between SimSig binary format and a human-readable text format
2. Producing multiple trains from one schedule
(There are probably more features)

As for #1, this is eliminated by using XML format. If you rename the .WTT to .ZIP you can see two XML files. There are numerous tools on the Internet to read and edit these files which are basically text.

However, #2 isn't handled. But you can still write a timetable in convdata's format and import into SimSig - just not the other way around - and I don't see much need for the latter.

SimSig Boss
Log in to reply
The following user said thank you: Lyn-Greenwood
Convdata and the new format '.WTT' files 04/02/2014 at 18:38 #55005
Lyn-Greenwood
Avatar
239 posts
Geoff Mayo replied:

"Well... there are two aspects to convdata as I see it:
1. Converting between SimSig binary format and a human-readable text format
2. Producing multiple trains from one schedule
(There are probably more features)

As for #1, this is eliminated by using XML format. If you rename the .WTT to .ZIP you can see two XML files. There are numerous tools on the Internet to read and edit these files which are basically text.

However, #2 isn't handled. But you can still write a timetable in convdata's format and import into SimSig - just not the other way around - and I don't see much need for the latter."



Thanks for the explanation, Geoff. I'd read about the proposed XML format for WTT files but hadn't realised you'd implemented this and compressed the .WTT into a .ZIP file. I only want to convert Simsig binary to text, so I'll persevere from here but may come back for more info if I get stuck.

Thanks for the quick reply.

Cheers,

Lyn

Log in to reply
Convdata and the new format '.WTT' files 04/02/2014 at 21:20 #55013
clive
Avatar
2738 posts
" said:
Are there any plans to release a new version of Convdata which will understand the new-style '.WTT' files created by the Timetable Editor in the Loader sims?
It's in progress. However, events in my life over the last year have meant I've had very little time to do anything (not just SimSig - *anything*). But it is in progress.

Log in to reply
The following users said thank you: Lyn-Greenwood, AndyG, postal
Convdata and the new format '.WTT' files 20/04/2014 at 19:28 #59159
bill_gensheet
Avatar
1317 posts
" said:
Well... there are two aspects to convdata as I see it:
1. Converting between SimSig binary format and a human-readable text format
2. Producing multiple trains from one schedule
(There are probably more features)

As for #1, this is eliminated by using XML format. If you rename the .WTT to .ZIP you can see two XML files. There are numerous tools on the Internet to read and edit these files which are basically text.

However, #2 isn't handled. But you can still write a timetable in convdata's format and import into SimSig - just not the other way around - and I don't see much need for the latter.

I am finding the XML less than easily human readable (and I am human ). The following points are of course from my angle of creating historical timetables.

I find it useful to have the 'combined' timetable readable while editing one section of it, and for that easy human readability is key. The XML tags get in the way of that, even in a proper XML editor.
Some XML codes (eg <AccelBrakeIndex>1</AccelBrakeIndex>, <Activity>2</Activity> ) are less intuitive than BRK=METRO or DF:
XML times are in seconds from start, again tricky to decipher quickly.

There's a few reasons for WTT->txt conversion that I feel worth mentioning:

I provide a train list for each timetable, it is much harder to parse the XML than txt into spreadsheets / documents to produce these timetable summaries.

Bulk edits can be done using word processors on the txt file, helped by each timing point being one line. Much trickier in XML.

At some stages of timetable testing I run the sim with the full timetable and edit, in text, the partial timetables that make it up at the same time (for version control and not upsetting the running sim). This can be still be done in XML, but is often slower and more error prone for the reasons above.

Clive,
Understood, glad to test convdata v5 when available.

regards
Bill

Log in to reply
Convdata and the new format '.WTT' files 20/04/2014 at 20:25 #59160
postal
Avatar
5190 posts
It is also a time consuming task trying to clean a TT where you don't have Tester access to the sim and thus no Dev tab in the TT. Previously you could double-shuffle the TT through Convdata and take out the "extra information" in one process. I may have missed a trick, but I now have to open the XML in my text editor and then find and delete each line containing <delay> which does take a bit longer and is always prone to human error.
“In life, there is always someone out there, who won’t like you, for whatever reason, don’t let the insecurities in their lives affect yours.” – Rashida Rowe
Log in to reply
Convdata and the new format '.WTT' files 21/04/2014 at 18:06 #59232
GeoffM
Avatar
6282 posts
Online
XML can be a bit verbose on the eye but for machines it is certainly easier to work with than plain text files. Yes, the convdata format is formalised to an extent but the numbers of parser that can read that type of file is extremely limited (and mostly proprietary). At least in XML format it opens it up to anybody with an XML editor or access to tools - which is pretty much everybody nowadays. So it's more a case of finding a tool to do what you want than the format not being helpful.
SimSig Boss
Log in to reply
Convdata and the new format '.WTT' files 21/04/2014 at 18:12 #59233
postal
Avatar
5190 posts
Perhaps it would be helpful if anyone who has found a suitable tool could post here so that we can all share. I use Notepad++, but only because it is the only thing I have found that works effectively on my XP system. I can also open the XML files using Excel 2010 if I port them across to another machine in the house but haven't tried transferring back from Excel to XML and ultimately WTT so any better advice would be more than welcome.
“In life, there is always someone out there, who won’t like you, for whatever reason, don’t let the insecurities in their lives affect yours.” – Rashida Rowe
Log in to reply
Convdata and the new format '.WTT' files 21/04/2014 at 18:39 #59240
GeoffM
Avatar
6282 posts
Online
I use Visual Studio 2013 which - at the time of posting - thought wouldn't be much use to most people as it's commercial software and not cheap so I didn't mention it. However, there is an Express version which is free. Whether that would work on XP I don't know.
SimSig Boss
Log in to reply
Convdata and the new format '.WTT' files 21/04/2014 at 19:51 #59251
bill_gensheet
Avatar
1317 posts
I have a freebie called 'XML Copy Editor', but it is little more than fancified notepad.

I use PFE32 on txt files, again it is 'notepad' with find/replace and drag functions, plus line numbering.

Both OK on XP

Bill

Log in to reply
Convdata and the new format '.WTT' files 21/04/2014 at 21:11 #59257
Sacro
Avatar
1171 posts
Notepad++ can do a fair amount of XML file editing. If you want to write code then Visual Studio Express isn't a bad IDE. 2012/2013 aren't supported on XP (but then, XP isn't supported either these days), you need 7 or 8, or VS Express 2010.
Last edited: 21/04/2014 at 21:14 by Sacro
Log in to reply
Convdata and the new format '.WTT' files 22/04/2014 at 01:19 #59268
Muzer
Avatar
718 posts
As far as formats that are easily readable by humans and computers go, I would probably go for YAML and JSON as being among the best, though they can both be slightly strange if you're not used to it. INI-style files are a reasonable choice for "flat" data, I haven't actually looked at these timetables but I'm not convinced it would be suitable. XML tends to be quite difficult for humans to parse unless indented very cleanly, and isn't really the easiest thing to write a parser for on a computer either (though this isn't really a problem in SimSig since it's hardly speed-critical, and the parsers have already been written).

Of course, I highly doubt another format change to be on the cards without a good reason, so we're probably stuck with the XML now. I'm sure someone could make a nice editor for it, though

Last edited: 22/04/2014 at 01:20 by Muzer
Log in to reply
Convdata and the new format '.WTT' files 22/04/2014 at 04:05 #59273
Hawk777
Avatar
386 posts
Given a schema, it shouldn’t be too hard to convert any one of these structured formats into any of the other ones—certainly XML has both attributes and text content while JSON has only keys and values, but for a specific schema (like SimSig timetables) the conversion would be pretty straightforward, if you really prefer one over the other for human editing.

There is a tool called XMLStarlet which I have used occasionally for non-SimSig purposes. It’s not an XML editor for general interactive use; it’s a command-line tool for performing bulk edits. It could almost certainly handle the job that was described earlier in this thread of deleting all the delays. I use it rarely enough that I forgot all the syntax from one visit to the next, but if you have specific canned recipes you want to apply to a file, it might be an option.

Log in to reply
Convdata and the new format '.WTT' files 22/04/2014 at 07:21 #59274
Forest Pines
Avatar
525 posts
" said:
As far as formats that are easily readable by humans and computers go, I would probably go for YAML and JSON as being among the best ... XML tends to be quite difficult for humans to parse unless indented very cleanly, and isn't really the easiest thing to write a parser for on a computer either
Badly-formatted XML is certainly easier to read than badly-formatted JSON largely because you know what each closing tag is closing.

As someone who uses both regularly: XML always feels like a properly-engineered language, whereas JSON feels like a quick and dirty hack. Moreover there are tools for formatting either, and for parsing or outputting either, so you can do more or less what you wish.

Log in to reply
Convdata and the new format '.WTT' files 22/04/2014 at 15:15 #59308
GeoffM
Avatar
6282 posts
Online
Obviously we're not going to change the format because one person prefers YAML or whatever the flavour of the month is! XML is well defined and well supported. Almost the same argument could be made for JSON. Not so much the various other formats. On a side note, people often say YAML is easy to read: that I can't argue with. What they don't say is that it's very hard to write because of the near-perfect indenting required.
SimSig Boss
Log in to reply