Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
*.swp
*.pyc
*.log
js/mobile.js
js/init_plot.js
js/version.json
css/mobile.css
/index.html
/js/version.json
cache.manifest
tiles/
tiles/
2 changes: 1 addition & 1 deletion DEVELOPER_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ To get a copy of the code and run a test web server:

1. [Fork the repository](https://github.com/projecthorus/sondehub-tracker/fork) by visiting [https://github.com/projecthorus/sondehub-tracker/fork](https://github.com/projecthorus/sondehub-tracker/fork).
2. Clone the repository with your git tool of choice.
3. Run `build.sh` to compile the javascript files. (This requires Java to be installed and in your path.)
3. Run `build.sh` to generate `index.html` and `js/version.json`.
4. Run `python serve.py` to run a simple web server to (This requires python 3.x)
5. Visit [http://localhost:8000](http://localhost:8000) to view the local version of the server!
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:latest

RUN apk add --no-cache python3 openjdk11 sed git
RUN apk add --no-cache python3 sed git

WORKDIR /app
ADD . .
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ Pull requests are welcome.

## Installation

Requirements: Java

$ git clone https://github.com/projecthorus/sondehub-tracker.git
$ ./build.sh
$ python serve.py
Expand Down
42 changes: 5 additions & 37 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,50 +1,18 @@
#!/bin/bash

# compile stylesheet
echo -n "Compiling CSS... "
cd css
rm -f mobile.css
cat base.css skeleton.css layout.css habitat-font.css main.css leaflet.css leaflet.fullscreen.css skewt.css > mobile.tmp
java -jar "../tools/yuicompressor-2.4.8.jar" --type=css mobile.tmp > mobile.css
rm -f mobile.tmp
cd ..
echo "Done!"

#compile javascript
echo -n "Compiling JavaScript... "
cd js
rm -f mobile.js init_plot.js
# precompiled libs
cat jquery* >> mobile.js
set -e

VERSION="`git rev-parse --short HEAD`"

BUILD_DATE="`date -u +%Y-%m-%dT%H:%M:%SZ`"

# compile the rest
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge iscroll.js >> mobile.js
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge chasecar.lib.js | sed "s/{VER}/$VERSION/" >> mobile.js
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge tracker.js >> mobile.js
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge app.js | sed "s/{VER}/$VERSION/" | sed "s/{BUILD_DATE}/$BUILD_DATE/" >> mobile.js
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge colour-map.js >> mobile.js
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge xdata.js >> mobile.js
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge station.js >> mobile.js
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge format.js >> mobile.js

#compile plot lib and config
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge _jquery.flot.js >> init_plot.js
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge plot_config.js >> init_plot.js

# create version check file
echo "{\"build_date\": \"$BUILD_DATE\", \"version\": \"$VERSION\", \"refresh\": 86400}" > version.json

cd ..
echo -n "Generating js/version.json... "
echo "{\"build_date\": \"$BUILD_DATE\", \"version\": \"$VERSION\", \"refresh\": 86400}" > js/version.json
echo "Done!"

# cache fixes
sed -i'' "s/{VER}/$VERSION/" index.html
sed -i'' "s/{VER}/$VERSION/" service-worker.js

echo -n "Generating index.html... "
sed -e "s/{VER}/$VERSION/" -e "s/{BUILD_DATE}/$BUILD_DATE/" index.template.html > index.html
echo "Done!"

echo "Build version: $VERSION Build date: $BUILD_DATE"
Binary file removed img/markers/balloon-adafruit.png
Binary file not shown.
Binary file removed img/markers/balloon-blue.png
Binary file not shown.
Binary file removed img/markers/balloon-buzz.png
Binary file not shown.
Binary file removed img/markers/balloon-cyan.png
Binary file not shown.
Binary file removed img/markers/balloon-green.png
Binary file not shown.
Binary file removed img/markers/balloon-invisible.png
Binary file not shown.
Binary file removed img/markers/balloon-iss.png
Binary file not shown.
Binary file removed img/markers/balloon-orange.png
Binary file not shown.
Binary file removed img/markers/balloon-purple.png
Binary file not shown.
Binary file removed img/markers/balloon-red.png
Binary file not shown.
Binary file removed img/markers/balloon-rob.png
Binary file not shown.
Binary file removed img/markers/balloon-rpi.png
Binary file not shown.
Binary file removed img/markers/balloon-shockpink.png
Binary file not shown.
Binary file removed img/markers/balloon-thereg.png
Binary file not shown.
Binary file removed img/markers/balloon-yellow.png
Binary file not shown.
58 changes: 58 additions & 0 deletions img/markers/balloon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/markers/car-blue.png
Binary file not shown.
Binary file removed img/markers/car-green.png
Binary file not shown.
Binary file removed img/markers/car-purple.png
Binary file not shown.
Binary file removed img/markers/car-red.png
Binary file not shown.
Binary file removed img/markers/car-teal.png
Binary file not shown.
Binary file removed img/markers/car-yellow.png
Binary file not shown.
88 changes: 88 additions & 0 deletions img/markers/car.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/markers/parachute-blue.png
Binary file not shown.
Binary file removed img/markers/parachute-cyan.png
Binary file not shown.
Binary file removed img/markers/parachute-green.png
Diff not rendered.
Binary file removed img/markers/parachute-orange.png
Diff not rendered.
Binary file removed img/markers/parachute-purple.png
Diff not rendered.
Binary file removed img/markers/parachute-red.png
Diff not rendered.
Binary file removed img/markers/parachute-rpi.png
Diff not rendered.
Binary file removed img/markers/parachute-yellow.png
Diff not rendered.
78 changes: 78 additions & 0 deletions img/markers/parachute.svg
Binary file removed img/markers/payload-blue.png
Diff not rendered.
Binary file removed img/markers/payload-cyan.png
Diff not rendered.
Binary file removed img/markers/payload-green.png
Diff not rendered.
Binary file removed img/markers/payload-orange.png
Diff not rendered.
Binary file removed img/markers/payload-purple.png
Diff not rendered.
Binary file removed img/markers/payload-red.png
Diff not rendered.
Binary file removed img/markers/payload-rpi.png
Diff not rendered.
Binary file removed img/markers/payload-yellow.png
Diff not rendered.
36 changes: 36 additions & 0 deletions img/markers/payload.svg
Binary file removed img/markers/target-blue.png
Diff not rendered.
Binary file removed img/markers/target-cyan.png
Diff not rendered.
Binary file removed img/markers/target-green.png
Diff not rendered.
Binary file removed img/markers/target-orange.png
Diff not rendered.
Binary file removed img/markers/target-purple.png
Diff not rendered.
Binary file removed img/markers/target-red.png
Diff not rendered.
Binary file removed img/markers/target-yellow.png
Diff not rendered.
19 changes: 19 additions & 0 deletions img/markers/target.svg
Loading