Ifsitegen.py

I7’s Quixe is out of date too, but I don’t want to hard-code URLs in the script.

I suppose the argument could accept URLs and download them to the library directory. It’s a bit more work than I want to put in, though.

How about I just add the current links to the documentation and recommend downloading the latest version. Hopefully, it won’t be too long before I7 is updated anyhow.

3 Likes

16 posts were split to a new topic: Broken Parchment for Inform 7 template

This is amazing.

I don’t know too much about how Inform templates work (the Templates folders don’t seem to actually have any HTML files in them, just a manifest file with some HTML in variables?), but would it be possible to have a command line argument that removes the sidebar like in this post?

There are two kinds of templates: web site and interpreter. In the Inform app’s Templates directory, Classic and Standard are web site templates: these contain HTML and CSS. Parchment, Quixe, and Vorple are interpreter templates; they contain JS and CSS, plus (as you note) some HTML snippets in (manifest).txt.

If you want a different layout, you should make a new web site template. I did this (as a sample) here: https://eblong.com/zarf/glulx/quixe/OneColumn.zip .

2 Likes

Side note: a member from the Puny Discord server created this GitHub - joshwarecom/edgecase-parchment. While I was not able to make @zarf’s IFsitegen generate a working game bundle, Edgecase Parchment did work for me. Still no idea if Parchment is the problem here but at least three individuals face the same issue currently. Fingers crossed for a fix, because IFsitegen is definitely way more flexible, as everything can be controlled with command line parameters. Yes, that transcript feature is posh. EDIT: Parchment has been fixed, ifsitegen works like a charm.

1 Like

Some comments:

  • Could the “Unable to locate template” error messages specify if it’s searching for the web or the interpreter template?
  • The default install location for gnome-inform7 (off the Inform7 site) in Debian/Ubuntu is /usr/share/gnome-inform7/, so it would be good if that was supported.

(I split off the comments about the broken Parchment template to Problems with the Parchment for Inform 7 template. The bug has now been fixed.)

Yep, will look at those. Thanks.

EDIT-ADD: Done.

1 Like

Thanks! I still think the relationship between “website” and “interpreter” is pretty confusing in Inform though, haha. Releasing with a website just creates the information index page, while releasing with an interpreter also releases with a website, and both the index and the play pages use the website template.

So to use a non-default layout for the play page in Inform, you actually have to write Release with a "OneColumn" website and an interpreter (and then delete the index page and rename play.html to index.html to achieve what this script does). Is that about right?

I am not experienced in Windows programming so it took me some time to figure out what to change in ifsitegen.py to make it work on a 64-bit Windows 10 machine.

I simply had to change part of the path in line 180 from:

/Program Files/
To:
/Program Files (x86)/

One question: As Parchment also can handle Hugo, TADS and Adrift 4 games, would it be simple to make ifsitegen.py handle such files too?

1 Like

Unfortunately no, because the templates only include interpreters for Z-code and Glulx. And because the other interpreters use WASM it would also be harder to make them run from local file: urls. Not impossible, but not simple.

2 Likes

Ok, thanks :slight_smile:

Had a go with this for the first time today. I can get it to work with the basic python ifsitegen.py mygame.z5 but if I add any of the options for author name, title, etc., it won’t produce any output. Anyone have any tips?

2 Likes

I presume you’re doing this in order to get a game running in Parchment. If so, this thread is very useful. You can skim the whole thread, but most of the best stuff is in the solution by @StJohnLimbo.

Using Parchment is a dark art. I struggled with it for weeks and wasn’t able to get my page looking quite how I wanted it. If you need any further help, do a search for Parchment or send me a PM and I’ll help you get started. I have to get back into this myself anyway in the next day or two.

3 Likes

I tried the solution in that thread but ended up with a game page stuck on ‘loading’. I’ll give it another go today to see if I did something wrong, but if I can’t get it to work I’ll message you. Thanks!

Assuming Windows is your operating system, try the following:

  1. Update Parchment that came with Inform 7 to the latest version. You can do so by downloading the current package from here Parchment for Inform 7.

  2. For the Puny BuildTools I created a simple Windows Powershell script that automates building a game using Ifsitegen.py. It also cleans up the the old version before it builds new. You probably need to apply other directories but in general, this should hopefully work for you. Just place this script in every project you’d like, alter it one time and you’re good to go. Puddle-BuildTools/modern.ps1 at master · ByteProject/Puddle-BuildTools · GitHub

PS: Python and Powershell needs to be installed on your Windows PC of course. I think Powershell is installed by default now and Python you get from the Windows App Store. I am using Python 3.9 on my machine.

2 Likes

I’ll have a look at that. Thanks!

1 Like

Just curious, where would you like to play your game online? I am asking because, depending on what you are trying to do, you may not even need a Python script.

If you want to have a standalone Parchment page on your own web site or somewhere like itch.io, then you need to go through the scripting process to convert your z-code game to base64 (with a little bit of Javascript).

Similarly, if you want to customise the look of your page with a custom layout, colours or what have you, then you can only do this by customising the html and css files.

1 Like

Regarding itch.io, just to understand, what is the drawback of doing something like this:
Adrift 4 demo using Parchment on itch.io by kenped

I mean, you use itch.io for customizing the webpage around the Parchment window, whereas inside the Parchment window you have Parchment running which you can’t customize.

I am only aware of one drawback which may be important to some, and that is you must have put your z5-file somewhere else online than itch.io.

There’s nothing wrong with that if you’re happy with the boring black on white text provided by iplayif and you have somewhere to host your story file.

Take a look at one of mine for a different approach:

The theme matches the theme of the game page and everything is hosted in the one place, whereas your method requires three different web sites.

1 Like