possibly (hopefully) dynamic compiling and parchment

I’ve written a python script that procedurally generates story text written for inform7. Now, I could easily paste the output of the script into Inform7 on my mac, and publish that, but I think it would be much more interesting to create a website that had a different inform game every time you reloaded the page. (Which was the original intent of my project.)

I can imagine using the command-line version of inform to dynamically compile the script’s output, but I’d rather not go down that rabbit hole unless it’s absolutely the only way.

Anyone know if this is possible in some easier way that I’m missing?

Here is my project, btw: github.com/mgrider/inform-gen

You can see a couple of examples of the generated game in the output directory. (The later ones are more interesting, but it’s all fairly simple still.)

I’m not sure what you’re asking. You want to automate compiling the output of your script, but you don’t want to use the command-line compiler?

Do you need the IDE to be running?

I think most of the problem is that I don’t know what’s possible. The crux of my ignorance (possibly my real question) is: is it possible to go from the story text to a playable version of the game without installing and running anything on a webserver?

Basically, I’ve had websites before where I went the route of installing a large dependency (in this case it would be the command-line i7 program), and then it broke every year or two when my webhost upgraded something.

I suppose another option (and having thought of it I’m now leaning toward this), is to install i7 on my local machine, script the story output and compilation, and end up with some (large) number of different games that I then upload independently. (Maybe I could just generate 360 of them and automate swapping them out every day for a year.)

Unfortunately it’s not possible to compile I7 without the (relatively heavy and slow) compiler. Putting it on the webserver is probably your best option. While you could in theory convert the compiler to JavaScript, this would be very difficult without the source code (which has never been released) and would also take ages to run.

Good to know, thanks.

// it broke every year or two when my webhost upgraded something.

Consider running your own server? That way, you control the updates.

fos1