INACTIVE - http://mzl.la/ghe-archive - A mobile version of the LDAP phonebook.
Перейти к файлу
Atul Varma 4f745efb6f combine.py and fetch.py can now be imported and used as modules. 2011-09-10 09:18:40 -07:00
static-files search box is now the width of the whole page. 2011-04-08 04:38:52 -07:00
.gitignore More efficient handling when a user has no photo, and fallback to generic no-photo image when offline. 2011-04-06 11:59:50 -07:00
README.md Added server.py and modified the README to mention it. 2011-04-08 15:57:06 -07:00
combine.py combine.py and fetch.py can now be imported and used as modules. 2011-09-10 09:18:40 -07:00
fetch.py combine.py and fetch.py can now be imported and used as modules. 2011-09-10 09:18:40 -07:00
server.py Added server.py and modified the README to mention it. 2011-04-08 15:57:06 -07:00

README.md

Mozilla Mobile Phonebook README

Atul made this phonebook to scratch two itches:

Why This Isn't Public

Very little of the source code contains confidential information; in fact, the only thing that can potentially be considered confidential is the URL to Mozilla's LDAP server in fetch.py. It'd be nice to decouple that from the rest of the app, and then make the code public.

Prerequisites

All you need is Python 2.6 or later, which is used to run scripts that talk to LDAP and cache the Phonebook contents as static files. The actual web app consists entirely of static files.

Caching The LDAP Phonebook

This must be done before you can develop or deploy the app.

First, create a file in the root directory of the repository called config.json. Paste the following into it and edit as necessary:

    {
      "username": "my_username@mozilla.com",
      "password": "my_password"
    }

Then run fetch.py, followed by combine.py.

Development

If you're going to be changing any HTML, CSS, or JavaScript content, delete the static-files/cache.manifest file, which is created by combine.py. This will cause the browser to obsolete the application cache and ensure that you're always looking at the latest version of your code when you reload the page.

Then, run server.py and browse to http://localhost:8001/.

Deployment

Simply re-run combine.py if necessary and serve the contents of the static-files folder over HTTPS with some kind of access control. You should also make sure that .manifest files are served with the MIME type text/cache-manifest.