IF Archive Unbox service

We’ve just set up a new facility on the IF Archive.

Take a look at https://ifarchive.org/indexes/if-archive/games/twine/. Notice the “View contents” link on every entry. Give one a try. Hit the “Open…” button at the top (or just select “index.html”, or whatever the filename is).

Yep – you’re playing the game, right out of its zip file.

This applies to every zip and tar file on the Archive, whether they’re games or not. For example, in https://ifarchive.org/indexes/if-archive/infocom/articles/, you can look at the contents of articles.zip and read the text articles. You can look at the source files in inform636_source.zip. And so on.

What does this mean? A few things.

First, the IF Archive is now a much better place to host Twine games and other web-playable IF. Uploads will be publicly playable as well as publicly downloadable.

(This is not meant to undermine Borogove.io, which is also a place to host web-playable IF! It’s okay to have several services with different focuses.)

Second, IFDB now makes use of this service to make zipped-up Z-code, Glulx, and TADS games playable too! The iplayif.com service has never handled those, so games like Coke Is It! (coke.zip) and Worlds Apart (worlds.zip) did not have a “Play On-line” button on IFDB. Now, with appropriate URL magic, they do.

Further details:

If you want to link to a game, you can link to the index.html or other playable URL. This URL will look like, for example, https://0udonbkuf9.unbox.ifarchive.org/0udonbkuf9/Nouns.html. Not pretty, but it should remain permanently accessible. (As long as the file stays in the same place on the Archive. The "0udonbkuf9" part is hashed from the path. If you upload a new version with the same filename, the linkable URL will stay the same. If you change the filename, you’ll get a new link.)

The Unboxer only works with files on the IF Archive. It’s not a universal zip-extractor for the whole internet. (That would be an abuse magnet.)

You can go to the Unbox front page and enter an Archive URL directly. Only files with zip, tar.gz, tgz, and tar.Z extensions are accepted.

The source code and full documentation for Unbox are available on Github.

Thanks to @Dannii for implementing this project, and @dfabulich for the IFDB integration. (And for realizing that IFDB could integrate iplayif.com and Unbox in the first place!)

24 Likes

I guess I should note that this thing is still in beta! We’ve tested it, but it hasn’t been kicked around the block. That starts today… Please report any problems you find.

6 Likes

It’s seems there’s a problem with encoding when opening html with lang attribute (in fact, I don’t know, just a guess).

<html lang="ru">

The file opens correctly after unzipping on the PC.

2 Likes

Ah, I can see the problem. My regex isn’t handling the closing / in the meta charset tag. Oops! Nothing to do with the lang attribute, which doesn’t actually have anything to do with encodings.

Edit: fixed!

3 Likes

Thanks!

It’s seems there’s another problem with encoding. Here is utf-8 encoded document with cyrillic text in it that isn’t displaying properly.

That’s not the Unboxing service. I’m not sure the main archive server really tries to detect encodings. Does it still run correctly after downloading?

Yeah, I know, but I thought it may be some webserver issue. I opened the file on my PC and mobile and all chars displayed correctly.

It doesn’t try at all. For text files, it sends the file without encoding headers and lets the web browser try to guess.

This isn’t great but it’s an old system.

2 Likes

Got a user question about a new file:

In Index: if-archive/games/adrift , AFDFR.zip was added last week, but the “view contents” link does not work.

NotFoundError: Unknown file: /if-archive/games/adrift/AFDFR.zip

Is this a bug or just waiting for some cache to catch up?

1 Like

Probably just the cache. It caches things by default for 7 days. If someone tried to view it in the Unboxer in the short 6 hour window after it was added to the archive but before the Unboxer refreshed its index then it would be stuck looking like an error for a week.

Probably would be better to cache error pages for only 1 day. It wouldn’t be hard to make that change.

2 Likes

That makes sense to me.

1 Like

Working now, so probably was just the cache: AFDFR.zip - IF Archive Unboxing Service

1 Like