tws file format

254 views
Skip to first unread message

Keith Weatherby II

unread,
Oct 31, 2013, 12:31:38 AM10/31/13
to twee...@googlegroups.com
Firstly am I allowed to read and use .tws files into my programs (assuming it's free, maybe this is alright as well?)  Also is there a document anywhere explaining the tws format?

I'm thinking maybe I could use twine to generate files for my framework, so I don't have to A) write my own tool, or B) generate scene files by hand (which is what I'm doing now).

It just occurred to me, that I could store anything I wanted into a passage, including commands for my framework.  (In the future I plan to have some sort of scripting for my framework).

So those are the questions, allowed to use tws file unconditionally and is there anything that describes the file format?

Scott Beeh

unread,
Oct 31, 2013, 1:47:43 AM10/31/13
to twee...@googlegroups.com
there are three file formats that Twine recognizes, .twee / .tws / .txt (this one is used only for importing into Twine)
tws is the GUI overlay for the command line that twee uses.

Here are some references sites that I have bookmarked.

You might find what you're looking for on one of these sites. 

Keith Weatherby II

unread,
Nov 2, 2013, 4:25:13 PM11/2/13
to twee...@googlegroups.com
Doesn't really help me much, but thanks any way.

sylvain charzat

unread,
Nov 2, 2013, 6:03:20 PM11/2/13
to twee...@googlegroups.com
If I'm not mistaken (it's been some time since I poked around Twine's source code) .tws files are python objects serialized using the standard python serialization protocol (pickle). The pickle format is described here: http://www.python.org/dev/peps/pep-0307/ and the python module that does the serializing/unserializing is described here: http://docs.python.org/2/library/pickle.html

You'll need to look at twine's source code to figure out exactly what gets serialized (most likely text box coordinates and content and some metadata), looking at a tws file might help too (it's plain text).

As to whether or not you're allowed to do so, I don't see why not.

Good luck!


2013/11/2 Keith Weatherby II <uhf...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Tweecode / Twine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tweecode+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages