I have had a vague idea about making a quick tool to convert from Twine to Choicescript to help streamline the initial development stage. I finally had a look yesterday and cobbled together this in a few hours.
To be clear this will not convert ANY twine game into full functioning choicescript game.
The idea behind this is to be able to draw a quick mindmap/layout with the major choices for a chapter and then convert it into a skeleton structure in choicescript ready to begin with the actual fiction writing and nuances.
Here is a brief video showing an example.
Demo of Twine mindmap to Choicescript - YouTube
The standalone exe can be downloaded here:
You will see a windows alert because it’s a new and unsigned program. For those reluctant to run an random exe from the interwebs (good for you) you can also download the sourcecode below and then run in any python ide to test (I use pycharm - it’s free).
At this point it’s a quick and dirty tool but if it proves useful then I can look at signing it to help avoid the alert.
A couple of things to consider when building your twine template.
Description line must have a colon immediately after it to be recognised.
The choice text goes before the [[ ]]
The link inside the [[ ]] is going to be the label name that it jumps to and as such cannot contain spaces.
Currently the code sorts the scenes into an order based on their vertical position in the twine diagram (before it seemed to output in a random order which made the choicescript code, whilst valid, completely chaotic to read). The scenes at the end of a branch (i.e with no  links) will therefore not have a *goto statement and therefore will continue on to the next one. The solution is simply to add *finish to these few sections - it’s on my todo list to automate this but I ran out of steam around 11pm last night.
Any questions/bugs please let me know. I have a tech background but I do not code regularly, this was made with AI assistance to speed up the process where possible, then I just had to hunt the bugs (regex was broken )