niemueller.de::home niemueller.de
Open Software. Open Knowledge.




 
Last modified August 23 2009 17:40:10
Mensa Framework - Frontends
Mensa Framework - Frontends
Frontends for the Mensa Framework
Introduction
This will describe how to get the clients working.
What you need
I assume that you already have you backend in place and we can work on the mensa.pre file.
For the WAP page you need a way to execute CGI scripts written in Perl. The UniMensa PDB generator has been tested on Linux. There is a binary in the package that may work. The source code is also provided (yes, I know it's in a bad shape but it works...) so that you can compile it on other systems. I have only tested it with GCC (think about the 2-Byte alignment on Palm devices!). For jMensa you need a zip tool.
Mensa WAP
The source code is available on request. Right now it is a CGI but I have plans to convert it to PHP since most users have PHP but only a few CGIs. You just need to make sure that it finds the mensa.pre file.
UniMensa
You can get the developer kit at the bottom of the UniMensa page. It contains a binary and the source code. See the README in the archive for information on how to build the creator. All you need to do then is to run "genUMENpdb". This will create a file called "unimensa.pdb" which contains the database for UniMensa. Rename it to an appropriate name like "university.pdb" and make it available to your users.
jMensa
I encountered several encoding issues with Java mobiles. On the emulators it worked just fine but on the real phone it had problems. So I decided to use UTF-8 as encoding for jMensa and this works pretty good now. So you will need an additional script that converts the script to UTF-8. I use a small PHP script that does this on-the-fly (getrawdb.php):
<?php
 
header("Content-type: text/plain; charset=UTF-8");
header("Content-encoding: UTF-8");
 
$file = file("mensa.pre");
 
$length = 0;
foreach ($file as $line) {
  $length += strlen(utf8_encode($line));
}
 
header("Content-length: $length");
 
foreach ($file as $line) {
  print utf8_encode($line);
}
 
?>
Then you need to unzip a file from jMensa.jar:
unzip jMensa.jar jMensa/RawDatabase.url
Edit the file and write the URL of the file to fetch. Update the file in the JAR and you are done. This version of jMensa will now load your database.
What's next
That's it. You can now use the Mensa Framework...




Top 5 Pages
Wiki
WebLog
SquidGuard Webmin Module
Network Utilities Webmin Module
IPtables Webmin Module


Palm Software
UniMatrix UniMensa UniSorter
UniChat Onager


My Bookshelf
RSS Copyright © 2000-2025 by Tim Niemueller