+2 votes
by (140 points)

I'm using twine 2.

I want to upload my file to itch.io.  To do that I need to:

  1. Publish my story and give it the name "index.html"
  2. Take my assets and copy it into the correct folder so that "index.html" can access it
  3. Zip everything up
  4. Upload it to itch.io

I plan to publish my story many, many times before it's finished and I am hoping there's a way to automate these steps, at least the first 1.  I was hoping I could put a bash script on my computer that would do steps 1-3 for me.  The only problem is I don't know how to do step 1 without opening up the Twine UI and clicking around.  Is there a way to run twine where it publishes my story and quits?  A command line like this:

twine.exe --publish --story_name=AcademyOfFetishes > index.html

I know how to automate steps 2-3 on my own and I accept that step 4 should be itch.io's responsibility.

Thanks!

2 Answers

+1 vote
by (2.5k points)

One option is to use Grunt as a task runner (this can help with assembling complex stylesheets, JavaScript, as well as copying files). grunt-entwine-quickstart can guide you through this process.

+1 vote
by (159k points)

As far as I known the Twine 2 GUI application does not currently support command line parameters, besides the standard ones supported by any nw.js (node-webkit) based application.

The Using external IDE? thread on the Twine Forums lists four CLI utilities that can be used to generate Twine  story HTML files.

...