Merge branch 'espruino:master' into master
commit
0eca1182c2
40
apps.json
40
apps.json
|
|
@ -1,25 +1,35 @@
|
||||||
---
|
---
|
||||||
|
# =================================================================
|
||||||
|
# ALL THE INFORMATION INSIDE APPS.JSON HAS NOW BEEN MOVED
|
||||||
|
#
|
||||||
|
# You'll find it inside a file called apps/yourapp/metadata.json
|
||||||
|
#
|
||||||
|
# Otherwise nothing has changed. GitHub Pages will automatically
|
||||||
|
# create apps.json as your site is hosted, or if you're hosting
|
||||||
|
# yourself you can run bin/create_apps_json.sh
|
||||||
|
#
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Uncomment the following line if you only want explicitly listed
|
||||||
|
# apps to be available on your site
|
||||||
|
|
||||||
|
# restricted: ["boot", "launch", "antonclk", "health", "setting", "about", "widbat", "widbt", "widlock", "widid"]
|
||||||
---
|
---
|
||||||
{% comment %}
|
{%- if page.restricted == nil -%}
|
||||||
=================================================================
|
{%- assign apps = site.static_files | where: "name", "metadata.json" | map: "path" -%}
|
||||||
ALL THE INFORMATION INSIDE APPS.JSON HAS NOW BEEN MOVED
|
{%- else -%}
|
||||||
|
{%- capture temp -%}
|
||||||
You'll find it inside a file called apps/yourapp/metadata.json
|
{%- for app in page.restricted %} /apps/{{app}}/metadata.json {%- endfor -%}
|
||||||
|
{%- endcapture -%}
|
||||||
Otherwise nothing has changed. GitHub Pages will automatically
|
{%- assign apps = temp | strip | split: " " -%}
|
||||||
create apps.json as your site is hosted, or if you're hosting
|
{%- endif -%}
|
||||||
yourself you can run bin/create_apps_json.sh
|
|
||||||
|
|
||||||
=================================================================
|
|
||||||
{% endcomment %}
|
|
||||||
{%- assign apps = site.static_files | where: "name", "metadata.json" -%}
|
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
||||||
{%- include_relative {{ apps.first.path }} -%}
|
{%- include_relative {{ apps.first }} -%}
|
||||||
|
|
||||||
{%- for app in apps offset:1 -%}
|
{%- for app in apps offset:1 -%}
|
||||||
,{%- include_relative {{ app.path }} -%}
|
,{%- include_relative {{ app }} -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ function showMenu() {
|
||||||
'': {
|
'': {
|
||||||
'title': 'Set Date',
|
'title': 'Set Date',
|
||||||
'predraw': function() {
|
'predraw': function() {
|
||||||
datemenu.Date.value = settings.day;
|
datemenu.Day.value = settings.day;
|
||||||
datemenu.Month.value = settings.month;
|
datemenu.Month.value = settings.month;
|
||||||
datemenu.Year.value = settings.year;
|
datemenu.Year.value = settings.year;
|
||||||
}
|
}
|
||||||
|
|
@ -64,4 +64,5 @@ function showMenu() {
|
||||||
return E.showMenu(datemenu);
|
return E.showMenu(datemenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
showMenu();
|
showMenu();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
"description": "Shows you the days left until a certain date. Date can be set with a settings app and is written to a file.",
|
"description": "Shows you the days left until a certain date. Date can be set with a settings app and is written to a file.",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "",
|
"tags": "",
|
||||||
"supports": ["BANGLEJS"],
|
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||||
"allow_emulator": false,
|
"allow_emulator": false,
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"daysl.app.js","url":"app.js"},
|
{"name":"daysl.app.js","url":"app.js"},
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"description": "Strike the clock on the hour. A great tool to remind you an hour has passed!",
|
"description": "Strike the clock on the hour. A great tool to remind you an hour has passed!",
|
||||||
"icon": "app-icon.png",
|
"icon": "app-icon.png",
|
||||||
"tags": "tool,alarm",
|
"tags": "tool,alarm",
|
||||||
"supports": ["BANGLEJS"],
|
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"hourstrike.app.js","url":"app.js"},
|
{"name":"hourstrike.app.js","url":"app.js"},
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,3 @@
|
||||||
0.01: Created
|
0.01: Created
|
||||||
0.02: Set sort order to -10 so always display in right hand corner
|
0.02: Set sort order to -10 so always display in right hand corner
|
||||||
|
0.03: Set sort order from the code
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,12 @@
|
||||||
"shortName":"Battery Theme",
|
"shortName":"Battery Theme",
|
||||||
"icon": "widbata.png",
|
"icon": "widbata.png",
|
||||||
"screenshots": [{"url":"screenshot_widbata_1.png"}],
|
"screenshots": [{"url":"screenshot_widbata_1.png"}],
|
||||||
"version":"0.02",
|
"version":"0.03",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"description": "Shows the current battery level status in the top right using the clocks colour theme",
|
"description": "Shows the current battery level status in the top right using the clocks colour theme",
|
||||||
"tags": "widget,battery",
|
"tags": "widget,battery",
|
||||||
"sortorder": -10,
|
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"widbata.wid.js","url":"widbata.wid.js"}
|
{"name":"widbata.wid.js","url":"widbata.wid.js"}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ setInterval(()=>WIDGETS["bata"].draw(), 60000);
|
||||||
Bangle.on('lcdPower', function(on) {
|
Bangle.on('lcdPower', function(on) {
|
||||||
if (on) WIDGETS["bata"].draw();
|
if (on) WIDGETS["bata"].draw();
|
||||||
});
|
});
|
||||||
WIDGETS["bata"]={area:"tr",width:27,draw:function() {
|
WIDGETS["bata"]={area:"tr",sortorder:-10,width:27,draw:function() {
|
||||||
var s = 26;
|
var s = 26;
|
||||||
var t = 13; // thickness
|
var t = 13; // thickness
|
||||||
var x = this.x, y = this.y;
|
var x = this.x, y = this.y;
|
||||||
|
|
|
||||||
|
|
@ -3,3 +3,4 @@
|
||||||
0.03: Don't try to be fancy - just bail out on firmwares without a lock event
|
0.03: Don't try to be fancy - just bail out on firmwares without a lock event
|
||||||
0.04: Set sortorder to -1 so that widget always takes up the furthest left position
|
0.04: Set sortorder to -1 so that widget always takes up the furthest left position
|
||||||
0.05: Set sortorder to -10 so that others can take -1 etc
|
0.05: Set sortorder to -10 so that others can take -1 etc
|
||||||
|
0.06: Set sortorder to -10 in widget code
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
{
|
{
|
||||||
"id": "widlock",
|
"id": "widlock",
|
||||||
"name": "Lock Widget",
|
"name": "Lock Widget",
|
||||||
"version": "0.05",
|
"version": "0.06",
|
||||||
"description": "On devices with always-on display (Bangle.js 2) this displays lock icon whenever the display is locked",
|
"description": "On devices with always-on display (Bangle.js 2) this displays lock icon whenever the display is locked",
|
||||||
"icon": "widget.png",
|
"icon": "widget.png",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
"tags": "widget,lock",
|
"tags": "widget,lock",
|
||||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||||
"sortorder": -10,
|
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"widlock.wid.js","url":"widget.js"}
|
{"name":"widlock.wid.js","url":"widget.js"}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
WIDGETS["lock"].width = Bangle.isLocked()?16:0;
|
WIDGETS["lock"].width = Bangle.isLocked()?16:0;
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
});
|
});
|
||||||
WIDGETS["lock"]={area:"tl",width:Bangle.isLocked()?16:0,draw:function(w) {
|
WIDGETS["lock"]={area:"tl",sortorder:10,width:Bangle.isLocked()?16:0,draw:function(w) {
|
||||||
if (Bangle.isLocked())
|
if (Bangle.isLocked())
|
||||||
g.reset().drawImage(atob("DhABH+D/wwMMDDAwwMf/v//4f+H/h/8//P/z///f/g=="), w.x+1, w.y+4);
|
g.reset().drawImage(atob("DhABH+D/wwMMDDAwwMf/v//4f+H/h/8//P/z///f/g=="), w.x+1, w.y+4);
|
||||||
}};
|
}};
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
0.01: First release
|
0.01: First release
|
||||||
0.02: Size widget after step count is reset
|
0.02: Size widget after step count is reset
|
||||||
0.03: set sortorder to -1
|
0.03: set sortorder to -1
|
||||||
|
0.04: set sortorder through code
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,12 @@
|
||||||
"shortName":"Simple Pedometer",
|
"shortName":"Simple Pedometer",
|
||||||
"icon": "screenshot_widpa.png",
|
"icon": "screenshot_widpa.png",
|
||||||
"screenshots": [{"url":"screenshot_widpa.png"}],
|
"screenshots": [{"url":"screenshot_widpa.png"}],
|
||||||
"version":"0.03",
|
"version":"0.04",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"description": "Displays the current step count from `Bangle.getHealthStatus(\"day\").steps` in 12x16 font, requires firmware v2.11.21 or later",
|
"description": "Displays the current step count from `Bangle.getHealthStatus(\"day\").steps` in 12x16 font, requires firmware v2.11.21 or later",
|
||||||
"tags": "widget,battery",
|
"tags": "widget,battery",
|
||||||
"sortorder": -1,
|
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"widpa.wid.js","url":"widpa.wid.js"}
|
{"name":"widpa.wid.js","url":"widpa.wid.js"}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ Bangle.on('step', function(s) { WIDGETS["widpa"].draw(); });
|
||||||
Bangle.on('lcdPower', function(on) {
|
Bangle.on('lcdPower', function(on) {
|
||||||
if (on) WIDGETS["widpa"].draw();
|
if (on) WIDGETS["widpa"].draw();
|
||||||
});
|
});
|
||||||
WIDGETS["widpa"]={area:"tl",width:13,draw:function() {
|
WIDGETS["widpa"]={area:"tl",sortorder:-1,width:13,draw:function() {
|
||||||
if (!Bangle.isLCDOn()) return; // dont redraw if LCD is off
|
if (!Bangle.isLCDOn()) return; // dont redraw if LCD is off
|
||||||
var steps = Bangle.getHealthStatus("day").steps;
|
var steps = Bangle.getHealthStatus("day").steps;
|
||||||
var w = 1 + (steps.toString().length)*12;
|
var w = 1 + (steps.toString().length)*12;
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,4 @@
|
||||||
0.02: Fixed widget id to wibpb, Size widget after step count is reset
|
0.02: Fixed widget id to wibpb, Size widget after step count is reset
|
||||||
0.03: Fixed widget id in onStep() come on get it right!
|
0.03: Fixed widget id in onStep() come on get it right!
|
||||||
0.04: set sortorder to -1
|
0.04: set sortorder to -1
|
||||||
|
0.05: set sortorder through code
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,12 @@
|
||||||
"shortName":"Lato Pedometer",
|
"shortName":"Lato Pedometer",
|
||||||
"icon": "screenshot_widpb.png",
|
"icon": "screenshot_widpb.png",
|
||||||
"screenshots": [{"url":"screenshot_widpb.png"}],
|
"screenshots": [{"url":"screenshot_widpb.png"}],
|
||||||
"version":"0.04",
|
"version":"0.05",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"description": "Displays the current step count from `Bangle.getHealthStatus(\"day\").steps` in the Lato font, requires firmware v2.11.21 or later",
|
"description": "Displays the current step count from `Bangle.getHealthStatus(\"day\").steps` in the Lato font, requires firmware v2.11.21 or later",
|
||||||
"tags": "widget,battery",
|
"tags": "widget,battery",
|
||||||
"sortorder": -1,
|
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"widpb.wid.js","url":"widpb.wid.js"}
|
{"name":"widpb.wid.js","url":"widpb.wid.js"}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ Bangle.on('step', function(s) { WIDGETS["widpb"].draw(); });
|
||||||
Bangle.on('lcdPower', function(on) {
|
Bangle.on('lcdPower', function(on) {
|
||||||
if (on) WIDGETS["widpb"].draw();
|
if (on) WIDGETS["widpb"].draw();
|
||||||
});
|
});
|
||||||
WIDGETS["widpb"]={area:"tl",width:13,draw:function() {
|
WIDGETS["widpb"]={area:"tl",sortorder:-1,width:13,draw:function() {
|
||||||
if (!Bangle.isLCDOn()) return; // dont redraw if LCD is off
|
if (!Bangle.isLCDOn()) return; // dont redraw if LCD is off
|
||||||
var steps = Bangle.getHealthStatus("day").steps;
|
var steps = Bangle.getHealthStatus("day").steps;
|
||||||
var w = 1 + (steps.toString().length)*12;
|
var w = 1 + (steps.toString().length)*12;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ var SETTINGS = {
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var ROOTDIR = path.join(__dirname, '..');
|
var ROOTDIR = path.join(__dirname, '..');
|
||||||
var APPDIR = ROOTDIR+'/apps';
|
var APPDIR = ROOTDIR+'/apps';
|
||||||
var APPJSON = ROOTDIR+'/apps.json';
|
|
||||||
var OUTFILE = ROOTDIR+'/firmware.js';
|
var OUTFILE = ROOTDIR+'/firmware.js';
|
||||||
var DEVICE = "BANGLEJS";
|
var DEVICE = "BANGLEJS";
|
||||||
var APPS = [ // IDs of apps to install
|
var APPS = [ // IDs of apps to install
|
||||||
|
|
@ -28,7 +27,6 @@ global.Const = {
|
||||||
};
|
};
|
||||||
|
|
||||||
var AppInfo = require(ROOTDIR+"/core/js/appinfo.js");
|
var AppInfo = require(ROOTDIR+"/core/js/appinfo.js");
|
||||||
var appjson = JSON.parse(fs.readFileSync(APPJSON).toString());
|
|
||||||
var appfiles = [];
|
var appfiles = [];
|
||||||
|
|
||||||
function fileGetter(url) {
|
function fileGetter(url) {
|
||||||
|
|
@ -58,8 +56,11 @@ function fileGetter(url) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Promise.all(APPS.map(appid => {
|
Promise.all(APPS.map(appid => {
|
||||||
var app = appjson.find(app=>app.id==appid);
|
try {
|
||||||
if (app===undefined) throw new Error(`App ${appid} not found`);
|
var app = JSON.parse(fs.readFileSync(APPDIR + "/" + appid + "metadata.json").toString());
|
||||||
|
} catch (e) {
|
||||||
|
throw new Error(`App ${appid} not found`);
|
||||||
|
}
|
||||||
return AppInfo.getFiles(app, {
|
return AppInfo.getFiles(app, {
|
||||||
fileGetter : fileGetter,
|
fileGetter : fileGetter,
|
||||||
settings : SETTINGS,
|
settings : SETTINGS,
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ var DEVICE = process.argv[2];
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var ROOTDIR = path.join(__dirname, '..');
|
var ROOTDIR = path.join(__dirname, '..');
|
||||||
var APPDIR = ROOTDIR+'/apps';
|
var APPDIR = ROOTDIR+'/apps';
|
||||||
var APPJSON = ROOTDIR+'/apps.json';
|
|
||||||
var MINIFY = true;
|
var MINIFY = true;
|
||||||
var OUTFILE, APPS;
|
var OUTFILE, APPS;
|
||||||
|
|
||||||
|
|
@ -86,7 +85,6 @@ function atob(input) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var AppInfo = require(ROOTDIR+"/core/js/appinfo.js");
|
var AppInfo = require(ROOTDIR+"/core/js/appinfo.js");
|
||||||
var appjson = JSON.parse(fs.readFileSync(APPJSON).toString());
|
|
||||||
var appfiles = [];
|
var appfiles = [];
|
||||||
|
|
||||||
function fileGetter(url) {
|
function fileGetter(url) {
|
||||||
|
|
@ -134,8 +132,11 @@ function evaluateFile(file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Promise.all(APPS.map(appid => {
|
Promise.all(APPS.map(appid => {
|
||||||
var app = appjson.find(app=>app.id==appid);
|
try {
|
||||||
if (app===undefined) throw new Error(`App ${appid} not found`);
|
var app = JSON.parse(fs.readFileSync(APPDIR + "/" + appid + "metadata.json").toString());
|
||||||
|
} catch (e) {
|
||||||
|
throw new Error(`App ${appid} not found`);
|
||||||
|
}
|
||||||
return AppInfo.getFiles(app, {
|
return AppInfo.getFiles(app, {
|
||||||
fileGetter : fileGetter,
|
fileGetter : fileGetter,
|
||||||
settings : SETTINGS,
|
settings : SETTINGS,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
{
|
||||||
|
"//":"Czech language translations",
|
||||||
|
"GLOBAL": {
|
||||||
|
"//":"Translations that apply for all apps",
|
||||||
|
"Alarm" : "Budík",
|
||||||
|
"Hour" : "Hodina",
|
||||||
|
"Hours" : "Hodiny",
|
||||||
|
"Minute" : "Minuta",
|
||||||
|
"Minutes" : "Minuty",
|
||||||
|
"Second" : "Sekunda",
|
||||||
|
"Seconds" : "Sekundy",
|
||||||
|
"Month" : "Měsíc",
|
||||||
|
"Enabled" : "Povoleno",
|
||||||
|
"Background" : "Pozadí",
|
||||||
|
"Connected" : "Připojeno",
|
||||||
|
"Settings" : "Nastavení",
|
||||||
|
"Save" : "Uložit",
|
||||||
|
"Back" : "Zpět",
|
||||||
|
"Repeat" : "Opakovat",
|
||||||
|
"Delete" : "Smazat",
|
||||||
|
"Sleep" : "Uspat",
|
||||||
|
"Alarms" : "Budíky",
|
||||||
|
"ALARM!" : "BUDÍK!",
|
||||||
|
|
||||||
|
" (repeat)" : " (opakovat)",
|
||||||
|
"< Back" : "< Zpět",
|
||||||
|
"> Delete" : "> Smazat",
|
||||||
|
"> Save" : " > Uložit",
|
||||||
|
"ALARM " : "BUDÍK ",
|
||||||
|
|
||||||
|
"Add Device" : "Přidat zařízení",
|
||||||
|
"App Settings" : "Nast. Aplikací",
|
||||||
|
"Apps" : "Aplikace"
|
||||||
|
|
||||||
|
},
|
||||||
|
"alarm": {
|
||||||
|
"//":"App-specific overrides",
|
||||||
|
"Alarm/Timer" : "Budik/Časovač",
|
||||||
|
"rpt" : "Opk.",
|
||||||
|
"New Alarm" : "Nový budík",
|
||||||
|
"New Timer" : "Nový časovač",
|
||||||
|
"Auto snooze" : "Auto odložit"
|
||||||
|
},
|
||||||
|
"setting" : {
|
||||||
|
"Quiet Mode" : "Tichý režim"
|
||||||
|
|
||||||
|
},
|
||||||
|
"messages": {
|
||||||
|
"Are you sure?" : "Opravdu?"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
[
|
[
|
||||||
{"code":"en_GB","name":"British English","url":"en_GB.json"},
|
{"code":"en_GB","name":"British English","url":"en_GB.json"},
|
||||||
|
{"code":"cs_CZ","name":"Czech","url":"cs_CZ.json"},
|
||||||
{"code":"de_DE","name":"German","url":"de_DE.json"},
|
{"code":"de_DE","name":"German","url":"de_DE.json"},
|
||||||
{"code":"es_ES","name":"Spanish","url":"es_ES.json"},
|
{"code":"es_ES","name":"Spanish","url":"es_ES.json"},
|
||||||
{"code":"fi_FI","name":"Finnish","url":"fi_FI.json"},
|
{"code":"fi_FI","name":"Finnish","url":"fi_FI.json"},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue