From e5a6b42195834d7f2b86c533dedaec5491c89cc8 Mon Sep 17 00:00:00 2001 From: Randy Heydon Date: Sun, 23 Feb 2025 22:07:19 -0500 Subject: [PATCH] noteify: make notes available to clock info. This adds a clock info list for Noteify, with each note as an entry in that list. This gives a way for a user to put a note directly on any clock with a clock info area. Loosely inspired by the scratchpad of the Advanced Casio Clock (advcasio). --- apps/noteify/ChangeLog | 1 + apps/noteify/README.md | 1 + apps/noteify/clkinfo.js | 12 ++++++++++++ apps/noteify/metadata.json | 7 ++++--- 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 apps/noteify/clkinfo.js diff --git a/apps/noteify/ChangeLog b/apps/noteify/ChangeLog index a37a66731..175ec2fdc 100644 --- a/apps/noteify/ChangeLog +++ b/apps/noteify/ChangeLog @@ -1,3 +1,4 @@ 0.01: Initial version 0.02: Use default Bangle formatter for booleans 0.03: Drop duplicate alarm widget +0.04: Make notes available to clock info diff --git a/apps/noteify/README.md b/apps/noteify/README.md index dbdceb399..07035a10f 100644 --- a/apps/noteify/README.md +++ b/apps/noteify/README.md @@ -10,6 +10,7 @@ This app uses the [Scheduler library](https://banglejs.com/apps/?id=sched) and r * By selecting "set as alarm" or "set as timer", you can also use this note as a custom message for alerts from alarms and timers. Once you hit save, the alarm or timer is set. * Any alarms or timers you set will appear under "edit alarms/timers." If the alarm/timer is set to a note, the note will appear on the top of the menu. If an alarm/timer is set without a custom message, it will simply say Alarm or Timer on the top of the menu. * On the alarm/timer alert, only the first 30 characters of the note will appear - any more and you run the risk of pushing the sleep/ok buttons off-screen. +* Notes can be shown in a clock info area so you can leave messages for yourself. Swipe the clock info area left/right to reach the Noteify category, then swipe up/down to switch between notes. ## Images diff --git a/apps/noteify/clkinfo.js b/apps/noteify/clkinfo.js new file mode 100644 index 000000000..f4236a4b3 --- /dev/null +++ b/apps/noteify/clkinfo.js @@ -0,0 +1,12 @@ +(function() { + var notes = require("Storage").readJSON("noteify.json", true) || []; + return { + name: "Noteify", + items: notes.map((entry, i) => ({ + name: "Noteify "+i, + get: () => ({ text: entry.note }), + show: function() {}, + hide: function() {} + })) + }; +}) diff --git a/apps/noteify/metadata.json b/apps/noteify/metadata.json index 850628c46..464cda775 100644 --- a/apps/noteify/metadata.json +++ b/apps/noteify/metadata.json @@ -1,14 +1,15 @@ { "id": "noteify", "name": "Noteify", - "version": "0.03", - "description": "Write notes using an onscreen keyboard and use them as custom messages for alarms or timers.", + "version": "0.04", + "description": "Write notes using an onscreen keyboard and use them as custom messages for alarms, timers, or clock infos.", "icon": "app.png", - "tags": "tool,alarm", + "tags": "tool,alarm,clkinfo", "supports": ["BANGLEJS", "BANGLEJS2"], "readme": "README.md", "storage": [ {"name":"noteify.app.js","url":"app.js"}, + {"name":"noteify.clkinfo.js","url":"clkinfo.js"}, {"name":"noteify.img","url":"app-icon.js","evaluate":true} ], "data": [{"name":"noteify.json"}],