First of all, I totally misunderstood your link to the Storage documentation. I took it as the generic documentation for the Storage module and just now realized it was a special page that contained interface.html-specific information. Oops.
Still, it doesn't seem all that straightforward what functions are available for Util, Puck, etc., that is, I can't find a reference. I can do Util.readStorage, for instance, but apparently not Util.readStorageJSON. Speaking of that, JSON.parse in the browser doesn't seem to like strings from storage files written on the Bangle.js with storage.writeJSON. I had to resort to parsing it with plain old eval instead.
I got the local web server working on Linux, though. That was really easy. Just go into the root of my BangleApps project directory and run python3 -m http.server 8080 --bind 127.0.0.1. Then go to localhost:8080 in my browser, and that was pretty much it. :) I'm posting this here for future reference in case someone finds it helpful.
I think I finally got my desired functionality working using Util.readStorage, though, with a bit of rewriting. There wasn't much code involved in simply printing out the contents from the app, so it's not so bad, I guess.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
First of all, I totally misunderstood your link to the Storage documentation. I took it as the generic documentation for the
Storage
module and just now realized it was a special page that containedinterface.html
-specific information. Oops.Still, it doesn't seem all that straightforward what functions are available for
Util
,Puck
, etc., that is, I can't find a reference. I can doUtil.readStorage
, for instance, but apparently notUtil.readStorageJSON
. Speaking of that,JSON.parse
in the browser doesn't seem to like strings from storage files written on the Bangle.js withstorage.writeJSON
. I had to resort to parsing it with plain oldeval
instead.I got the local web server working on Linux, though. That was really easy. Just go into the root of my BangleApps project directory and run
python3 -m http.server 8080 --bind 127.0.0.1
. Then go tolocalhost:8080
in my browser, and that was pretty much it. :) I'm posting this here for future reference in case someone finds it helpful.I think I finally got my desired functionality working using
Util.readStorage
, though, with a bit of rewriting. There wasn't much code involved in simply printing out the contents from the app, so it's not so bad, I guess.