mozilla-b2g/preload-app-toolkit

Name: preload-app-toolkit

Owner: Mozilla-B2G

Description: null

Created: 2013-03-25 11:24:07.0

Updated: 2015-11-30 11:39:57.0

Pushed: 2015-11-11 08:20:09.0

Homepage: null

Size: 566

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Gaia Preload webapp generation script Build Status Coverage Status

Why need Gaia Preload App script

Pre-bundled webapp are not quite the same as usual webapp, since Pre-bundled webapp may be seen before internet is ready. It have to store linked icon to buildin base-64 strings, provide correspondent matadata.json, prefetched appcache…, etc.

Gaia Preload App script provide a preload.py script that help build pre-bundled webapp from a given .webapp URL.

Usage
fetch a single webapp

Find a webapp URL that want to bundled with, and run the command:

$ python preload.py http://<webapp url>

It will generate a folder with target webapp name.

batch process to fetch multiple webapp

You can form a list file that batched the process. The format is

Facebook,http://fa....
Twitter,https://twi....

Put preload.py script with list file in the same folder, then run the command:

$ python preload.py

preload.py script will parse the list file and do the conversion for you.

You can specify a --root folder in which preload.py will look for the list file and save the preloaded contents.

$ python preload.py --root=~/webapps/
convert web icon to base64 string

fetch icon from URL and convert it to base64 string

$ python preload.py --icon http://<icon url>
Setup unit test
rtualenv .env
urce .env/bin/activate
p install mock
thon preload_test.py

Experimental: Minilla web UI

We'd developing the Minilla web UI that help people ease the customization work with web interface.

The Minilla only depends on python, so you can run

$ python wsgi.py

open browser to http://localhost:8000 and use it.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.