Clone wiki

ifoman / Home

Welcome

Welcome to ifoman. ifoman is another tool to manage Interactive Fiction adventures. This tool will list projects, helps to build them and run them too.

I chose Python because I wanted to learn it and because I wanted to run the application on a RaspBerry Pi.

Status

The software it is on an early stage. I am learning Python in my free time, and I use that new knowledge to build this software.

How to start

Demo version

To start a demo version with embedded data you should run:

nohup python app.py 4040 &

There are two available users (user / password ): The admin user: admin / admin A normal user: user / user

The normal user contains two adventures: Infeccion. This adventure requires the Spanish Language extension. Infection. The same adventure as Infeccion, without the requirement of the Spanish Language extension.

Production version

If you are a brave people, and you like to inspect the code and to do all the work with your own hands, you can start the application with:

IFOMAN_HOME=$HOME/ifoman nohup python app.py 4040 &

The IFOMAN_HOME environment variable is used as the storage path in production environment. For the moment this is all. I need to write code for managing users, documentation about how to manage projects and details about path structure.

Requirements

Software

  • Python 2.7
  • web.py 0.3
  • futures 3.2.0
  • pyyaml
  • I7_6M62_Linux_all.tar.gz
  • Parchment, more precise, the Inform7 build, available from here. Please, unzip it at the following paths before build the adventure:
    • demo/projects/user/Infeccion/project/Infeccion.materials/Templates/Parchment .
    • static/parchment
sudo pip install futures pyyaml webpy

Patch web.py

web.py has a bug that must be fixed before running this sofwtare, or you will find problems related with concurrency. You need to patch the session.py. To find where web.py is installed:

sudo pip list -v | grep web\.py

You must replace the setItem method with the following code (extracted from https://github.com/webpy/webpy/issues/191):

def __setitem__(self, key, value):
     path = self._get_path(key)
     pickled = self.encode(value)
     try:
         f, tname = tempfile.mkstemp(dir=os.path.dirname(path))
         try:
             os.write(f, pickled)
         finally:
             os.close(f)
             os.rename(tname, path) # atomary operation
             # os.chmod(path, MODE) # one may want it too as mkstemp() creates it 0600...
     except IOError:
         pass

Updated