INACTIVE - http://mzl.la/ghe-archive - A mobile version of the LDAP phonebook.
Перейти к файлу
Gene Wood 85709d7083
Merge pull request #1 from mozilla/gene1wood-patch-1
Remove README rationale for repo being private
2018-10-25 11:48:57 -07:00
static-files Adding a mozilla name game v 0.1 2011-09-21 19:16:23 -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 Remove README rationale for repo being private 2018-10-25 11:46:39 -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:

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/.

Updating

Run fetch.py followed by combine.py. This will refresh all phone numbers and employee information, and it will attempt to fetch thumbnails for all employees that haven't yet submitted a photo. If you want to update all photos, delete the static-files/images/people directory before running fetch.py.

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.