add dynamic image creation code & json refactor
again, make JSON files more like upstream:
* images: use dict instead of simple file. This allows adding
information like checksums or types. Again, I dealt so much with
heuristics withn OpenWrt build system that I avoid it as much as
possible. From my side I'd remove fragments like `findCommonPrefix` and
just rely on upstream info.
* commit: replace with `version_commit` (as there is also
`version_number`
* link: replace with `url` as *link* referes to something clickable in
the browser while url is more generic, including machine reads
* activate sort_keys in collect.py, this creates reproducible json files
and surely makes some JSON parser happy
* %foobar: instead of using `%` I changed the replacement to mustache[0]
which is also usable via Pythons `format()` function and easier to read.
Say a string like %target-info/foobar could mean a variable `target` or
`target-info`, using {target}-info/foobar makes things easier
* %file: remove this entirely and just append whatever desired file at
the end. Is there any case where the downloaded file is not at the end?
all these changes where done to be compatile with the *asu*, meaning a
image builder backend that creates images with specificed packages on
demand. Example code is added within the top of index.js. The server
takes `version`, `profile` and `packages` as arguments and returns
within a few seconds a freshly build firmware, which is automatically
shown in the frontend.
[0]: mustache.github.io/
Signed-off-by: Paul Spooren <mail@aparcar.org>