-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Following up on #7 and some experiments in oryx-layer-inserter I created #8 with yargs, prompts & node-persist, this covers a base for better UX, adding more commands & caches, as well as merging the repos.
Combined Commandlist:
authget JWT authorization token (manual, only possible to automate as user script)dataget my layouts listopennew layout revision (manual, TODO automate?)insert(create/copy) layer (Copy layers from multiple layouts: Layer Boilerplates #6)set-keyWIP (Copy layers from multiple layouts: Layer Boilerplates #6)wizardcreate username file, prototype macros Macro Wizard #11get*(download-src) keymap sourceprocess*keymap expanding macroscompile*flash*(manual, TODO Flash Command: Call Wally #12)
*unauthorized mode - auth is actually not needed (only layoutID)
The last three commands and potentially essential parts of the wizard cannot be run inside the browser, but they could also generate a browser snippet to set the macro key, for example. I might explore this later, so the layer-inserter will become a playground for tamper monkey scripts.
Automation as console prompts for Node.JS, initial flow:
auth- prompt to get the auth token is a messy manual task, description:localStorage.getItem('jwtToken')data- provides layout & layer IDs (a bit slow for many layouts)open- create a new revision, required if the layout is to be modified (insert,set key) - manual for nowwizard- guide through macro creation TODO Macro Wizard #11get(download-src) - get & unzip the keymap source TODO check openprocess- apply macros expansion, add stuff to the keymap.c filecompile- callqmklocallyflash- call or at least open Wally (Flash Command: Call Wally #12)
Most interesting "everyday" usage flow
auth- needs just to be checked, the token is quite long-lived, if it timed out fall back to caches & prompts in "unauthorized" modewizard- just skip to change a typo in a macro, or add one from a blueprint... Macro Wizard #11open- don't, just check that no open revision exists, to be ready to download - recognize unchangeddownload- only if the layout changedprocess,compile,flash&data- meanwhile processing update caches
I'd like to implement the fast path first: "new but closed revision found" - download & process - no prompts.
How important is this "unauthorized mode"? Likely depends on the usefulness of the wizard (#11) and the potential selection of new macros from a yet-to-be-created macro and layer library... (#6)
What are your thoughts about this?